From 27fa3f78c67d94c33602fa51ba4b3c73c7ef125f Mon Sep 17 00:00:00 2001 From: Window Maker Date: Sun, 24 May 2026 08:57:55 +0200 Subject: [PATCH] arch: drop USE_XINERAMA guards from shared src/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Multi-head support comes through WScreen.heads[] (populated by the backend's screen_open) and the wGetRectForHead / wGetUsableAreaForHead helpers — both backend-agnostic. The USE_XINERAMA #ifdefs in shared src/ were a build-time toggle for X11-extension presence and did not belong in policy code. Strip the guards in: src/wmspec.c _NET_WM_FULLSCREEN_MONITORS atom now unconditional. src/actions.c wFullscreenMonitorsWindow now unconditional. src/dialog.c About-dialog 'Xinerama: N head(s) found' string now unconditional. (The string still references the X11 extension by name; on Wayland this is somewhat misleading but cosmetic — proper fix would route 'About' info through the backend.) USE_XINERAMA remains in src/backend/x11/x11_monitor.c, where it correctly gates the Xinerama-extension code at build time. The configure --enable-xinerama option is unchanged. --- src/actions.c | 2 -- src/dialog.c | 2 -- src/wmspec.c | 14 -------------- 3 files changed, 18 deletions(-) diff --git a/src/actions.c b/src/actions.c index 5bb2e98..ec8d48b 100644 --- a/src/actions.c +++ b/src/actions.c @@ -972,7 +972,6 @@ void wUnmaximizeWindow(WWindow *wwin) WMPostNotificationName(WMNChangedState, wwin, "maximize"); } -#ifdef USE_XINERAMA void wFullscreenMonitorsWindow(WWindow *wwin, unsigned long top, unsigned long bottom, unsigned long left, unsigned long right) { @@ -1021,7 +1020,6 @@ void wFullscreenMonitorsWindow(WWindow *wwin, unsigned long top, unsigned long b WMPostNotificationName(WMNChangedState, wwin, "fullscreen"); } -#endif void wFullscreenWindow(WWindow *wwin) { diff --git a/src/dialog.c b/src/dialog.c index b2b5992..db8841e 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -1440,7 +1440,6 @@ void wShowInfoPanel(WScreen *scr) strbuf = wstrappend(strbuf, ", ImageMagick"); #endif -#ifdef USE_XINERAMA strbuf = wstrappend(strbuf, _("\n")); #ifdef SOLARIS_XINERAMA strbuf = wstrappend(strbuf, _("Solaris ")); @@ -1451,7 +1450,6 @@ void wShowInfoPanel(WScreen *scr) snprintf(tmp, sizeof(tmp) - 1, _("%d head(s) found"), scr->head_count); strbuf = wstrappend(strbuf, tmp); } -#endif #ifdef USE_RANDR strbuf = wstrappend(strbuf, _("\n")); diff --git a/src/wmspec.c b/src/wmspec.c index 9980f17..810e89d 100644 --- a/src/wmspec.c +++ b/src/wmspec.c @@ -75,9 +75,7 @@ static Atom net_wm_visible_name; /* TODO (unnecessary?) */ static Atom net_wm_icon_name; static Atom net_wm_visible_icon_name; /* TODO (unnecessary?) */ static Atom net_wm_desktop; -#ifdef USE_XINERAMA static Atom net_wm_fullscreen_monitors; -#endif static Atom net_wm_window_type; static Atom net_wm_window_type_desktop; static Atom net_wm_window_type_dock; @@ -162,9 +160,7 @@ static atomitem_t atomNames[] = { {"_NET_WM_ICON_NAME", &net_wm_icon_name}, {"_NET_WM_VISIBLE_ICON_NAME", &net_wm_visible_icon_name}, {"_NET_WM_DESKTOP", &net_wm_desktop}, -#ifdef USE_XINERAMA {"_NET_WM_FULLSCREEN_MONITORS", &net_wm_fullscreen_monitors}, -#endif {"_NET_WM_WINDOW_TYPE", &net_wm_window_type}, {"_NET_WM_WINDOW_TYPE_DESKTOP", &net_wm_window_type_desktop}, {"_NET_WM_WINDOW_TYPE_DOCK", &net_wm_window_type_dock}, @@ -291,9 +287,7 @@ static void setSupportedHints(WScreen *scr) atom[i++] = net_wm_moveresize; #endif atom[i++] = net_wm_desktop; -#ifdef USE_XINERAMA atom[i++] = net_wm_fullscreen_monitors; -#endif atom[i++] = net_wm_window_type; atom[i++] = net_wm_window_type_desktop; atom[i++] = net_wm_window_type_dock; @@ -1040,9 +1034,7 @@ static void updateStateHint(WWindow *wwin, Bool changedWorkspace, Bool del) { /* changeable */ if (del) { XDeleteProperty(dpy, wwin->client_win, net_wm_state); -#ifdef USE_XINERAMA XDeleteProperty(dpy, wwin->client_win, net_wm_fullscreen_monitors); -#endif } else { Atom state[15]; /* nr of defined state atoms */ int i = 0; @@ -1084,7 +1076,6 @@ static void updateStateHint(WWindow *wwin, Bool changedWorkspace, Bool del) XChangeProperty(dpy, wwin->client_win, net_wm_state, WA_ATOM, 32, PropModeReplace, (unsigned char *)state, i); -#ifdef USE_XINERAMA if (wwin->flags.fullscreen && (wwin->flags.fullscreen_monitors[0] != -1)) { unsigned long data[4]; @@ -1096,7 +1087,6 @@ static void updateStateHint(WWindow *wwin, Bool changedWorkspace, Bool del) XChangeProperty(dpy, wwin->client_win, net_wm_fullscreen_monitors, WA_CARDINAL, 32, PropModeReplace, (unsigned char *)data, 4); } -#endif } } @@ -1817,7 +1807,6 @@ Bool wNETWMProcessClientMessage(XClientMessageEvent *event) } return True; -#ifdef USE_XINERAMA } else if (event->message_type == net_wm_fullscreen_monitors) { unsigned long top, bottom, left, right, src_indication; @@ -1833,9 +1822,6 @@ Bool wNETWMProcessClientMessage(XClientMessageEvent *event) wFullscreenMonitorsWindow(wwin, top, bottom, left, right); return True; } -#else - } -#endif #ifdef DEBUG_WMSPEC wmessage("processClientMessage unsupported type %s", XGetAtomName(dpy, event->message_type));