From 47ed1dd9a27e059610e4b287550e73a2c1569826 Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Thu, 10 Jun 2021 08:16:23 +0900 Subject: [PATCH] mwm: Always set the border width 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mwm.c b/mwm.c index 11ca98b..52ebe68 100644 --- 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); -- 2.47.3