Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: Stop grabbing my keyboard :(

  1. #21
    Join Date
    Jul 2009
    Posts
    8

    Default

    Quote Originally Posted by NeoBrain View Post
    http://www.alientrap.org/forum/viewt...42389724feca6b

    This has been somewhat useful for me, esp. since it works for every game that supports windowed mode (which should cover 99% of existing apps).

    The only problem seems to be fglrx, which keeps drawing the game's window even if it is minimized (worked once, but since 9.2 or something it does not). It does that also for the games, which support "real" minimizing, though...
    Looks like that is exactly what I put in the code to fix this for warsow: make a game windows and then let the windows manager set it fullscreen with _NET_WM_STATE_FULLSCREEN.
    But it doesn't change the keyboard grabbing, you'll have to remove the xgrabkeyboard in the input code.

    For those whodon't understand whati just wrote: It's very simple to fix this problem, with only a few changes to the source code of the game.

  2. #22
    Join Date
    Oct 2007
    Posts
    912

    Default

    Sometimes it's down to practicality - and may depend on the window manager. Mouse and keyboard grabs are there to redirect keyboard input to a game (this being somewhat useful). The mouse in particular will likely require a relative motion mode within the game to avoid limits on mouse motion.
    I'm not sure how it goes these days, but the option of running in a windowed "fullscreen" mode may carry performance penalties that make it an undesirable approach. And I won't even get started on cross-platform problems with that too.
    An in-game option or key combo to switch to windowed mode and release mouse/keyboard might be a better option.

  3. #23
    Join Date
    Sep 2008
    Posts
    130

    Default

    Quote Originally Posted by RealNC View Post
    The majority of Windows games stopped crashing while Atl+Tabbing after the Windows 98 days were over. That's not an issue anymore. I take it now for granted that I can task switch while a game is running. And when I can't, I'm pretty heavily annoyed.

    The last few games I played on Windows did have problems with this.


    Of course, me saying this is just as meaningless as your quoted statement

  4. #24
    Join Date
    Jul 2009
    Posts
    8

    Default

    Quote Originally Posted by mirv View Post
    Sometimes it's down to practicality - and may depend on the window manager. Mouse and keyboard grabs are there to redirect keyboard input to a game (this being somewhat useful). The mouse in particular will likely require a relative motion mode within the game to avoid limits on mouse motion.
    I'm not sure how it goes these days, but the option of running in a windowed "fullscreen" mode may carry performance penalties that make it an undesirable approach. And I won't even get started on cross-platform problems with that too.
    An in-game option or key combo to switch to windowed mode and release mouse/keyboard might be a better option.
    The mouse can be grabbed for a game, but should be ungrabbed when the game loses focus (after alt tab).
    There is also a solution that doesn't involve mousegrabbing: mousewarping. This way the mouse wontleave the game since it will be warped back to the center

    As for the second part of your post: I don't know how it was back in your days , but fullscreen or windowed shouldn't make much of a difference in performance.

  5. #25
    Join Date
    Aug 2008
    Posts
    32

    Default

    like said above, under linux we can just switch workspaces... thats what it's for anyways.
    i get mine to some quick access shortcuts and all is well, when it ends well.

  6. #26
    Join Date
    Oct 2007
    Posts
    912

    Default

    Quote Originally Posted by blablabla View Post
    The mouse can be grabbed for a game, but should be ungrabbed when the game loses focus (after alt tab).
    There is also a solution that doesn't involve mousegrabbing: mousewarping. This way the mouse wontleave the game since it will be warped back to the center

    As for the second part of your post: I don't know how it was back in your days , but fullscreen or windowed shouldn't make much of a difference in performance.
    Fullscreen / windowed won't make much difference in games that don't need much power (by today's standards) but I'm not convinced that recent stuff will enjoy it. But hey, I could be wrong! Guess I'll have to test it out now.
    In any case, I'm still of the opinion that important key events should be taken care of before they reach the game (for example, ctrl+alt+f[x] is never grabbed by any game, or even X, on my system); games shouldn't need to be aware of the window manager, though I agree they should be aware that something else may exist and be able to give control back to it easily.

  7. #27
    Join Date
    Aug 2008
    Posts
    18

    Default man xorg.conf

    xorg.conf(5)

    ServerFlags section

    <...>

    Option "AllowDeactivateGrabs" "boolean"
    This option enables the use of the Ctrl+Alt+Keypad-Divide key sequence to deactivate any active keyboard and mouse grabs. Default: off.

    <...>

  8. #28

    Default

    Quote Originally Posted by NeoBrain View Post
    http://www.alientrap.org/forum/viewt...42389724feca6b

    This has been somewhat useful for me, esp. since it works for every game that supports windowed mode (which should cover 99% of existing apps).

    The only problem seems to be fglrx, which keeps drawing the game's window even if it is minimized (worked once, but since 9.2 or something it does not). It does that also for the games, which support "real" minimizing, though...
    This method also works with most of the other games I play, like Sauerbraten and Tremulous. And the nvidia driver seems to have no problem with this method.
    Last edited by thefirstm; 08-13-2009 at 06:59 AM.

  9. #29
    Join Date
    Sep 2008
    Posts
    24

    Default

    +1

    Same thing with Warzone2100.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •