diff options
author | MC <mc@hack.org> | 2010-06-23 11:05:27 +0200 |
---|---|---|
committer | MC <mc@hack.org> | 2010-06-23 11:05:27 +0200 |
commit | 9fcef0c50ba3e655419f3ebf8d876b342c91ed07 (patch) | |
tree | 6b03044383483f919377273b9086f843c0c6e2ad /mcwm.c | |
parent | 4317af28e5711fd59de2921e28b9789e58afb732 (diff) | |
download | mcwm-9fcef0c50ba3e655419f3ebf8d876b342c91ed07.zip |
Handle a request to set border width, but only set it to BORDERWIDTH.
Handle setting of sibling.
Handle stacking order request.
Diffstat (limited to 'mcwm.c')
-rw-r--r-- | mcwm.c | 36 |
1 files changed, 21 insertions, 15 deletions
@@ -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) |