11-16-2009, 01:23 AM
|
#1 | |
|
Member
|
Post rating: rate
Quote:
This is an important issue because people that doesn't know anything about ttys will be left with a locked interface. Code:
Index: src/arch/arch/LowLevelWindow/LowLevelWindow_X11.cpp
===================================================================
--- src/arch/LowLevelWindow/LowLevelWindow_X11.cpp (revision 28234)
+++ src/arch/LowLevelWindow/LowLevelWindow_X11.cpp (working copy)
@@ -181,11 +181,16 @@
// context.
bNewDeviceOut = false;
}
-
- g_iOldSize = XRRConfigCurrentConfiguration( g_pScreenConfig, &g_OldRotation );
-
+
if( !p.windowed )
{
+ if( m_bWasWindowed )
+ {
+ // If the user changed the resolution while StepMania was windowed we overwrite the resolution to restore with it at exit.
+ g_iOldSize = XRRConfigCurrentConfiguration( g_pScreenConfig, &g_OldRotation );
+ m_bWasWindowed = false;
+ }
+
// Find a matching mode.
int iSizesXct;
XRRScreenSize *pSizesX = XRRSizes( Dpy, DefaultScreen(Dpy), &iSizesXct );
@@ -210,13 +215,10 @@
XMoveWindow( Dpy, Win, 0, 0 );
XRaiseWindow( Dpy, Win );
-
- if( m_bWasWindowed )
- {
- // We want to prevent the WM from catching anything that comes from the keyboard.
- XGrabKeyboard( Dpy, Win, True, GrabModeAsync, GrabModeAsync, CurrentTime );
- m_bWasWindowed = false;
- }
+
+ // We want to prevent the WM from catching anything that comes from the keyboard.
+ // We should do this every time on fullscreen and not only we entering from windowed mode because we could lost focus at resolution change and that will leave the user input locked.
+ XGrabKeyboard( Dpy, Win, True, GrabModeAsync, GrabModeAsync, CurrentTime );
}
else
{
Last edited by howl; 11-16-2009 at 02:18 AM.. Reason: Updated one more time, now save also the resolution that was entering from window to fullscreen mode |
|
|
|
11-16-2009, 02:11 AM
|
#3 |
|
Member
|
Post rating: rate
Updated one more time, this is a uncommon situation but if the user changed his resolution while in window mode the resolution to restore should be updated, so now the patch makes StepMania to also save the resolution when entering from windowed mode to fullscreen mode.
|
|
|
11-16-2009, 08:39 PM
|
#7 |
|
Member
|
Post rating: rate
Only sometimes, surprisingly. Could be a video driver bug, but I dunno (Intel video drivers have improved in Linux lately, especially for my 915GM). It happens in both Xfce and LXDE, with or without compositing enabled.
I do know that StepMania locks the mouse pointer in place in fullscreen mode since I can't move it away once it's on the screen. Some other apps that showed similar behaviour would make the cursor invisible once it even moved a pixel, so if mouse movement was actually possible in fullscreen I could probably "remove the annoyance". |
|
|
11-18-2009, 09:28 PM
|
#8 |
|
Member
|
Post rating: rate
Yea, I've had the same problem with the mouse pointer. I thought it was strange. Most of my issues are when changing settings. Sometimes step mania just crashes sometimes this bug you just fixed happens. I look forward to seeing your patches, keep up the good work.
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to prevent your feet from getting tangled? | akstylish | General questions | 5 | 04-24-2008 04:16 PM |
| StepMania keeps getting focus | Lebon14 | General questions | 5 | 02-08-2008 11:28 PM |
| 20080130 00:00|csd: Out of Focus (Edit) CHA and Amnesty CHA | csd | Movies | 7 | 01-30-2008 11:14 PM |
| :?: random course - prevent the same song more than once? | hayesy | Song and Course questions | 0 | 06-25-2007 06:51 PM |