Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 21DC585015 for ; Fri, 3 Nov 2023 08:14:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id N7hXAciwUiXk for ; Fri, 3 Nov 2023 08:14:11 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 3BCE184D31 for ; Fri, 3 Nov 2023 08:14:11 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 2F651FA2B; Fri, 3 Nov 2023 08:14:11 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_169899925141720" MIME-Version: 1.0 Date: Fri, 3 Nov 2023 08:14:11 +0000 From: "pin" Subject: CVS commit: pkgsrc/wm/spectrwm To: pkgsrc-changes@NetBSD.org Approved: commit_and_comment Reply-To: pin@netbsd.org X-Mailer: log_accum Message-Id: <20231103081411.2F651FA2B@cvs.NetBSD.org> This is a multi-part message in MIME format. --_----------=_169899925141720 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: pin Date: Fri Nov 3 08:14:11 UTC 2023 Modified Files: pkgsrc/wm/spectrwm: Makefile distinfo Added Files: pkgsrc/wm/spectrwm/patches: patch-spectrwm.c Log Message: wm/spectrwm: update to 3.5.0 spectrwm 3.5.0 ============== Released on Oct 22, 2023 Includes a bunch of major new features and improvements, such as dock/panel support, an always mapped window mode, floating workspace layout, transparent color support, tons of fixes, and more! * Add *free* window mode. - *free* windows are floating windows that are not in a workspace. They remain mapped and may be resized, positioned and stacked anywhere. When iconified, they appear at the end of the uniconify menu. Note that free windows can be stacked above/below workspace windows but must be put into a workspace and unfloated to be part of its tiling layout. `float_toggle` is convenient for this purpose. - Add `free_toggle` action (default: `M-S-grave`). Toggle focused window between workspace mode and free mode. - Add `focus_free` action (default: `M-grave`). Switch focus to/from windows in free mode, if any. - Add related color and focus mark options. * Improve EWMH (Extended Window Manager Hints) support. - Add support for docks/panels and desktop managers. - Add strut support for windows (e.g. panels) to automatically reserve screen real estate. - Add support for applications to initiate move/resize operations. - Add *demands attention* support to urgency features to include windows that request focus but are denied. - Add support for *below* state to keep windows stacked below others. - Improve _NET_ACTIVE_WINDOW handling. - Fix _NET_DESKTOP_VIEWPORT should update on workspace and region changes. * Improve window stacking. - Overhaul window stacking for improved reliability and flexibility required for new features/fixes. Windows are now stacked as a whole instead of per region/workspace. - Add `click_to_raise` option (default: `1` (enabled)). Raises stacking priority when clicking on a window. - Add `below_toggle` action (default: `M-S-t`). Toggles *below* state on a focused window to keep it below other windows. `raise` can be used to temporarily bring a window above all others. - Fix `raise` and `always_raise` stacking issues. - Fix follow mode stacking issues. - Fix stacking order issues. - Restore stacking order after leaving fullscreen/maximized state. * Workaround application issues related to ICCCM 6.3 button grabs. - If X Input Extension >= 2.1 is available, handle button bindings with the `REPLAY` flag passively, without grabs. For other button bindings, establish grabs on root. - Otherwise, for compatibility, establish all button binding grabs directly on client windows. * Add alpha transparent color support for use with compositing managers. Colors can now be specified with an alpha component via the format `rbga:rr/gg/bb/aa` (values in hex.) * Improve bar fonts. - Fallback to a "fail-safe" font if the default/user `bar_font` fails to load. - Add fallback handling for missing glyphs when using multiple fonts with Xft. - Add supplementary private-use code points to `bar_font_pua`. - Fix `$bar_font` program variable substitution should not include fallbacks. * Improve window mapping. - Add `maximize_hide_other` and `fullscreen_hide_other` options. When a maximized/fullscreen window is focused, hide unrelated windows on the same workspace. Useful for transparent windows. - Fix window mapping issue when handling simultaneous screen changes. - Improve reliability. * Improve (re)start handling. - Set intial focus more reliably. - Focus on fullscreen/maximized windows before main. - Restore window floating geometry on shutdown. * Improve focus handling. - Add `prior` setting to `focus_close`. When the focused window is closed, fallback to the last focused window in the workspace. - Add `focus_prior` action. Focus last focused window on workspace. (Default binding: `M-S-a`.) - Improve previous focus fallback. - Fix iconified window focus issue. - Fix input focus fallback. - Fix setting focus with EWMH should unmaximize other windows. - Fix move/resize operation should abort on focus loss. - Fix `focus_main` issue with iconified/floating windows. - Fix max layout focus issue when closing transients. - Fix `warp_pointer` issues. * Improve focus follow mode. - Fix handling of ConfigureWindow and EWMH requests. - Fix workspace switching issues. * Improve status bar. - Add character sequence for workspace list indicator (+L). - Add workspace mark options for the workspace indicator (+L). - Add stack mark options for the stacking indicator (+S). - Add focus mark options for the focus status indicator (+F). - Add character sequence for number of windows in workspace (+w) (lowercase). - Add unfocused options to color bar text and background. - Add color options for when a window in free mode is focused. - Fix `bar_action` piping deadlock issue. - Fix `name_workspace` should clear on empty string. - Fix refresh bar on `name_workspace`. - Set WM_CLASS, WM_NAME and _NET_WM_NAME on the bar window. * Add `floating` workspace layout stacking mode. - In floating layout, windows are not tiled and may be freely moved around and resized. - Add `stack_mark_floating` option for the stacking indicator (default:` '[~]'`). - Add `layout_floating` action (default: unbound). Directly switch to floating layout. - Add `floating` `stack_mode` to the `layout` option. * Improve max layout. - Allow windows to be unmaximized/floated in max layout. - Add `max_layout_maximize` option to configure default maximized state. - Allow floating windows to remain floating when dragged between regions into a max layout workspace. * Improve window handling. - Add *snap* behavior when dragging tiled/maximized windows. Prevents accidentally floating tiled windows. - Add `snap_distance` option (default 25). Sets the pixel distance a tiled/maximized window must be dragged (with the pointer) to make it float and move freely. Set to 0 to unsnap/float immediately. - Add `maximized_unfocus` and `fullscreen_unfocus` options. Configures handling of maximized/fullscreen windows that lose focus. - Add support for ICCCM `WM_CHANGE_STATE` ClientMessage. Enables applications to iconify their own windows. - Add support for window gravity. Improves floating window positioning by applications. - Disable border on maximized windows when `disable_border = always`. - Add window titles to `search_win`. - Fix maximize handling. - Fix handling when a window is lost immediately after ReparentWindow. - Fix Java workaround. * Improve workspace handling. - Add `workspace_autorotate` option. When switching workspaces between regions, automatically "rotate" vertical/horizontal layouts based on RandR rotation data. - Add `prior_layout` action. Switch to the last used layout. (Unbound by default.) - Add optional rotation argument to `region` option. - Fix ws cycle actions should skip visible workspaces. - Add `cycle_visible` option to the man page and example conf. * Improve debugging. - Add `-d` command-line option to enable debug mode. Enables debug mode actions and logging to *stderr* without the need to rebuild with `-DSWM_DEBUG`. - Add multi-line support to `debug_toggle` overlay (default: M-d). - Add atom name cache to avoid redundant requests/syncs when printing output. * Fix X connection error handling to exit on a failed connection. * Fix build issues. - Fix compile error when building against musl. - Fix build with clang 16 on Linux. * Improve OpenBSD `pledge(2)` support. - Add "wpath" pledge for sparc64 support - Simplify usage. * Improve Linux Makefile. * Improve manual and examples. - Add details to `modkey` option in man page. - Add stack modes and window states to man page. - Fix incorrect key binding for `ws_6` in spectrwm_fr.conf. - Fix man page `wmctrl(1)` examples. - Fix `iostat(8)` issue in example baraction.sh script for OpenBSD. - Update man page note regarding `dmenu(1)` Xft support. - Update example spectrwm.conf. - Update `keyboard_mapping` example configuration files. - Update html manual. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 pkgsrc/wm/spectrwm/Makefile cvs rdiff -u -r1.12 -r1.13 pkgsrc/wm/spectrwm/distinfo cvs rdiff -u -r0 -r1.3 pkgsrc/wm/spectrwm/patches/patch-spectrwm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_169899925141720 Content-Disposition: inline Content-Length: 12288 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/wm/spectrwm/Makefile diff -u pkgsrc/wm/spectrwm/Makefile:1.19 pkgsrc/wm/spectrwm/Makefile:1.20 --- pkgsrc/wm/spectrwm/Makefile:1.19 Sun Jan 29 21:18:01 2023 +++ pkgsrc/wm/spectrwm/Makefile Fri Nov 3 08:14:10 2023 @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.19 2023/01/29 21:18:01 ryoon Exp $ +# $NetBSD: Makefile,v 1.20 2023/11/03 08:14:10 pin Exp $ -DISTNAME= spectrwm-3.4.1 -PKGREVISION= 2 +DISTNAME= spectrwm-3.5.0 CATEGORIES= wm MASTER_SITES= ${MASTER_SITE_GITHUB:=conformal/} GITHUB_TAG= ${GITHUB_PROJECT:tu}_${PKGVERSION_NOREV:S/./_/g} @@ -60,4 +59,6 @@ BUILDLINK_DEPMETHOD.libXt= build .include "../../x11/xcb-util/buildlink3.mk" .include "../../x11/xcb-util-keysyms/buildlink3.mk" .include "../../x11/xcb-util-wm/buildlink3.mk" +.include "../../fonts/fontconfig/buildlink3.mk" +.include "../../graphics/freetype2/buildlink3.mk" .include "../../mk/bsd.pkg.mk" Index: pkgsrc/wm/spectrwm/distinfo diff -u pkgsrc/wm/spectrwm/distinfo:1.12 pkgsrc/wm/spectrwm/distinfo:1.13 --- pkgsrc/wm/spectrwm/distinfo:1.12 Tue Oct 26 11:25:18 2021 +++ pkgsrc/wm/spectrwm/distinfo Fri Nov 3 08:14:10 2023 @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.12 2021/10/26 11:25:18 nia Exp $ +$NetBSD: distinfo,v 1.13 2023/11/03 08:14:10 pin Exp $ -BLAKE2s (spectrwm-3.4.1.tar.gz) = 984f05c0bd03da9772b156a0c3f653d8ad951655c223d6cb41bb0f4fd481e7f1 -SHA512 (spectrwm-3.4.1.tar.gz) = 94d468833124b51fa12b29b173126f10f27dd551d599459e4bea589721b3df6f1f0af0ea67326ed3ad462e1203d3bbcb82032ff83abfa0943ec45afd29dedaa6 -Size (spectrwm-3.4.1.tar.gz) = 164507 bytes +BLAKE2s (spectrwm-3.5.0.tar.gz) = 1a593fbba884a33dfb43ca7e4a974c41b4350b6c1d83cbd629ae4a5faf842e33 +SHA512 (spectrwm-3.5.0.tar.gz) = a4cc86710b9367d8c39b8d22cd315db32a3e69bdcb9092620779fa17d660a8433aef3624708d6f348891eae08e07defa03eaa022ff4cce7a5f9f43cfe388af8e +Size (spectrwm-3.5.0.tar.gz) = 194387 bytes +SHA1 (patch-spectrwm.c) = 720b61c20e75586863482690b2a1e463aa75be96 Added files: Index: pkgsrc/wm/spectrwm/patches/patch-spectrwm.c diff -u /dev/null pkgsrc/wm/spectrwm/patches/patch-spectrwm.c:1.3 --- /dev/null Fri Nov 3 08:14:11 2023 +++ pkgsrc/wm/spectrwm/patches/patch-spectrwm.c Fri Nov 3 08:14:10 2023 @@ -0,0 +1,338 @@ +$NetBSD: patch-spectrwm.c,v 1.3 2023/11/03 08:14:10 pin Exp $ + +Fix NetBSD build issues. +See commit 624b67f32723ab600cbc272e9199cadd66659825 + +--- spectrwm.c.orig 2023-10-22 07:58:36.000000000 +0000 ++++ spectrwm.c +@@ -63,6 +63,9 @@ + #else + #include + #endif ++#if defined(__NetBSD__) ++#include ++#endif + #include + #include + #include +@@ -74,7 +77,8 @@ + #include + #include + #include +-#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ ++ defined(__NetBSD__) + #include + #define SWM_XCB_HAS_XINPUT + #endif +@@ -1713,6 +1717,7 @@ void stack_master(struct workspace *, s + static void update_layout(struct swm_screen *); + void store_float_geom(struct ws_win *); + char *strdupsafe(const char *); ++static int32_t strtoint32(const char *, int32_t, int32_t, int *); + void swapwin(struct swm_screen *, struct binding *, union arg *); + void switch_workspace(struct swm_region *, struct workspace *, bool); + void switchlayout(struct swm_screen *, struct binding *, union arg *); +@@ -5188,7 +5193,7 @@ bar_setup(struct swm_region *r) + + r->bar->r = r; + X(r->bar) = X(r) + bar_border_width; +- Y(r->bar) = bar_at_bottom ? (Y(r) + HEIGHT(r) - bar_height - ++ Y(r->bar) = bar_at_bottom ? (Y(r) + HEIGHT(r) - bar_height + + bar_border_width) : Y(r) + bar_border_width; + WIDTH(r->bar) = WIDTH(r) - 2 * bar_border_width; + HEIGHT(r->bar) = bar_height - 2 * bar_border_width; +@@ -8725,7 +8730,7 @@ get_win_name(xcb_window_t win) + name = strdup(""); + + if (name == NULL) +- err(1, "get_win_name: failed to allocate memory."); ++ err(1, "get_win_name: strdup"); + + free(r); + +@@ -9323,8 +9328,7 @@ search_resp_search_workspace(const char + { + struct workspace *ws; + char *p, *q; +- int ws_idx; +- const char *errstr; ++ int ws_idx, fail; + + DNPRINTF(SWM_D_MISC, "resp: %s\n", resp); + +@@ -9336,9 +9340,9 @@ search_resp_search_workspace(const char + p = strchr(q, ':'); + if (p != NULL) + *p = '\0'; +- ws_idx = (int)strtonum(q, 1, workspace_limit, &errstr) - 1; +- if (errstr) { +- DNPRINTF(SWM_D_MISC, "workspace idx is %s: %s", errstr, q); ++ ws_idx = strtoint32(q, 1, workspace_limit, &fail) - 1; ++ if (fail) { ++ DNPRINTF(SWM_D_MISC, "integer conversion failed for %s\n", q); + free(q); + return; + } +@@ -9353,8 +9357,7 @@ void + search_resp_search_window(const char *resp) + { + char *s, *p; +- int idx; +- const char *errstr; ++ int idx, fail; + struct search_window *sw; + + DNPRINTF(SWM_D_MISC, "resp: %s\n", resp); +@@ -9367,9 +9370,9 @@ search_resp_search_window(const char *re + p = strchr(s, ':'); + if (p != NULL) + *p = '\0'; +- idx = (int)strtonum(s, 1, INT_MAX, &errstr); +- if (errstr) { +- DNPRINTF(SWM_D_MISC, "window idx is %s: %s", errstr, s); ++ idx = strtoint32(s, 1, INT_MAX, &fail); ++ if (fail) { ++ DNPRINTF(SWM_D_MISC, "integer conversion failed for %s\n", s); + free(s); + return; + } +@@ -12046,6 +12049,7 @@ get_input_event_label(xcb_ge_generic_eve + + return (label); + } ++#endif /* SWM_XCB_HAS_XINPUT */ + + #if defined(SWM_XCB_HAS_XINPUT) && defined(XCB_INPUT_RAW_BUTTON_PRESS) + void +@@ -13153,7 +13157,7 @@ setconfcolorlist(const char *selector, c + + num_bg_colors = 0; + while ((b = strsep(&sp, SWM_CONF_DELIMLIST)) != NULL) { +- while (isblank(*b)) b++; ++ while (isblank((unsigned char)*b)) b++; + if (*b == '\0') + continue; + setconfcolor(selector, b, flags + num_bg_colors, emsg); +@@ -13171,7 +13175,7 @@ setconfcolorlist(const char *selector, c + + num_fg_colors = 0; + while ((b = strsep(&sp, SWM_CONF_DELIMLIST)) != NULL) { +- while (isblank(*b)) b++; ++ while (isblank((unsigned char)*b)) b++; + if (*b == '\0') + continue; + setconfcolor(selector, b, flags + num_fg_colors, emsg); +@@ -13662,7 +13666,7 @@ conf_load(const char *filename, int keym + } + /* trim trailing spaces */ + ce = optval + strlen(optval) - 1; +- while (ce > optval && isspace(*ce)) ++ while (ce > optval && isspace((unsigned char)*ce)) + --ce; + *(ce + 1) = '\0'; + /* call function to deal with it all */ +@@ -13687,85 +13691,69 @@ conf_load(const char *filename, int keym + return (0); + } + ++static int32_t ++strtoint32(const char *str, int32_t min, int32_t max, int *fail) ++{ ++ int32_t ret; ++#if defined(__NetBSD__) ++ int e; ++ ++ ret = strtoi(str, NULL, 10, min, max, &e); ++ *fail = (e != 0); ++#else ++ const char *errstr; ++ ++ ret = strtonum(str, min, max, &errstr); ++ *fail = (errstr != NULL); ++#endif ++ return (ret); ++} ++ + pid_t + window_get_pid(xcb_window_t win) + { + pid_t ret = 0; +- const char *errstr; +- xcb_get_property_cookie_t pc; ++ int fail; + xcb_get_property_reply_t *pr; + +- pc = xcb_get_property(conn, 0, win, a_net_wm_pid, +- XCB_ATOM_CARDINAL, 0, 1); +- pr = xcb_get_property_reply(conn, pc, NULL); +- if (pr == NULL) +- goto tryharder; +- if (pr->type != XCB_ATOM_CARDINAL) { +- free(pr); +- goto tryharder; +- } +- +- if (pr->type == a_net_wm_pid && pr->format == 32) ++ pr = xcb_get_property_reply(conn, xcb_get_property(conn, 0, win, ++ a_net_wm_pid, XCB_ATOM_CARDINAL, 0, 1), NULL); ++ if (pr && pr->type == XCB_ATOM_CARDINAL && pr->format == 32) + ret = *((pid_t *)xcb_get_property_value(pr)); +- free(pr); +- +- return (ret); +- +-tryharder: +- pc = xcb_get_property(conn, 0, win, a_swm_pid, XCB_ATOM_STRING, +- 0, SWM_PROPLEN); +- pr = xcb_get_property_reply(conn, pc, NULL); +- if (pr == NULL) +- return (0); +- if (pr->type != a_swm_pid) { ++ else { /* tryharder */ + free(pr); +- return (0); ++ pr = xcb_get_property_reply(conn, xcb_get_property(conn, 0, win, ++ a_swm_pid, XCB_ATOM_STRING, 0, SWM_PROPLEN), NULL); ++ if (pr && pr->type == XCB_ATOM_STRING && pr->format == 8) { ++ ret = (pid_t)strtoint32(xcb_get_property_value(pr), 0, ++ INT32_MAX, &fail); ++ if (fail) ++ ret = 0; ++ } + } +- +- ret = (pid_t)strtonum(xcb_get_property_value(pr), 0, INT_MAX, &errstr); + free(pr); + ++ DNPRINTF(SWM_D_PROP, "pid: %d\n", ret); + return (ret); + } + + int + get_swm_ws(xcb_window_t id) + { +- int ws_idx = -2; +- char *prop = NULL; +- size_t proplen; +- const char *errstr; ++ int ws_idx = -2, fail; + xcb_get_property_reply_t *gpr; + +- gpr = xcb_get_property_reply(conn, +- xcb_get_property(conn, 0, id, a_swm_ws, +- XCB_ATOM_STRING, 0, SWM_PROPLEN), +- NULL); +- if (gpr == NULL) +- return (-1); +- if (gpr->type) { +- proplen = xcb_get_property_value_length(gpr); +- if (proplen > 0) { +- prop = malloc(proplen + 1); +- if (prop) { +- memcpy(prop, +- xcb_get_property_value(gpr), +- proplen); +- prop[proplen] = '\0'; +- } +- } ++ gpr = xcb_get_property_reply(conn, xcb_get_property(conn, 0, id, ++ a_swm_ws, XCB_ATOM_STRING, 0, SWM_PROPLEN), NULL); ++ if (gpr && gpr->type == XCB_ATOM_STRING && gpr->format == 8) { ++ ws_idx = strtoint32(xcb_get_property_value(gpr), -1, ++ workspace_limit - 1, &fail); ++ if (fail) ++ ws_idx = -2; + } + free(gpr); + +- if (prop) { +- DNPRINTF(SWM_D_PROP, "_SWM_WS: %s\n", prop); +- ws_idx = (int)strtonum(prop, -1, workspace_limit - 1, &errstr); +- if (errstr) { +- DNPRINTF(SWM_D_PROP, "win #%s: %s", errstr, prop); +- } +- free(prop); +- } +- ++ DNPRINTF(SWM_D_PROP, "_SWM_WS: %d\n", ws_idx); + return (ws_idx); + } + +@@ -13781,14 +13769,12 @@ get_ws_id(struct ws_win *win) + + gpr = xcb_get_property_reply(conn, xcb_get_property(conn, 0, win->id, + ewmh[_NET_WM_DESKTOP].atom, XCB_ATOM_CARDINAL, 0, 1), NULL); +- if (gpr) { +- if (gpr->type == XCB_ATOM_CARDINAL && gpr->format == 32) { +- val = *((uint32_t *)xcb_get_property_value(gpr)); +- DNPRINTF(SWM_D_PROP, "get _NET_WM_DESKTOP: %#x\n", val); +- wsid = (val == EWMH_ALL_DESKTOPS ? -1 : (int)val); +- } +- free(gpr); ++ if (gpr && gpr->type == XCB_ATOM_CARDINAL && gpr->format == 32) { ++ val = *((uint32_t *)xcb_get_property_value(gpr)); ++ DNPRINTF(SWM_D_PROP, "get _NET_WM_DESKTOP: %#x\n", val); ++ wsid = (val == EWMH_ALL_DESKTOPS ? -1 : (int)val); + } ++ free(gpr); + + if (wsid == -2 && !(win->quirks & SWM_Q_IGNORESPAWNWS)) + wsid = get_swm_ws(win->id); +@@ -13977,9 +13963,6 @@ manage_window(xcb_window_t id, int spawn + + free(gr); + +- TAILQ_INSERT_TAIL(&s->managed, win, manage_entry); +- s->managed_count++; +- + /* Select which X events to monitor and set border pixel color. */ + wa[0] = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_PROPERTY_CHANGE | + XCB_EVENT_MASK_STRUCTURE_NOTIFY; +@@ -14081,6 +14064,10 @@ manage_window(xcb_window_t id, int spawn + if (win->ws == NULL) + win->ws = s->r->ws; /* Failsafe. */ + ++ /* WS must be valid before adding to managed list. */ ++ TAILQ_INSERT_TAIL(&s->managed, win, manage_entry); ++ s->managed_count++; ++ + /* Set the _NET_WM_DESKTOP atom. */ + DNPRINTF(SWM_D_PROP, "set _NET_WM_DESKTOP: %d\n", win->ws->idx); + xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win->id, +@@ -14155,6 +14142,9 @@ manage_window(xcb_window_t id, int spawn + if (win->quirks & SWM_Q_ANYWHERE) + new_flags |= SWM_F_MANUAL; + ++ if (win->maxstackmax && ws_maxstack(win->ws)) ++ new_flags |= EWMH_F_MAXIMIZED; ++ + ewmh_apply_flags(win, new_flags); + ewmh_update_wm_state(win); + +@@ -15226,7 +15216,6 @@ get_mapping_notify_label(uint8_t request + + return (label); + } +-#endif + + void + mappingnotify(xcb_mapping_notify_event_t *e) +@@ -15474,7 +15463,7 @@ propertynotify(xcb_property_notify_event + + if (e->atom == XCB_ATOM_WM_CLASS || + e->atom == XCB_ATOM_WM_NAME) { +- if (win->ws && win->ws->r) ++ if (win->ws->r) + bar_draw(win->ws->r->bar); + } else if (e->atom == XCB_ATOM_WM_HINTS) { + get_wm_hints(win); +@@ -16636,7 +16625,7 @@ setup_extensions(void) + free(xiqvr); + } + } +-#endif ++#endif /* SWM_XCB_HAS_XINPUT */ + } + + void --_----------=_169899925141720--