From 9fcef0c50ba3e655419f3ebf8d876b342c91ed07 Mon Sep 17 00:00:00 2001 From: MC Date: Wed, 23 Jun 2010 11:05:27 +0200 Subject: Handle a request to set border width, but only set it to BORDERWIDTH. Handle setting of sibling. Handle stacking order request. --- mcwm.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'mcwm.c') diff --git a/mcwm.c b/mcwm.c index cf40a19..7de3294 100644 --- a/mcwm.c +++ b/mcwm.c @@ -1357,24 +1357,32 @@ void events(void) values[i] = e->height; } -#if 0 - /* Unsure. Do we allow this? */ + /* We handle a request to change the border width, but + * only change it to what we think is right. + */ + if (e->value_mask & XCB_CONFIG_WINDOW_BORDER_WIDTH) + { + PDEBUG("Changing width to %d, but not really.\n", + e->border_width); + mask |= XCB_CONFIG_WINDOW_BORDER_WIDTH; + i ++; + values[i] = BORDERWIDTH; + } + + if (e->value_mask & XCB_CONFIG_WINDOW_SIBLING) + { + mask |= XCB_CONFIG_WINDOW_SIBLING; + i ++; + values[i] = e->sibling; + } + if (e->value_mask & XCB_CONFIG_WINDOW_STACK_MODE) { PDEBUG("Changing stack order.\n"); mask |= XCB_CONFIG_WINDOW_STACK_MODE; i ++; values[i] = e->stack_mode; - break; } -#endif - - /* - * Still left to decide about: - * - * XCB_CONFIG_WINDOW_SIBLING - * XCB_CONFIG_WINDOW_BORDER_WIDTH - */ if (-1 != i) { @@ -1396,7 +1404,6 @@ void events(void) * Just do what was requested, e->place is either * XCB_PLACE_ON_TOP or _ON_BOTTOM. We don't care. */ - xcb_circulate_window(conn, e->window, e->place); } @@ -1410,10 +1417,9 @@ void events(void) void printhelp(void) { - printf("mcwm: Usage: mcwm [-b] [-t /path/to/terminal]\n"); + printf("mcwm: Usage: mcwm [-b] [-t terminal-program]\n"); printf(" -b means draw no borders\n"); - printf(" -t /usr/local/bin/urxvt will start urxvt when MODKEY + Return " - "is pressed\n"); + printf(" -t urxvt will start urxvt when MODKEY + Return is pressed\n"); } int main(int argc, char **argv) -- cgit v1.2.3