This is an automated email generated because a ref change occurred in the
git repository for project wmaker-crm.git.
The branch, master has been updated
via 3579c85af1a44458081867957091db8d685199b8 (commit)
from 896bbce2e5d4935bee402ac6080d9c8d416c7f28 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3579c85af1a44458081867957091db8d685199b8
Author: David Maciejak <
david.m...@gmail.com>
Date: Wed, 24 Dec 2025 06:47:33 -0500
URL: <
https://repo.or.cz/wmaker-crm.git/3579c85af1a44458>
Prevent unnecessary RandR wmaker restart
As reported in bug
https://github.com/window-maker/wmaker/issues/34
when RandR is enabled, everytime a monitor is turned on or off wmaker is restarting
(that happens either manually or automatically with DPMS).
This behavior causes issues with xscreensaver.
How to reproduce the issue:
-install xscreensaver and lock the screen
-turn off then on the monitor manually
-you can see that wmaker was restarted and behind the xscreensaver lock window,
the desktop appears, potentially leaking information
Instead of using the RandR event RRScreenChangeNotifyMask which is too generic,
the patch is using RRCrtcChangeNotifyMask defined since RandR 1.2 (released in 2007).
In the recent RandR version, events for output (hardware) changes are propagated via
RROutputChangeNotifyMask while layout changes (like position, size, rotation)
are propagated via RRCrtcChangeNotifyMask.
The patch is purposedly not listening for RROutputChangeNotifyMask,
thus wmaker is not restarting on DPMS events anymore.
Currently, in case a new monitor is added (or removed) wmaker is not discovering it anyway
even after an automatic restart.
Either, wmaker has to be exited and restarted fully or an external tool like arandr
has to be used to configure the new monitor. So after the patch functionality remains unchanged.
---
src/event.c | 20 ++++++++++++--------
src/screen.c | 11 +++++++++--
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/src/event.c b/src/event.c
index 67d300988da0..3b93ffee8f3f 100644
--- a/src/event.c
+++ b/src/event.c
@@ -575,14 +575,18 @@ static void handleExtensions(XEvent * event)
}
#endif /*KEEP_XKB_LOCK_STATUS */
#ifdef USE_RANDR
- if (w_global.xext.randr.supported && event->type == (w_global.xext.randr.event_base + RRScreenChangeNotify)) {
- /* From xrandr man page: "Clients must call back into Xlib using
- * XRRUpdateConfiguration when screen configuration change notify
- * events are generated */
- XRRUpdateConfiguration(event);
- WCHANGE_STATE(WSTATE_RESTARTING);
- Shutdown(WSRestartPreparationMode);
- Restart(NULL,True);
+ if (w_global.xext.randr.supported) {
+ int base = w_global.xext.randr.event_base;
+ if (event->type == base + RRScreenChangeNotify ||
+ (event->type == base + RRNotify && ((XRRNotifyEvent*)event)->subtype == RRNotify_CrtcChange)) {
+ /* From xrandr man page: "Clients must call back into Xlib using
+ * XRRUpdateConfiguration when screen configuration change notify
+ * events are generated */
+ XRRUpdateConfiguration(event);
+ WCHANGE_STATE(WSTATE_RESTARTING);
+ Shutdown(WSRestartPreparationMode);
+ Restart(NULL,True);
+ }
}
#endif
}
diff --git a/src/screen.c b/src/screen.c
index 3a2fd3b7518d..59fc8aa91c8d 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -669,8 +669,15 @@ WScreen *wScreenInit(int screen_number)
#endif /* KEEP_XKB_LOCK_STATUS */
#ifdef USE_RANDR
- if (w_global.xext.randr.supported)
- XRRSelectInput(dpy, scr->root_win, RRScreenChangeNotifyMask);
+ if (w_global.xext.randr.supported) {
+ int major, minor;
+ if (XRRQueryVersion(dpy, &major, &minor)) {
+ if (major >= 1 && minor >= 2)
+ XRRSelectInput(dpy, scr->root_win, RRCrtcChangeNotifyMask);
+ else
+ XRRSelectInput(dpy, scr->root_win, RRScreenChangeNotifyMask);
+ }
+ }
#endif
XSync(dpy, False);
-----------------------------------------------------------------------
Summary of changes:
src/event.c | 20 ++++++++++++--------
src/screen.c | 11 +++++++++--
2 files changed, 21 insertions(+), 10 deletions(-)
repo.or.cz automatic notification. Contact project admin
crm...@gmail.com
if you want to unsubscribe, or site admin
ad...@repo.or.cz if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")