remove some old checking because we're not using window properties to store the premax/fullscreen areas. they are always set when the state is turned on.

fullscreen to the correct monitor.
This commit is contained in:
Dana Jansens 2007-05-14 00:07:38 +00:00
parent 83bd9e1d5a
commit 1eff22b1ef

View file

@ -2822,28 +2822,21 @@ void client_fullscreen(ObClient *self, gboolean fs)
self->pre_fullscreen_area.height = self->pre_max_area.height; self->pre_fullscreen_area.height = self->pre_max_area.height;
} }
/* these are not actually used cuz client_configure will set them /* these will help configure_full figure out where to fullscreen
as appropriate when the window is fullscreened */ the window */
x = y = w = h = 0; x = self->area.x;
y = self->area.y;
w = self->area.width;
h = self->area.height;
} else { } else {
Rect *a; g_assert(self->pre_fullscreen_area.width > 0 &&
self->pre_fullscreen_area.height > 0);
if (self->pre_fullscreen_area.width > 0 && x = self->pre_fullscreen_area.x;
self->pre_fullscreen_area.height > 0) y = self->pre_fullscreen_area.y;
{ w = self->pre_fullscreen_area.width;
x = self->pre_fullscreen_area.x; h = self->pre_fullscreen_area.height;
y = self->pre_fullscreen_area.y; RECT_SET(self->pre_fullscreen_area, 0, 0, 0, 0);
w = self->pre_fullscreen_area.width;
h = self->pre_fullscreen_area.height;
RECT_SET(self->pre_fullscreen_area, 0, 0, 0, 0);
} else {
/* pick some fallbacks... */
a = screen_area_monitor(self->desktop, 0);
x = a->x + a->width / 4;
y = a->y + a->height / 4;
w = a->width / 2;
h = a->height / 2;
}
} }
client_setup_decor_and_functions(self); client_setup_decor_and_functions(self);
@ -2939,8 +2932,8 @@ void client_maximize(ObClient *self, gboolean max, gint dir)
if (dir == 2 && !self->max_vert) return; if (dir == 2 && !self->max_vert) return;
} }
/* we just tell it to configure in the same place and client_configure /* these will help configure_full figure out which screen to fill with
worries about filling the screen with the window */ the window */
x = self->area.x; x = self->area.x;
y = self->area.y; y = self->area.y;
w = self->area.width; w = self->area.width;
@ -2958,34 +2951,23 @@ void client_maximize(ObClient *self, gboolean max, gint dir)
self->pre_max_area.width, self->area.height); self->pre_max_area.width, self->area.height);
} }
} else { } else {
Rect *a;
a = screen_area_monitor(self->desktop, 0);
if ((dir == 0 || dir == 1) && self->max_horz) { /* horz */ if ((dir == 0 || dir == 1) && self->max_horz) { /* horz */
if (self->pre_max_area.width > 0) { g_assert(self->pre_max_area.width > 0);
x = self->pre_max_area.x;
w = self->pre_max_area.width;
RECT_SET(self->pre_max_area, 0, self->pre_max_area.y, x = self->pre_max_area.x;
0, self->pre_max_area.height); w = self->pre_max_area.width;
} else {
/* pick some fallbacks... */ RECT_SET(self->pre_max_area, 0, self->pre_max_area.y,
x = a->x + a->width / 4; 0, self->pre_max_area.height);
w = a->width / 2;
}
} }
if ((dir == 0 || dir == 2) && self->max_vert) { /* vert */ if ((dir == 0 || dir == 2) && self->max_vert) { /* vert */
if (self->pre_max_area.height > 0) { g_assert(self->pre_max_area.height > 0);
y = self->pre_max_area.y;
h = self->pre_max_area.height;
RECT_SET(self->pre_max_area, self->pre_max_area.x, 0, y = self->pre_max_area.y;
self->pre_max_area.width, 0); h = self->pre_max_area.height;
} else {
/* pick some fallbacks... */ RECT_SET(self->pre_max_area, self->pre_max_area.x, 0,
y = a->y + a->height / 4; self->pre_max_area.width, 0);
h = a->height / 2;
}
} }
} }