RECT_SET(self->area, self->session->x, self->session->y,
self->session->w, self->session->h);
self->positioned = TRUE;
- XResizeWindow(ob_display, self->window,
- self->session->w, self->session->h);
+ if (self->session->w > 0 && self->session->h > 0)
+ XResizeWindow(ob_display, self->window,
+ self->session->w, self->session->h);
self->desktop = (self->session->desktop == DESKTOP_ALL ?
self->session->desktop :
{
if (self->iconic) return FALSE;
else if (!(self->desktop == screen_desktop ||
- self->desktop == DESKTOP_ALL)) return FALSE;
+ self->desktop == DESKTOP_ALL)) return FALSE;
else if (client_normal(self) && screen_showing_desktop) return FALSE;
return TRUE;
h = self->area.height;
if (max) {
- if (savearea)
- self->pre_max_area = self->area;
+ if (savearea) {
+ if ((dir == 0 || dir == 1) && !self->max_horz) { /* horz */
+ RECT_SET(self->pre_max_area,
+ self->area.x, self->pre_max_area.y,
+ self->area.width, self->pre_max_area.height);
+ }
+ if ((dir == 0 || dir == 2) && !self->max_vert) { /* vert */
+ RECT_SET(self->pre_max_area,
+ self->pre_max_area.x, self->area.y,
+ self->pre_max_area.width, self->area.height);
+ }
+ }
} else {
Rect *a;
if (!self->frame->visible)
return FALSE;
- if (!((self->can_focus || self->focus_notify) &&
- (self->desktop == screen_desktop ||
- self->desktop == DESKTOP_ALL) &&
- !self->iconic))
+ if (!(self->can_focus || self->focus_notify))
return FALSE;
/* do a check to see if the window has already been unmapped or destroyed
for (it = stacking_list; it != NULL; it = it->next) {
if (WINDOW_IS_CLIENT(it->data)) {
ObClient *c = WINDOW_AS_CLIENT(it->data);
- if (c->desktop == screen_desktop &&
+ if (c->frame->visible &&
RECT_CONTAINS(c->frame->area, x, y)) {
ret = c;
break;