Discussion:
[PATCH]hotkey for mousegrab
Fabian Bieler
2005-04-12 21:43:20 UTC
Permalink
This is a small hack to disable and re-enable DXGrab via Ctrl-F9.
fabian
Ove Kaaven
2005-05-04 02:46:08 UTC
Permalink
Post by Fabian Bieler
This is a small hack to disable and re-enable DXGrab via Ctrl-F9.
Nice, but there are a few things.

* The variable "want_grab" was meant to control whether to regrab the
mouse when focus is restored. It would be cleaner if you made sure this
remained false when grabbing is suppressed the same way it remains false
when DXGrab is disabled.

* Ctrl-F9 may be used by some games. Preferably the keystroke should be
configurable somehow. Perhaps XStringToKeysym() can be used for that.

* You mention Ctrl-F11 is the config patch, but don't implement it. You
should probably not mention it then.
Fabian Bieler
2005-05-25 13:37:17 UTC
Permalink
Hello!
First of all, sorry it took me so long to look into this again.
Post by Ove Kaaven
Post by Fabian Bieler
This is a small hack to disable and re-enable DXGrab via Ctrl-F9.
Nice, but there are a few things.
* The variable "want_grab" was meant to control whether to regrab the
mouse when focus is restored. It would be cleaner if you made sure this
remained false when grabbing is suppressed the same way it remains false
when DXGrab is disabled.
I'm not sure about this. If I change "want_grab" when supressing grab, I don't
know if I have to re-install grabs when suppressing stops. of course there
are ways around this but I feel using "want_grab" for this purpose is the
best way without changing huge amounts of code. However, if you insist on
changing "want_grab" I'll do so.
Post by Ove Kaaven
* Ctrl-F9 may be used by some games. Preferably the keystroke should be
configurable somehow. Perhaps XStringToKeysym() can be used for that.
No problem. do you think it will be sufficient to make F9 configurable or
should the modifier-key be changeable, too?
Post by Ove Kaaven
* You mention Ctrl-F11 is the config patch, but don't implement it. You
should probably not mention it then.
Sorry about that. I tried to implement a hotkey to switch fullscreen/desktop
mode on runtime. unfortunately I ran into a number of problems which I fear
are beyond my scope to fix.

Fabian
Fabian Bieler
2005-10-14 16:17:43 UTC
Permalink
Hello!
Ok, so I found the time to look into this again. :-[

The key is now configurable via the config file.

Regarding the disabling-"want_grab"-when-suppressing-grab issue:
I really don't think this is a good idea since when grabbing is supressed I
need another static variable to save the state that should be restored when
supressing stops. Furthermore, if the application chooses to toggle grabs
while supressing I would need to change said static variable. Isn't using
want_grabs for this purpous cleaner?

Fabian
Ove Kaaven
2006-01-10 01:51:10 UTC
Permalink
Post by Fabian Bieler
Hello!
Ok, so I found the time to look into this again. :-[
The key is now configurable via the config file.
Hmm. Could you perhaps submit this patch in diff -u format? Patches
without context tend to be problematic, both to review and to apply
properly.

Loading...