]> git.corax.cc Git - mwm/commitdiff
mwm: Always set the border width
authorMatthias Kruk <m@m10k.eu>
Wed, 9 Jun 2021 23:16:23 +0000 (08:16 +0900)
committerMatthias Kruk <m@m10k.eu>
Wed, 9 Jun 2021 23:16:23 +0000 (08:16 +0900)
The border width is not set in _mwm_configure_request() if the client
did not request a specific border width. That means that clients that
leave their border width unspecified will end up with the default
border width (which is not zero).
This commit modifies _mwm_configure_request() to always set the
border width of a client to 0.

mwm.c

diff --git a/mwm.c b/mwm.c
index 11ca98bdeafd8aa243582df4b34bedb90a20871b..52ebe68f19a40e4b36e903d4d3c16e21ff608ae5 100644 (file)
--- a/mwm.c
+++ b/mwm.c
@@ -179,6 +179,7 @@ static void _mwm_configure_request(struct mwm *mwm, XEvent *event)
        if(mwm_find_client(mwm, FIND_CLIENT_BY_WINDOW,
                           &configure_request->window, &client) < 0) {
                XWindowChanges changes;
+               unsigned int value_mask;
 
                /* no client associated with that window */
 
@@ -189,9 +190,10 @@ static void _mwm_configure_request(struct mwm *mwm, XEvent *event)
                changes.border_width = 0; /* TODO: make border width configurable */
                changes.sibling = configure_request->above;
                changes.stack_mode = configure_request->detail;
+               value_mask = configure_request->value_mask | CWBorderWidth;
 
                XConfigureWindow(mwm->display, configure_request->window,
-                                configure_request->value_mask, &changes);
+                                value_mask, &changes);
        } else {
                struct geom requested_geom;
 
@@ -221,6 +223,7 @@ static void _mwm_configure_request(struct mwm *mwm, XEvent *event)
                }
 
                client_change_geometry(client, &requested_geom);
+               client_set_state(client, NormalState);
        }
 
        XSync(mwm->display, False);