mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-22 03:13:31 +01:00
Revert "Prevent unnecessary RandR wmaker restart"
This reverts commit 3579c85af1.
As pointed out by David Maciejak himself, this patch triggers
an odd behavior:
"Now I cannot do a rectangular selection on the desktop with the left
click of the mouse like I used to do.
Seems the XRRQueryVersion call to get randr version is messing up with the
X events. I tried to move up the call in src/startup.c and src/main.c
instead to the point where the bug cannot be reproduced if I am putting the
XRRQueryVersion code just before the call to wDefaultsInitDomain
"WMWindowAttributes" (in src/startup.c) which is really weird."
This commit is contained in:
20
src/event.c
20
src/event.c
@@ -575,18 +575,14 @@ static void handleExtensions(XEvent * event)
|
|||||||
}
|
}
|
||||||
#endif /*KEEP_XKB_LOCK_STATUS */
|
#endif /*KEEP_XKB_LOCK_STATUS */
|
||||||
#ifdef USE_RANDR
|
#ifdef USE_RANDR
|
||||||
if (w_global.xext.randr.supported) {
|
if (w_global.xext.randr.supported && event->type == (w_global.xext.randr.event_base + RRScreenChangeNotify)) {
|
||||||
int base = w_global.xext.randr.event_base;
|
/* From xrandr man page: "Clients must call back into Xlib using
|
||||||
if (event->type == base + RRScreenChangeNotify ||
|
* XRRUpdateConfiguration when screen configuration change notify
|
||||||
(event->type == base + RRNotify && ((XRRNotifyEvent*)event)->subtype == RRNotify_CrtcChange)) {
|
* events are generated */
|
||||||
/* From xrandr man page: "Clients must call back into Xlib using
|
XRRUpdateConfiguration(event);
|
||||||
* XRRUpdateConfiguration when screen configuration change notify
|
WCHANGE_STATE(WSTATE_RESTARTING);
|
||||||
* events are generated */
|
Shutdown(WSRestartPreparationMode);
|
||||||
XRRUpdateConfiguration(event);
|
Restart(NULL,True);
|
||||||
WCHANGE_STATE(WSTATE_RESTARTING);
|
|
||||||
Shutdown(WSRestartPreparationMode);
|
|
||||||
Restart(NULL,True);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
11
src/screen.c
11
src/screen.c
@@ -669,15 +669,8 @@ WScreen *wScreenInit(int screen_number)
|
|||||||
#endif /* KEEP_XKB_LOCK_STATUS */
|
#endif /* KEEP_XKB_LOCK_STATUS */
|
||||||
|
|
||||||
#ifdef USE_RANDR
|
#ifdef USE_RANDR
|
||||||
if (w_global.xext.randr.supported) {
|
if (w_global.xext.randr.supported)
|
||||||
int major, minor;
|
XRRSelectInput(dpy, scr->root_win, RRScreenChangeNotifyMask);
|
||||||
if (XRRQueryVersion(dpy, &major, &minor)) {
|
|
||||||
if (major >= 1 && minor >= 2)
|
|
||||||
XRRSelectInput(dpy, scr->root_win, RRCrtcChangeNotifyMask);
|
|
||||||
else
|
|
||||||
XRRSelectInput(dpy, scr->root_win, RRScreenChangeNotifyMask);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
|
|||||||
Reference in New Issue
Block a user