a->x, a->x + a->width - 1,
a->y, a->y + a->height - 1,
a->x, a->x + a->width - 1);
+ g_free(a);
}
g_free(data);
}
static ObStackingLayer calc_layer(ObClient *self)
{
ObStackingLayer l;
+ Rect *monitor;
+
+ monitor = screen_physical_area_monitor(client_monitor(self));
if (self->type == OB_CLIENT_TYPE_DESKTOP)
l = OB_STACKING_LAYER_DESKTOP;
*/
(self->decorations == 0 &&
!(self->max_horz && self->max_vert) &&
- RECT_EQUAL(self->area,
- *screen_physical_area_monitor
- (client_monitor(self))))) &&
+ RECT_EQUAL(self->area, *monitor))) &&
(client_focused(self) || client_search_focus_tree(self)))
l = OB_STACKING_LAYER_FULLSCREEN;
else if (self->above) l = OB_STACKING_LAYER_ABOVE;
else if (self->below) l = OB_STACKING_LAYER_BELOW;
else l = OB_STACKING_LAYER_NORMAL;
+ g_free(monitor);
+
return l;
}
user = FALSE; /* ignore if the client can't be moved/resized when it
is fullscreening */
+
+ g_free(a);
} else if (self->max_horz || self->max_vert) {
Rect *a;
guint i;
dock->h += ob_rr_theme->obwidth * 2;
screen_update_areas();
+
+ g_free(a);
}
void dock_app_configure(ObDockApp *app, gint w, gint h)
RrPaint(p->a_text, p->text, textw, texth);
p->last_target = newtarget;
+
+ g_free(screen_area);
}
void focus_cycle_popup_show(ObClient *c, gboolean iconic_windows,
icon_popup_min_width(single_popup, POPUP_WIDTH);
icon_popup_max_width(single_popup, MAX(a->width/3, POPUP_WIDTH));
icon_popup_text_width(single_popup, popup.maxtextw);
+ g_free(a);
}
text = popup_get_name(c);
iconx = self->area.x + self->area.width / 2 + 32;
icony = a->y + a->width;
iconw = 64;
+ g_free(a);
} else {
iconx = self->client->icon_geometry.x;
icony = self->client->icon_geometry.y;
/* 1 second delay for the popup to show */
popup_delay_show(popup, G_USEC_PER_SEC, text);
g_free(text);
+ g_free(a);
} else {
popup_hide(popup);
}
*dx = MAX(*dx, a->x - x);
*dy = MAX(*dy, a->y - y);
}
+
+ g_free(a);
}
static void menu_entry_frame_render(ObMenuEntryFrame *self)
}
}
+ g_free(a);
+
menu_frame_render(self);
}
/* find the monitor the menu is on */
for (i = 0; i < screen_num_monitors; ++i) {
- Rect *a = screen_physical_area_monitor(i);
- if (RECT_CONTAINS(*a, x, y)) {
+ Rect a = screen_physical_area_monitor(i);
+ gboolean contains = RECT_CONTAINS(*a, x, y);
+ g_free(a);
+ if (contains) {
self->monitor = i;
break;
}
screen_pointer_pos(&px, &py);
- for (i = 0; i < screen_num_monitors; ++i) {
- if (RECT_CONTAINS(*screen_physical_area_monitor(i), px, py)) {
+ for (i = 0; i < screen_num_monitors; ++i) {
+ Rect *monitor = screen_physical_area_monitor(i);
+ gboolean contain = RECT_CONTAINS(*monitor, px, py);
+ g_free(monitor);
+ if (contain)
return screen_area_monitor(c->desktop, i, NULL);
- }
}
g_assert_not_reached();
}
screen_pointer_pos(&px, &py);
for (i = 0; i < screen_num_monitors; i++)
- if (RECT_CONTAINS(*screen_physical_area_monitor(i), px, py)) {
+ Rect *monitor = screen_physical_area_monitor(i);
+ gboolean contain = RECT_CONTAINS(*monitor, px, py);
+ g_free(monitor);
+ if (contain)
add_choice(choice, i);
ob_debug("placement adding choice %d for mouse pointer\n", i);
break;
popup_show_timeout(self);
}
}
+
+ g_free(area);
}
void popup_hide(ObPopup *self)