diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-04-27 17:24:51 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2010-04-28 12:58:46 -0400 |
| commit | b3023ac55b90d63cf8d5b21fb49a124f247f7e34 (patch) | |
| tree | c8ad947a60931aa860a95791098b70b7fa1e0364 /openbox/client.c | |
| parent | 145d526df4bccec222f0f6f99b3fde56a1dad4c0 (diff) | |
make sure clients stay on screen when the root window changes size, and maximized/fullscreen windows must be on some monitor or it doesn't make much sense (and asserts)
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/openbox/client.c b/openbox/client.c index 0a150fc3..8acbf841 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -3197,6 +3197,11 @@ void client_fullscreen(ObClient *self, gboolean fs) ob_debug("Window %s going fullscreen (%d)", self->title, self->fullscreen); + if (fs) { + /* make sure the window is on some monitor */ + client_find_onscreen(self, &x, &y, w, h, FALSE); + } + client_setup_decor_and_functions(self, FALSE); client_move_resize(self, x, y, w, h); @@ -3339,6 +3344,11 @@ void client_maximize(ObClient *self, gboolean max, gint dir) if (dir == 0 || dir == 2) /* vert */ self->max_vert = max; + if (max) { + /* make sure the window is on some monitor */ + client_find_onscreen(self, &x, &y, w, h, FALSE); + } + client_change_state(self); /* change the state hints on the client */ client_setup_decor_and_functions(self, FALSE); |
