From: Benoit Gschwind Date: Thu, 21 Feb 2008 19:27:22 +0000 (+0100) Subject: Rename render_engine to frame_engine X-Git-Tag: plugin~15 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=f0b1400e12c0aced9b38ab6c02b1791a3d3bfc32;p=dana%2Fopenbox.git Rename render_engine to frame_engine --- diff --git a/openbox/actions/moveresizeto.c b/openbox/actions/moveresizeto.c index faeeb0fe..a41fcfb4 100644 --- a/openbox/actions/moveresizeto.c +++ b/openbox/actions/moveresizeto.c @@ -126,8 +126,8 @@ static gboolean run_func(ObActionsData *data, gpointer options) y = c->area.y; client_try_configure(c, &x, &y, &w, &h, &lw, &lh, TRUE); - Strut c_size = render_plugin->frame_get_size(c->frame); - Rect c_area = render_plugin->frame_get_window_area(c->frame); + Strut c_size = frame_engine->frame_get_size(c->frame); + Rect c_area = frame_engine->frame_get_window_area(c->frame); /* get the frame's size */ w += c_size.left + c_size.right; h += c_size.top + c_size.bottom; diff --git a/openbox/actions/resize.c b/openbox/actions/resize.c index 3590c1d1..f46c0c4b 100644 --- a/openbox/actions/resize.c +++ b/openbox/actions/resize.c @@ -67,8 +67,8 @@ static gboolean run_func(ObActionsData *data, gpointer options) ObClient *c = data->client; guint32 corner; - Strut c_size = render_plugin->frame_get_size(c->frame); - Rect c_area = render_plugin->frame_get_window_area(c->frame); + Strut c_size = frame_engine->frame_get_size(c->frame); + Rect c_area = frame_engine->frame_get_window_area(c->frame); if (!data->button) corner = OBT_PROP_ATOM(NET_WM_MOVERESIZE_SIZE_KEYBOARD); else if (o->corner_specified) diff --git a/openbox/client.c b/openbox/client.c index 1cf46785..8d1845c4 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -271,8 +271,8 @@ void client_manage(Window window, ObPrompt *prompt) } self->w_frame = createWindow(RootWindow(obt_display, ob_screen), visual, mask, &attrib); - self->frame = render_plugin->frame_new(self, self->w_client, self->w_frame); - render_plugin->frame_grab(self->frame, window_map); + self->frame = frame_engine->frame_new(self, self->w_client, self->w_frame); + frame_engine->frame_grab(self->frame, window_map); /* we've grabbed everything and set everything that we need to at mapping time now */ @@ -316,14 +316,14 @@ void client_manage(Window window, ObPrompt *prompt) /* adjust the frame to the client's size before showing or placing the window */ - render_plugin->frame_set_client_area (self->frame, self->area); - render_plugin->frame_set_hover_flag (self->frame, OB_BUTTON_NONE); - render_plugin->frame_set_press_flag (self->frame, OB_BUTTON_NONE); - render_plugin->frame_set_is_focus (self->frame, FALSE); - render_plugin->frame_set_decorations (self->frame, self->decorations); - render_plugin->frame_update_title (self->frame, self->title); - render_plugin->frame_update_layout (self->frame, FALSE, TRUE); - render_plugin->frame_update_skin (self->frame); + frame_engine->frame_set_client_area (self->frame, self->area); + frame_engine->frame_set_hover_flag (self->frame, OB_BUTTON_NONE); + frame_engine->frame_set_press_flag (self->frame, OB_BUTTON_NONE); + frame_engine->frame_set_is_focus (self->frame, FALSE); + frame_engine->frame_set_decorations (self->frame, self->decorations); + frame_engine->frame_update_title (self->frame, self->title); + frame_engine->frame_update_layout (self->frame, FALSE, TRUE); + frame_engine->frame_update_skin (self->frame); /* where the frame was placed is where the window was originally */ place = self->area; @@ -403,7 +403,7 @@ void client_manage(Window window, ObPrompt *prompt) { Rect *a = screen_area(self->desktop, SCREEN_AREA_ONE_MONITOR, &place); - Strut size = render_plugin->frame_get_size(self->frame); + Strut size = frame_engine->frame_get_size(self->frame); /* get the size of the frame */ place.width += size.left + size.right; place.height += size.top + size.bottom; @@ -453,7 +453,7 @@ void client_manage(Window window, ObPrompt *prompt) self->w_client, map_time, launch_time, event_last_user_time); - if (menu_frame_visible || render_plugin->moveresize_in_progress) { + if (menu_frame_visible || frame_engine->moveresize_in_progress) { activate = FALSE; raise = TRUE; ob_debug_type(OB_DEBUG_FOCUS, @@ -600,7 +600,7 @@ void client_manage(Window window, ObPrompt *prompt) g_free(settings); ob_debug("Managed window 0x%lx plate 0x%x (%s)", - window, render_plugin->frame_get_window(self->frame), self->class); + window, frame_engine->frame_get_window(self->frame), self->class); } @@ -639,15 +639,15 @@ ObClient *client_fake_manage(Window window) } self->w_frame = createWindow(RootWindow(obt_display, ob_screen), visual, mask, &attrib); - self->frame = render_plugin->frame_new(self, self->w_client, self->w_frame); - render_plugin->frame_set_decorations (self->frame, self->decorations); - render_plugin->frame_update_title (self->frame, self->title); - render_plugin->frame_update_layout (self->frame, FALSE, FALSE); - render_plugin->frame_update_skin (self->frame); + self->frame = frame_engine->frame_new(self, self->w_client, self->w_frame); + frame_engine->frame_set_decorations (self->frame, self->decorations); + frame_engine->frame_update_title (self->frame, self->title); + frame_engine->frame_update_layout (self->frame, FALSE, FALSE); + frame_engine->frame_update_skin (self->frame); ob_debug("gave extents left %d right %d top %d bottom %d", - render_plugin->frame_get_size(self->frame).left, render_plugin->frame_get_size(self->frame).right, - render_plugin->frame_get_size(self->frame).top, render_plugin->frame_get_size(self->frame).bottom); + frame_engine->frame_get_size(self->frame).left, frame_engine->frame_get_size(self->frame).right, + frame_engine->frame_get_size(self->frame).top, frame_engine->frame_get_size(self->frame).bottom); /* free the ObAppSettings shallow copy */ g_free(settings); @@ -668,7 +668,7 @@ void client_unmanage(ObClient *self) gulong ignore_start; ob_debug("Unmanaging window: 0x%x plate 0x%x (%s) (%s)", - self->w_client, render_plugin->frame_get_window(self->frame), + self->w_client, frame_engine->frame_get_window(self->frame), self->class, self->title ? self->title : ""); g_assert(self != NULL); @@ -756,8 +756,8 @@ void client_unmanage(ObClient *self) } self->fullscreen = self->max_horz = self->max_vert = FALSE; - render_plugin->frame_trigger(self, OB_TRIGGER_UNMAX_VERT); - render_plugin->frame_trigger(self, OB_TRIGGER_UNMAX_HORZ); + frame_engine->frame_trigger(self, OB_TRIGGER_UNMAX_VERT); + frame_engine->frame_trigger(self, OB_TRIGGER_UNMAX_HORZ); /* let it be moved and resized no matter what */ self->functions = OB_CLIENT_FUNC_MOVE | OB_CLIENT_FUNC_RESIZE; self->decorations = 0; /* unmanaged windows have no decor */ @@ -769,8 +769,8 @@ void client_unmanage(ObClient *self) } /* reparent the window out of the frame, and free the frame */ - render_plugin->frame_ungrab(self->frame, window_map); - render_plugin->frame_free(self->frame); + frame_engine->frame_ungrab(self->frame, window_map); + frame_engine->frame_free(self->frame); self->frame = NULL; if (ob_state() != OB_STATE_EXITING) { @@ -819,7 +819,7 @@ void client_fake_unmanage(ObClient *self) { /* this is all that got allocated to get the decorations */ - render_plugin->frame_free(self->frame); + frame_engine->frame_free(self->frame); g_free(self); } @@ -948,17 +948,17 @@ static void client_restore_session_state(ObClient *self) self->undecorated = self->session->undecorated; if (self->session->max_horz) { - render_plugin->frame_trigger(self->frame, OB_TRIGGER_MAX_HORZ); + frame_engine->frame_trigger(self->frame, OB_TRIGGER_MAX_HORZ); } else { - render_plugin->frame_trigger(self->frame, OB_TRIGGER_UNMAX_HORZ); + frame_engine->frame_trigger(self->frame, OB_TRIGGER_UNMAX_HORZ); } if (self->session->max_vert) { - render_plugin->frame_trigger(self->frame, OB_TRIGGER_MAX_VERT); + frame_engine->frame_trigger(self->frame, OB_TRIGGER_MAX_VERT); } else { - render_plugin->frame_trigger(self->frame, OB_TRIGGER_UNMAX_VERT); + frame_engine->frame_trigger(self->frame, OB_TRIGGER_UNMAX_VERT); } } @@ -1015,7 +1015,7 @@ gboolean client_find_onscreen(ObClient *self, gint *x, gint *y, gint w, gint h, /* get where the frame would be */ frame_client_gravity(self, x, y); - Strut size = render_plugin->frame_get_size(self->frame); + Strut size = frame_engine->frame_get_size(self->frame); /* get the requested size of the window with decorations */ fw = size.left + w + size.right; @@ -1028,7 +1028,7 @@ gboolean client_find_onscreen(ObClient *self, gint *x, gint *y, gint w, gint h, Point newtl, newtr, newbl, newbr; gboolean stationary_l, stationary_r, stationary_t, stationary_b; - Rect area = render_plugin->frame_get_window_area(self->frame); + Rect area = frame_engine->frame_get_window_area(self->frame); POINT_SET(oldtl, area.x, area.y); POINT_SET(oldbr, area.x + area.width - 1, area.y + area.height - 1); @@ -1275,11 +1275,11 @@ static void client_get_state(ObClient *self) self->fullscreen = TRUE; else if (state[i] == OBT_PROP_ATOM(NET_WM_STATE_MAXIMIZED_VERT)) { self->max_vert = TRUE; - render_plugin->frame_trigger(self->frame, OB_TRIGGER_MAX_VERT); + frame_engine->frame_trigger(self->frame, OB_TRIGGER_MAX_VERT); } else if (state[i] == OBT_PROP_ATOM(NET_WM_STATE_MAXIMIZED_HORZ)) { self->max_horz = TRUE; - render_plugin->frame_trigger(self->frame, OB_TRIGGER_MAX_HORZ); + frame_engine->frame_trigger(self->frame, OB_TRIGGER_MAX_HORZ); } else if (state[i] == OBT_PROP_ATOM(NET_WM_STATE_ABOVE)) self->above = TRUE; @@ -1888,8 +1888,8 @@ static void client_change_allowed_actions(ObClient *self) if (self->frame) client_maximize(self, FALSE, 0); else { self->max_vert = self->max_horz = FALSE; - render_plugin->frame_trigger (self->frame, OB_TRIGGER_UNMAX_VERT); - render_plugin->frame_trigger (self->frame, OB_TRIGGER_UNMAX_HORZ); + frame_engine->frame_trigger (self->frame, OB_TRIGGER_UNMAX_VERT); + frame_engine->frame_trigger (self->frame, OB_TRIGGER_UNMAX_HORZ); } } @@ -2027,8 +2027,8 @@ void client_update_title(ObClient *self) if (self->frame) { /* update title render */ - render_plugin->frame_update_title (self->frame, self->title); - render_plugin->frame_update_skin (self->frame); + frame_engine->frame_update_title (self->frame, self->title); + frame_engine->frame_update_skin (self->frame); } /* update the icon title */ @@ -2250,7 +2250,7 @@ void client_update_icons(ObClient *self) OBT_PROP_SETA32(self->w_client, NET_WM_ICON, CARDINAL, data, 48*48+2); g_free(data); } else if (self->frame) - render_plugin->frame_update_skin (self->frame); + frame_engine->frame_update_skin (self->frame); /* don't draw the icon empty if we're just setting one now anyways, we'll get the property change any second */ //frame_adjust_icon(self->frame); @@ -2431,7 +2431,7 @@ static void client_change_state(ObClient *self) OBT_PROP_SETA32(self->w_client, NET_WM_STATE, ATOM, netstate, num); if (self->frame) - render_plugin->frame_update_layout (self->frame, FALSE, FALSE); + frame_engine->frame_update_layout (self->frame, FALSE, FALSE); } ObClient *client_search_focus_tree(ObClient *self) @@ -2739,7 +2739,7 @@ static void client_apply_startup_state(ObClient *self, /* save the area, and make it where it should be for the premax stuff */ oldarea = self->area; RECT_SET(self->area, x, y, w, h); - render_plugin->frame_set_client_area (self->frame, self->area); + frame_engine->frame_set_client_area (self->frame, self->area); /* apply the states. these are in a carefully crafted order.. */ @@ -2772,9 +2772,9 @@ static void client_apply_startup_state(ObClient *self, not, so this needs to be called even if we have fullscreened/maxed */ self->area = oldarea; - render_plugin->frame_set_client_area (self->frame, self->area); - render_plugin->frame_set_decorations (self->frame, self->decorations); - render_plugin->frame_update_layout (self->frame, FALSE, FALSE); + frame_engine->frame_set_client_area (self->frame, self->area); + frame_engine->frame_set_decorations (self->frame, self->decorations); + frame_engine->frame_update_layout (self->frame, FALSE, FALSE); client_configure(self, x, y, w, h, FALSE, TRUE, FALSE); /* set the desktop hint, to make sure that it always exists */ @@ -2857,8 +2857,8 @@ void client_try_configure(ObClient *self, gint *x, gint *y, gint *w, gint *h, /* make the frame recalculate its dimentions n shit without changing anything visible for real, this way the constraints below can work with the updated frame dimensions. */ - render_plugin->frame_set_decorations (self->frame, self->decorations); - render_plugin->frame_update_layout (self->frame, FALSE, TRUE); + frame_engine->frame_set_decorations (self->frame, self->decorations); + frame_engine->frame_update_layout (self->frame, FALSE, TRUE); /* gets the frame's position */ frame_client_gravity(self, x, y); @@ -2891,7 +2891,7 @@ void client_try_configure(ObClient *self, gint *x, gint *y, gint *w, gint *h, a = screen_area(self->desktop, i, (self->max_horz && self->max_vert ? NULL : &desired)); - Strut size = render_plugin->frame_get_size(self->frame); + Strut size = frame_engine->frame_get_size(self->frame); /* set the size and position if maximized */ if (self->max_horz) { *x = a->x; @@ -3026,13 +3026,13 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h, gboolean send_resize_client; gboolean moved = FALSE, resized = FALSE, rootmoved = FALSE; gboolean fmoved, fresized; - guint fdecor = render_plugin->frame_get_decorations(self->frame); - gboolean fhorz = render_plugin->frame_is_max_horz(self->frame); - gboolean fvert = render_plugin->frame_is_max_vert(self->frame); + guint fdecor = frame_engine->frame_get_decorations(self->frame); + gboolean fhorz = frame_engine->frame_is_max_horz(self->frame); + gboolean fvert = frame_engine->frame_is_max_vert(self->frame); gint logicalw, logicalh; - Strut size = render_plugin->frame_get_size(self->frame); - Rect area = render_plugin->frame_get_window_area(self->frame); + Strut size = frame_engine->frame_get_size(self->frame); + Rect area = frame_engine->frame_get_window_area(self->frame); /* find the new x, y, width, and height (and logical size) */ client_try_configure(self, &x, &y, &w, &h, &logicalw, &logicalh, user); @@ -3047,10 +3047,10 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h, oldw = self->area.width; oldh = self->area.height; - oldframe = render_plugin->frame_get_window_area(self->frame); + oldframe = frame_engine->frame_get_window_area(self->frame); RECT_SET(self->area, x, y, w, h); - render_plugin->frame_set_client_area (self->frame, self->area); + frame_engine->frame_set_client_area (self->frame, self->area); /* for app-requested resizes, always resize if 'resized' is true. for user-requested ones, only resize if final is true, or when @@ -3061,8 +3061,8 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h, /* if the client is enlarging, then resize the client before the frame */ if (send_resize_client && (w > oldw || h > oldh)) { - render_plugin->frame_set_decorations (self->frame, self->decorations); - render_plugin->frame_update_layout (self->frame, FALSE, FALSE); + frame_engine->frame_set_decorations (self->frame, self->decorations); + frame_engine->frame_update_layout (self->frame, FALSE, FALSE); } /* find the frame's dimensions and move/resize it */ @@ -3086,8 +3086,8 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h, would change what window gets the event */ mouse_replay_pointer(); - render_plugin->frame_set_decorations (self->frame, self->decorations); - render_plugin->frame_update_layout (self->frame, TRUE, FALSE); + frame_engine->frame_set_decorations (self->frame, self->decorations); + frame_engine->frame_update_layout (self->frame, TRUE, FALSE); if (!user) event_end_ignore_all_enters(ignore_start); @@ -3151,15 +3151,15 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h, in the direction that is growing */ if (send_resize_client && (w <= oldw || h <= oldh)) { - render_plugin->frame_set_decorations (self->frame, self->decorations); - render_plugin->frame_update_layout (self->frame, FALSE, FALSE); + frame_engine->frame_set_decorations (self->frame, self->decorations); + frame_engine->frame_update_layout (self->frame, FALSE, FALSE); } XFlush(obt_display); /* if it moved between monitors, then this can affect the stacking layer of this window or others - for fullscreen windows */ - Rect current_frame = render_plugin->frame_get_window_area(self->frame); + Rect current_frame = frame_engine->frame_get_window_area(self->frame); if (screen_find_monitor(¤t_frame) != screen_find_monitor(&oldframe)) { @@ -3266,7 +3266,7 @@ static void client_iconify_recursive(ObClient *self, if (changed) { client_change_state(self); if (config_animate_iconify && !hide_animation) - render_plugin->frame_begin_iconify_animation(self->frame, iconic); + frame_engine->frame_begin_iconify_animation(self->frame, iconic); /* do this after starting the animation so it doesn't flash */ client_showhide(self); } @@ -3349,12 +3349,12 @@ void client_maximize(ObClient *self, gboolean max, gint dir) if (dir == 0 || dir == 1) { self->max_horz = max; /* horz */ - render_plugin->frame_trigger(self->frame, max? OB_TRIGGER_MAX_HORZ : OB_TRIGGER_UNMAX_HORZ); + frame_engine->frame_trigger(self->frame, max? OB_TRIGGER_MAX_HORZ : OB_TRIGGER_UNMAX_HORZ); } if (dir == 0 || dir == 2){ self->max_vert = max; /* vert */ - render_plugin->frame_trigger(self->frame, max? OB_TRIGGER_MAX_VERT : OB_TRIGGER_UNMAX_VERT); + frame_engine->frame_trigger(self->frame, max? OB_TRIGGER_MAX_VERT : OB_TRIGGER_UNMAX_VERT); } client_change_state(self); /* change the state hints on the client */ @@ -3373,8 +3373,8 @@ void client_shade(ObClient *self, gboolean shade) client_change_state(self); client_change_wm_state(self); /* the window is being hidden/shown */ /* resize the frame to just the titlebar */ - render_plugin->frame_set_is_shaded (self->frame, self->shaded); - render_plugin->frame_update_layout(self->frame, FALSE, FALSE); + frame_engine->frame_set_is_shaded (self->frame, self->shaded); + frame_engine->frame_update_layout(self->frame, FALSE, FALSE); } static void client_ping_event(ObClient *self, gboolean dead) @@ -3501,9 +3501,9 @@ void client_hilite(ObClient *self, gboolean hilite) self->demands_attention = hilite && !client_focused(self); if (self->frame != NULL) { /* if we're mapping, just set the state */ if (self->demands_attention) - render_plugin->frame_flash_start(self->frame); + frame_engine->frame_flash_start(self->frame); else - render_plugin->frame_flash_stop(self->frame); + frame_engine->frame_flash_stop(self->frame); client_change_state(self); } } @@ -3526,8 +3526,8 @@ static void client_set_desktop_recursive(ObClient *self, self->desktop = target; OBT_PROP_SET32(self->w_client, NET_WM_DESKTOP, CARDINAL, target); /* the frame can display the current desktop state */ - render_plugin->frame_set_decorations (self->frame, self->decorations); - render_plugin->frame_update_layout(self->frame, FALSE, FALSE); + frame_engine->frame_set_decorations (self->frame, self->decorations); + frame_engine->frame_update_layout(self->frame, FALSE, FALSE); /* 'move' the window to the new desktop */ if (!donthide) client_hide(self); @@ -3801,7 +3801,7 @@ gboolean client_can_focus(ObClient *self) /* choose the correct target */ self = client_focus_target(self); - if (!render_plugin->frame_is_visible(self->frame)) + if (!frame_engine->frame_is_visible(self->frame)) return FALSE; if (!(self->can_focus || self->focus_notify)) @@ -3887,7 +3887,7 @@ static void client_present(ObClient *self, gboolean here, gboolean raise, client_set_desktop(self, screen_desktop, FALSE, TRUE); else screen_set_desktop(self->desktop, FALSE); - } else if (!render_plugin->frame_is_visible(self->frame)) + } else if (!frame_engine->frame_is_visible(self->frame)) /* if its not visible for other reasons, then don't mess with it */ return; @@ -4024,7 +4024,7 @@ void client_set_undecorated(ObClient *self, gboolean undecorated) guint client_monitor(ObClient *self) { - Rect area = render_plugin->frame_get_window_area(self->frame); + Rect area = frame_engine->frame_get_window_area(self->frame); return screen_find_monitor(&area); } @@ -4220,8 +4220,8 @@ void client_find_edge_directional(ObClient *self, ObDirection dir, Rect dock_area; gint edge; - Strut size = render_plugin->frame_get_size(self->frame); - Rect area = render_plugin->frame_get_window_area(self->frame); + Strut size = frame_engine->frame_get_size(self->frame); + Rect area = frame_engine->frame_get_window_area(self->frame); a = screen_area(self->desktop, SCREEN_AREA_ALL_MONITORS, &area); @@ -4274,7 +4274,7 @@ void client_find_edge_directional(ObClient *self, ObDirection dir, ob_debug("trying window %s", cur->title); - detect_edge(render_plugin->frame_get_window_area(cur->frame), dir, my_head, my_size, my_edge_start, + detect_edge(frame_engine->frame_get_window_area(cur->frame), dir, my_head, my_size, my_edge_start, my_edge_size, dest, near_edge); } dock_get_area(&dock_area); @@ -4292,7 +4292,7 @@ void client_find_move_directional(ObClient *self, ObDirection dir, gboolean near; - Rect area = render_plugin->frame_get_window_area(self->frame); + Rect area = frame_engine->frame_get_window_area(self->frame); switch (dir) { case OB_DIRECTION_EAST: @@ -4363,8 +4363,8 @@ void client_find_resize_directional(ObClient *self, ObDirection side, gboolean near; ObDirection dir; - Rect area = render_plugin->frame_get_window_area(self->frame); - Strut size = render_plugin->frame_get_size(self->frame); + Rect area = frame_engine->frame_get_window_area(self->frame); + Strut size = frame_engine->frame_get_size(self->frame); switch (side) { case OB_DIRECTION_EAST: @@ -4448,15 +4448,15 @@ ObClient* client_under_pointer(void) for (it = stacking_list; it; it = g_list_next(it)) { if (WINDOW_IS_CLIENT(it->data)) { ObClient *c = WINDOW_AS_CLIENT(it->data); - if (render_plugin->frame_is_visible(c->frame) && + if (frame_engine->frame_is_visible(c->frame) && /* check the desktop, this is done during desktop switching and windows are shown/hidden status is not reliable */ (c->desktop == screen_desktop || c->desktop == DESKTOP_ALL) && /* ignore all animating windows */ - !(render_plugin->frame_iconify_animating(c->frame)) && - RECT_CONTAINS(render_plugin->frame_get_window_area(c->frame), x, y)) + !(frame_engine->frame_iconify_animating(c->frame)) && + RECT_CONTAINS(frame_engine->frame_get_window_area(c->frame), x, y)) { ret = c; break; @@ -4474,9 +4474,9 @@ gboolean client_has_group_siblings(ObClient *self) void client_show_frame(ObClient * self) { - render_plugin->frame_set_is_visible(self->frame, TRUE); - render_plugin->frame_update_layout(self->frame, FALSE, FALSE); - render_plugin->frame_update_skin(self->frame); + frame_engine->frame_set_is_visible(self->frame, TRUE); + frame_engine->frame_update_layout(self->frame, FALSE, FALSE); + frame_engine->frame_update_skin(self->frame); /* Grab the server to make sure that the frame window is mapped before the client gets its MapNotify, i.e. to make sure the client is _visible_ when it gets MapNotify. */ @@ -4488,8 +4488,8 @@ void client_show_frame(ObClient * self) void client_hide_frame(ObClient * self) { - render_plugin->frame_set_is_visible(self->frame, FALSE); - if (!render_plugin->frame_iconify_animating(self)) + frame_engine->frame_set_is_visible(self->frame, FALSE); + if (!frame_engine->frame_iconify_animating(self)) XUnmapWindow(obt_display, self->w_frame); /* we unmap the client itself so that we can get MapRequest events, and because the ICCCM tells us to! */ diff --git a/openbox/client_menu.c b/openbox/client_menu.c index c7617e47..4054f028 100644 --- a/openbox/client_menu.c +++ b/openbox/client_menu.c @@ -297,8 +297,8 @@ static void client_menu_place(ObMenuFrame *frame, gint *x, gint *y, if (!mouse && frame->client) { - Strut size = render_plugin->frame_get_size(frame->client->frame); - Rect area = render_plugin->frame_get_window_area(frame->client->frame); + Strut size = frame_engine->frame_get_size(frame->client->frame); + Rect area = frame_engine->frame_get_window_area(frame->client->frame); *x = area.x; diff --git a/openbox/engine_interface.c b/openbox/engine_interface.c index eacd10d6..8f55d92b 100644 --- a/openbox/engine_interface.c +++ b/openbox/engine_interface.c @@ -268,7 +268,7 @@ ObFrameContext frame_context_from_string(const gchar *name) ObFrameContext plugin_frame_context(ObClient *client, Window win, gint x, gint y) { /* this part is commun to all plugin */ - if (render_plugin->moveresize_in_progress) + if (frame_engine->moveresize_in_progress) return OB_FRAME_CONTEXT_MOVE_RESIZE; if (win == obt_root(ob_screen)) return OB_FRAME_CONTEXT_ROOT; @@ -282,13 +282,13 @@ ObFrameContext plugin_frame_context(ObClient *client, Window win, gint x, gint y return OB_FRAME_CONTEXT_CLIENT; } /* this part is specific to the plugin */ - return render_plugin->frame_context(client->frame, win, x, y); + return frame_engine->frame_context(client->frame, win, x, y); } void frame_client_gravity(ObClient *self, gint *x, gint *y) { - Strut size = render_plugin->frame_get_size(self->frame); + Strut size = frame_engine->frame_get_size(self->frame); /* horizontal */ switch (self->gravity) { default: @@ -350,7 +350,7 @@ void frame_client_gravity(ObClient *self, gint *x, gint *y) void frame_frame_gravity(ObClient *self, gint *x, gint *y) { - Strut size = render_plugin->frame_get_size(self->frame); + Strut size = frame_engine->frame_get_size(self->frame); /* horizontal */ switch (self->gravity) { default: @@ -406,7 +406,7 @@ void frame_frame_gravity(ObClient *self, gint *x, gint *y) void frame_rect_to_frame(ObClient * self, Rect *r) { - Strut size = render_plugin->frame_get_size(self->frame); + Strut size = frame_engine->frame_get_size(self->frame); r->width += size.left + size.right; r->height += size.top + size.bottom; frame_client_gravity(self, &r->x, &r->y); @@ -414,7 +414,7 @@ void frame_rect_to_frame(ObClient * self, Rect *r) void frame_rect_to_client(ObClient * self, Rect *r) { - Strut size = render_plugin->frame_get_size(self); + Strut size = frame_engine->frame_get_size(self); r->width -= size.left + size.right; r->height -= size.top + size.bottom; frame_frame_gravity(self, &r->x, &r->y); diff --git a/openbox/event.c b/openbox/event.c index c49d4603..fdc531af 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -527,9 +527,9 @@ static void event_process(const XEvent *ec, gpointer data) /* We don't get a FocusOut for this case, because it's just moving from our Inferior up to us. This happens when iconifying a window with RevertToParent focus */ - render_plugin->frame_set_is_focus(client->frame, FALSE); - render_plugin->frame_update_layout (client->frame, FALSE, FALSE); - render_plugin->frame_update_skin(client->frame); + frame_engine->frame_set_is_focus(client->frame, FALSE); + frame_engine->frame_update_layout (client->frame, FALSE, FALSE); + frame_engine->frame_update_skin(client->frame); /* focus_set_client(NULL) has already been called */ } else if (e->xfocus.detail == NotifyPointerRoot || @@ -592,9 +592,9 @@ static void event_process(const XEvent *ec, gpointer data) } else if (client != focus_client) { focus_left_screen = FALSE; - render_plugin->frame_set_is_focus(client->frame, TRUE); - render_plugin->frame_update_layout (client->frame, FALSE, FALSE); - render_plugin->frame_update_skin (client->frame); + frame_engine->frame_set_is_focus(client->frame, TRUE); + frame_engine->frame_update_layout (client->frame, FALSE, FALSE); + frame_engine->frame_update_skin (client->frame); focus_set_client(client); client_calc_layer(client); client_bring_helper_windows(client); @@ -639,9 +639,9 @@ static void event_process(const XEvent *ec, gpointer data) } if (client && client != focus_client) { - render_plugin->frame_set_is_focus(client->frame, FALSE); - render_plugin->frame_update_layout (client->frame, FALSE, FALSE); - render_plugin->frame_update_skin(client->frame); + frame_engine->frame_set_is_focus(client->frame, FALSE); + frame_engine->frame_update_layout (client->frame, FALSE, FALSE); + frame_engine->frame_update_skin(client->frame); /* focus_set_client(NULL) has already been called in this section or by focus_fallback */ } @@ -677,7 +677,7 @@ static void event_process(const XEvent *ec, gpointer data) gulong vals[4]; /* set the frame extents on the window */ - Strut size = render_plugin->frame_get_size(c->frame); + Strut size = frame_engine->frame_get_size(c->frame); vals[0] = size.left; vals[1] = size.right; vals[2] = size.top; @@ -714,7 +714,7 @@ static void event_process(const XEvent *ec, gpointer data) e->type == obt_display_extension_sync_basep + XSyncAlarmNotify) { XSyncAlarmNotifyEvent *se = (XSyncAlarmNotifyEvent*)e; - if (se->alarm == moveresize_alarm && render_plugin->moveresize_in_progress) + if (se->alarm == moveresize_alarm && frame_engine->moveresize_in_progress) moveresize_event(e); } #endif @@ -906,7 +906,7 @@ static void event_handle_client(ObClient *client, XEvent *e) } if (current_button) - render_plugin->frame_set_hover_flag (client->frame, current_button); + frame_engine->frame_set_hover_flag (client->frame, current_button); } break; case MotionNotify: @@ -921,22 +921,22 @@ static void event_handle_client(ObClient *client, XEvent *e) case OB_FRAME_CONTEXT_TLCORNER: case OB_FRAME_CONTEXT_TRCORNER: /* we've left the button area inside the titlebar */ - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); break; case OB_FRAME_CONTEXT_MAXIMIZE: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_MAX); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_MAX); break; case OB_FRAME_CONTEXT_ALLDESKTOPS: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_DESK); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_DESK); break; case OB_FRAME_CONTEXT_SHADE: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_SHADE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_SHADE); break; case OB_FRAME_CONTEXT_ICONIFY: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_ICONIFY); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_ICONIFY); break; case OB_FRAME_CONTEXT_CLOSE: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_CLOSE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_CLOSE); break; default: break; @@ -950,28 +950,28 @@ static void event_handle_client(ObClient *client, XEvent *e) case OB_FRAME_CONTEXT_TLCORNER: case OB_FRAME_CONTEXT_TRCORNER: /* we've left the button area inside the titlebar */ - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); break; case OB_FRAME_CONTEXT_MAXIMIZE: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); break; case OB_FRAME_CONTEXT_ALLDESKTOPS: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); break; case OB_FRAME_CONTEXT_SHADE: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); break; case OB_FRAME_CONTEXT_ICONIFY: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); break; case OB_FRAME_CONTEXT_CLOSE: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_NONE); break; case OB_FRAME_CONTEXT_FRAME: /* When the mouse leaves an animating window, don't use the corresponding enter events. Pretend like the animating window doesn't even exist..! */ - if (render_plugin->frame_iconify_animating(client->frame)) + if (frame_engine->frame_iconify_animating(client->frame)) event_end_ignore_all_enters(event_start_ignore_all_enters()); ob_debug_type(OB_DEBUG_FOCUS, @@ -1002,19 +1002,19 @@ static void event_handle_client(ObClient *client, XEvent *e) e->xcrossing.x, e->xcrossing.y); switch (con) { case OB_FRAME_CONTEXT_MAXIMIZE: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_MAX); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_MAX); break; case OB_FRAME_CONTEXT_ALLDESKTOPS: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_DESK); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_DESK); break; case OB_FRAME_CONTEXT_SHADE: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_SHADE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_SHADE); break; case OB_FRAME_CONTEXT_ICONIFY: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_ICONIFY); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_ICONIFY); break; case OB_FRAME_CONTEXT_CLOSE: - render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_CLOSE); + frame_engine->frame_set_hover_flag(client->frame, OB_BUTTON_CLOSE); break; case OB_FRAME_CONTEXT_FRAME: if (grab_on_keyboard()) @@ -1069,7 +1069,7 @@ static void event_handle_client(ObClient *client, XEvent *e) ob_debug("ConfigureRequest for \"%s\" desktop %d wmstate %d " "visibile %d", client->title, - screen_desktop, client->wmstate, render_plugin->frame_is_visible(client->frame), + screen_desktop, client->wmstate, frame_engine->frame_is_visible(client->frame), x, y, w, h, client->border_width); if (e->xconfigurerequest.value_mask & CWBorderWidth) @@ -1163,8 +1163,8 @@ static void event_handle_client(ObClient *client, XEvent *e) desktop. eg. open amarok window on desktop 1, switch to desktop 2, click amarok tray icon. it will move by its decoration size. */ - Strut size = render_plugin->frame_get_size(client->frame); - Rect area = render_plugin->frame_get_window_area(client->frame); + Strut size = frame_engine->frame_get_size(client->frame); + Rect area = frame_engine->frame_get_window_area(client->frame); if (x != client->area.x && x == (area.x + size.left - (gint)client->border_width) && @@ -1228,7 +1228,7 @@ static void event_handle_client(ObClient *client, XEvent *e) break; case ReparentNotify: /* this is when the client is first taken captive in the frame */ - if (e->xreparent.parent == render_plugin->frame_get_window(client->frame)) break; + if (e->xreparent.parent == frame_engine->frame_get_window(client->frame)) break; /* This event is quite rare and is usually handled in unmapHandler. @@ -1570,7 +1570,7 @@ static void event_handle_client(ObClient *client, XEvent *e) e->type == obt_display_extension_shape_basep) { client->shaped = ((XShapeEvent*)e)->shaped; - render_plugin->frame_adjust_shape(client->frame); + frame_engine->frame_adjust_shape(client->frame); } #endif } @@ -1869,7 +1869,7 @@ static void event_handle_user_input(ObClient *client, XEvent *e) /* if the keyboard interactive action uses the event then dont use it for bindings. likewise is moveresize uses the event. */ if (!actions_interactive_input_event(e) && !moveresize_event(e)) { - if (render_plugin->moveresize_in_progress) + if (frame_engine->moveresize_in_progress) /* make further actions work on the client being moved/resized */ client = moveresize_client; @@ -1880,10 +1880,10 @@ static void event_handle_user_input(ObClient *client, XEvent *e) { /* the frame may not be "visible" but they can still click on it in the case where it is animating before disappearing */ - if (!client || !render_plugin->frame_iconify_animating(client->frame)) + if (!client || !frame_engine->frame_iconify_animating(client->frame)) mouse_event(client, e); } else - keyboard_event((render_plugin->focus_cycle_target ? render_plugin->focus_cycle_target : + keyboard_event((frame_engine->focus_cycle_target ? frame_engine->focus_cycle_target : (client ? client : focus_client)), e); } } @@ -1905,7 +1905,7 @@ static gboolean focus_delay_func(gpointer data) Time old = event_curtime; /* don't move focus and kill the menu or the move/resize */ - if (menu_frame_visible || render_plugin->moveresize_in_progress) return FALSE; + if (menu_frame_visible || frame_engine->moveresize_in_progress) return FALSE; event_curtime = d->time; event_curserial = d->serial; @@ -1993,7 +1993,7 @@ void event_cancel_all_key_grabs(void) menu_frame_hide_all(); ob_debug("KILLED open menus"); } - else if (render_plugin->moveresize_in_progress) { + else if (frame_engine->moveresize_in_progress) { moveresize_end(TRUE); ob_debug("KILLED interactive moveresize"); } diff --git a/openbox/focus_cycle.c b/openbox/focus_cycle.c index af68c37f..6d73cbb0 100644 --- a/openbox/focus_cycle.c +++ b/openbox/focus_cycle.c @@ -54,7 +54,7 @@ void focus_cycle_stop(ObClient *ifclient) { /* stop focus cycling if the given client is a valid focus target, and so the cycling is being disrupted */ - if (render_plugin->focus_cycle_target && ifclient && + if (frame_engine->focus_cycle_target && ifclient && focus_valid_target(ifclient, TRUE, focus_cycle_iconic_windows, focus_cycle_all_desktops, @@ -80,7 +80,7 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops, if (interactive) { if (cancel) { - render_plugin->focus_cycle_target = NULL; + frame_engine->focus_cycle_target = NULL; goto done_cycle; } else if (done) goto done_cycle; @@ -97,14 +97,14 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops, } - if (render_plugin->focus_cycle_target == NULL) { + if (frame_engine->focus_cycle_target == NULL) { focus_cycle_iconic_windows = TRUE; focus_cycle_all_desktops = all_desktops; focus_cycle_dock_windows = dock_windows; focus_cycle_desktop_windows = desktop_windows; start = it = g_list_find(list, focus_client); } else - start = it = g_list_find(list, render_plugin->focus_cycle_target); + start = it = g_list_find(list, frame_engine->focus_cycle_target); if (!start) /* switched desktops or something? */ start = it = forward ? g_list_last(list) : g_list_first(list); @@ -126,8 +126,8 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops, focus_cycle_desktop_windows)) { if (interactive) { - if (ft != render_plugin->focus_cycle_target) { /* prevents flicker */ - render_plugin->focus_cycle_target = ft; + if (ft != frame_engine->focus_cycle_target) { /* prevents flicker */ + frame_engine->focus_cycle_target = ft; focus_cycle_draw_indicator(showbar ? ft : NULL); } /* same arguments as focus_target_valid */ @@ -137,9 +137,9 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops, focus_cycle_dock_windows, focus_cycle_desktop_windows, mode); - return render_plugin->focus_cycle_target; - } else if (ft != render_plugin->focus_cycle_target) { - render_plugin->focus_cycle_target = ft; + return frame_engine->focus_cycle_target; + } else if (ft != frame_engine->focus_cycle_target) { + frame_engine->focus_cycle_target = ft; done = TRUE; break; } @@ -147,10 +147,10 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops, } while (it != start); done_cycle: - if (done && !cancel) ret = render_plugin->focus_cycle_target; + if (done && !cancel) ret = frame_engine->focus_cycle_target; t = NULL; - render_plugin->focus_cycle_target = NULL; + frame_engine->focus_cycle_target = NULL; g_list_free(order); order = NULL; @@ -177,7 +177,7 @@ static ObClient *focus_find_directional(ObClient *c, ObDirection dir, if (!client_list) return NULL; - Rect area = render_plugin->frame_get_window_area(c->frame); + Rect area = frame_engine->frame_get_window_area(c->frame); /* first, find the centre coords of the currently focused window */ my_cx = area.x + area.width / 2; my_cy = area.y + area.height / 2; @@ -195,7 +195,7 @@ static ObClient *focus_find_directional(ObClient *c, ObDirection dir, desktop_windows)) continue; - Rect cur_area = render_plugin->frame_get_window_area(cur->frame); + Rect cur_area = frame_engine->frame_get_window_area(cur->frame); /* find the centre coords of this window, from the * currently focused window's point of view */ his_cx = (cur_area.x - my_cx) @@ -271,7 +271,7 @@ ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows, ObClient *ret = NULL; if (cancel) { - render_plugin->focus_cycle_target = NULL; + frame_engine->focus_cycle_target = NULL; goto done_cycle; } else if (done && interactive) goto done_cycle; @@ -279,7 +279,7 @@ ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows, if (!focus_order) goto done_cycle; - if (render_plugin->focus_cycle_target == NULL) { + if (frame_engine->focus_cycle_target == NULL) { focus_cycle_iconic_windows = FALSE; focus_cycle_all_desktops = FALSE; focus_cycle_dock_windows = dock_windows; @@ -288,8 +288,8 @@ ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows, if (!first) first = focus_client; - if (render_plugin->focus_cycle_target) - ft = focus_find_directional(render_plugin->focus_cycle_target, dir, dock_windows, + if (frame_engine->focus_cycle_target) + ft = focus_find_directional(frame_engine->focus_cycle_target, dir, dock_windows, desktop_windows); else if (first) ft = focus_find_directional(first, dir, dock_windows, desktop_windows); @@ -305,26 +305,26 @@ ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows, ft = it->data; } - if (ft && ft != render_plugin->focus_cycle_target) {/* prevents flicker */ - render_plugin->focus_cycle_target = ft; + if (ft && ft != frame_engine->focus_cycle_target) {/* prevents flicker */ + frame_engine->focus_cycle_target = ft; if (!interactive) goto done_cycle; focus_cycle_draw_indicator(showbar ? ft : NULL); } - if (render_plugin->focus_cycle_target && dialog) + if (frame_engine->focus_cycle_target && dialog) /* same arguments as focus_target_valid */ - focus_cycle_popup_single_show(render_plugin->focus_cycle_target, + focus_cycle_popup_single_show(frame_engine->focus_cycle_target, focus_cycle_iconic_windows, focus_cycle_all_desktops, focus_cycle_dock_windows, focus_cycle_desktop_windows); - return render_plugin->focus_cycle_target; + return frame_engine->focus_cycle_target; done_cycle: - if (done && !cancel) ret = render_plugin->focus_cycle_target; + if (done && !cancel) ret = frame_engine->focus_cycle_target; first = NULL; - render_plugin->focus_cycle_target = NULL; + frame_engine->focus_cycle_target = NULL; focus_cycle_draw_indicator(NULL); focus_cycle_popup_single_hide(); diff --git a/openbox/focus_cycle_indicator.c b/openbox/focus_cycle_indicator.c index 4639cb1a..5e6feee9 100644 --- a/openbox/focus_cycle_indicator.c +++ b/openbox/focus_cycle_indicator.c @@ -151,7 +151,7 @@ void focus_cycle_draw_indicator(ObClient *c) visible = FALSE; } else if (c) { - Rect area = render_plugin->frame_get_window_area(c->frame); + Rect area = frame_engine->frame_get_window_area(c->frame); /* if (c) frame_adjust_focus(c->frame, FALSE); diff --git a/openbox/mouse.c b/openbox/mouse.c index 54a2a411..031000a0 100644 --- a/openbox/mouse.c +++ b/openbox/mouse.c @@ -117,7 +117,7 @@ void mouse_grab_for_client(ObClient *client, gboolean grab) guint mask; if (FRAME_CONTEXT(i, client)) { - win = render_plugin->frame_get_window(client->frame); + win = frame_engine->frame_get_window(client->frame); mode = GrabModeAsync; mask = ButtonPressMask | ButtonMotionMask | ButtonReleaseMask; } else if (CLIENT_CONTEXT(i, client)) { diff --git a/openbox/moveresize.c b/openbox/moveresize.c index fb27ec29..8a2543be 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -85,7 +85,7 @@ void moveresize_startup(gboolean reconfig) void moveresize_shutdown(gboolean reconfig) { if (!reconfig) { - if (render_plugin->moveresize_in_progress) + if (frame_engine->moveresize_in_progress) moveresize_end(FALSE); client_remove_destroy_notify(client_dest); } @@ -98,8 +98,8 @@ static void popup_coords(ObClient *c, const gchar *format, gint a, gint b) { gchar *text; - Strut size = render_plugin->frame_get_size(c->frame); - Rect area = render_plugin->frame_get_window_area(c->frame); + Strut size = frame_engine->frame_get_size(c->frame); + Rect area = frame_engine->frame_get_window_area(c->frame); text = g_strdup_printf(format, a, b); if (config_resize_popup_pos == OB_RESIZE_POS_TOP) popup_position(popup, SouthGravity, @@ -173,7 +173,7 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr) gint up = 1; gint left = 1; - if (render_plugin->moveresize_in_progress || !render_plugin->frame_is_visible(c->frame) || + if (frame_engine->moveresize_in_progress || !frame_engine->frame_is_visible(c->frame) || !(mv ? (c->functions & OB_CLIENT_FUNC_MOVE) : (c->functions & OB_CLIENT_FUNC_RESIZE))) @@ -222,7 +222,7 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr) return; } - render_plugin->frame_end_iconify_animation(c->frame); + frame_engine->frame_end_iconify_animation(c->frame); moving = mv; moveresize_client = c; @@ -253,7 +253,7 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr) cur_w = start_cw; cur_h = start_ch; - render_plugin->moveresize_in_progress = TRUE; + frame_engine->moveresize_in_progress = TRUE; #ifdef SYNC if (config_resize_redraw && !moving && obt_display_extension_sync && @@ -331,7 +331,7 @@ void moveresize_end(gboolean cancel) /* dont edge warp after its ended */ cancel_edge_warp(); - render_plugin->moveresize_in_progress = FALSE; + frame_engine->moveresize_in_progress = FALSE; moveresize_client = NULL; } @@ -349,8 +349,8 @@ static void do_move(gboolean keyboard, gint keydist) TRUE, FALSE, FALSE); if (config_resize_popup_show == 2) /* == "Always" */ popup_coords(moveresize_client, "%d x %d", - render_plugin->frame_get_window_area(moveresize_client->frame).x, - render_plugin->frame_get_window_area(moveresize_client->frame).y); + frame_engine->frame_get_window_area(moveresize_client->frame).x, + frame_engine->frame_get_window_area(moveresize_client->frame).y); } @@ -482,7 +482,7 @@ static void calc_resize(gboolean keyboard, gint keydist, gint *dw, gint *dh, } - Strut size = render_plugin->frame_get_size(moveresize_client->frame); + Strut size = frame_engine->frame_get_size(moveresize_client->frame); /* resist_size_* needs the frame size */ nw += size.left + size.right; @@ -830,7 +830,7 @@ gboolean moveresize_event(XEvent *e) { gboolean used = FALSE; - if (!render_plugin->moveresize_in_progress) return FALSE; + if (!frame_engine->moveresize_in_progress) return FALSE; if (e->type == ButtonPress) { if (!button) { diff --git a/openbox/openbox.c b/openbox/openbox.c index 8cbae592..e9e184c4 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -92,7 +92,7 @@ gchar *ob_sm_id = NULL; gchar *ob_sm_save_file = NULL; gboolean ob_sm_restore = TRUE; gboolean ob_debug_xinerama = FALSE; -ObFrameEngine * render_plugin = NULL; +ObFrameEngine * frame_engine = NULL; static ObState state; static gboolean xsync = FALSE; @@ -257,7 +257,7 @@ gint main(gint argc, gchar **argv) /* load the theme specified in the rc file */ { ob_debug("Entering LoadThemeConfig"); - render_plugin = init_frame_plugin ( + frame_engine = init_frame_plugin ( config_theme, TRUE, config_font_activewindow, config_font_inactivewindow, config_font_menutitle, config_font_menuitem, config_font_osd); @@ -287,7 +287,7 @@ gint main(gint argc, gchar **argv) /* update all existing windows for the new theme */ for (it = client_list; it; it = g_list_next(it)) { ObClient *c = it->data; - render_plugin->frame_adjust_theme(c->frame); + frame_engine->frame_adjust_theme(c->frame); } } event_startup(reconfigure); @@ -337,7 +337,7 @@ gint main(gint argc, gchar **argv) /* the new config can change the window's decorations */ client_setup_decor_and_functions(c, FALSE); /* redraw the frames */ - render_plugin->frame_update_layout (c->frame, FALSE, FALSE); + frame_engine->frame_update_layout (c->frame, FALSE, FALSE); /* the decor sizes may have changed, so the windows may end up in new positions */ client_reconfigure(c, FALSE); @@ -379,7 +379,7 @@ gint main(gint argc, gchar **argv) XSync(obt_display, FALSE); - if (render_plugin) + if (frame_engine) { //RrThemeFree(render_plugin->ob_rr_theme); //RrInstanceFree(render_plugin->ob_rr_inst); diff --git a/openbox/openbox.h b/openbox/openbox.h index fb90887f..f25875a5 100644 --- a/openbox/openbox.h +++ b/openbox/openbox.h @@ -48,7 +48,7 @@ extern gboolean ob_replace_wm; extern gboolean ob_debug_xinerama; /* render function */ -extern ObFrameEngine * render_plugin; +extern ObFrameEngine * frame_engine; /* The state of execution of the window manager */ ObState ob_state(); diff --git a/openbox/place.c b/openbox/place.c index 8c186134..50117f1a 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -149,7 +149,7 @@ static gboolean place_random(ObClient *client, gint *x, gint *y) Rect **areas; guint i; - Rect area = render_plugin->frame_get_window_area(client->frame); + Rect area = frame_engine->frame_get_window_area(client->frame); areas = pick_head(client); i = (config_place_monitor != OB_PLACE_MONITOR_ANY) ? @@ -313,7 +313,7 @@ static gboolean place_nooverlap(ObClient *c, gint *x, gint *y) */ /* don't ignore this window, so remove it from the available area */ - Rect test_area = render_plugin->frame_get_window_area(test->frame); + Rect test_area = frame_engine->frame_get_window_area(test->frame); spaces = area_remove(spaces, &test_area); } @@ -323,7 +323,7 @@ static gboolean place_nooverlap(ObClient *c, gint *x, gint *y) spaces = area_remove(spaces, &a); } - Rect c_area = render_plugin->frame_get_window_area(c->frame); + Rect c_area = frame_engine->frame_get_window_area(c->frame); for (sit = spaces; sit; sit = g_slist_next(sit)) { Rect *r = sit->data; @@ -368,8 +368,8 @@ static gboolean place_under_mouse(ObClient *client, gint *x, gint *y) gint px, py; Rect *area; - Strut fsize = render_plugin->frame_get_size(client->frame); - Rect farea = render_plugin->frame_get_window_area(client->frame); + Strut fsize = frame_engine->frame_get_size(client->frame); + Rect farea = frame_engine->frame_get_window_area(client->frame); if (!screen_pointer_pos(&px, &py)) return FALSE; @@ -419,7 +419,7 @@ static gboolean place_per_app_setting(ObClient *client, gint *x, gint *y, g_free(areas); } - Rect farea = render_plugin->frame_get_window_area(client->frame); + Rect farea = frame_engine->frame_get_window_area(client->frame); if (settings->position.x.center) *x = screen->x + screen->width / 2 - client->area.width / 2; else if (settings->position.x.opposite) @@ -448,7 +448,7 @@ static gboolean place_transient_splash(ObClient *client, gint *x, gint *y) gint l, r, t, b; for (it = client->parents; it; it = g_slist_next(it)) { ObClient *m = it->data; - Rect area = render_plugin->frame_get_window_area(m->frame); + Rect area = frame_engine->frame_get_window_area(m->frame); if (!m->iconic) { if (first) { l = RECT_LEFT(area); @@ -475,7 +475,7 @@ static gboolean place_transient_splash(ObClient *client, gint *x, gint *y) client->type == OB_CLIENT_TYPE_SPLASH) { Rect **areas; - Rect area = render_plugin->frame_get_window_area(client->frame); + Rect area = frame_engine->frame_get_window_area(client->frame); guint i; areas = pick_head(client); diff --git a/openbox/resist.c b/openbox/resist.c index 5e88326a..bced072f 100644 --- a/openbox/resist.c +++ b/openbox/resist.c @@ -105,7 +105,7 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y) GList *it; Rect dock_area; - Rect c_area = render_plugin->frame_get_window_area(c->frame); + Rect c_area = frame_engine->frame_get_window_area(c->frame); if (!resist) return; @@ -119,13 +119,13 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y) target = it->data; /* don't snap to self or non-visibles */ - if (!render_plugin->frame_is_visible(target->frame) || target == c) + if (!frame_engine->frame_is_visible(target->frame) || target == c) continue; /* don't snap to windows set to below and skip_taskbar (desklets) */ if (target->below && !c->below && target->skip_taskbar) continue; - Rect target_area = render_plugin->frame_get_window_area(target->frame); + Rect target_area = frame_engine->frame_get_window_area(target->frame); if (resist_move_window(c_area, target_area, resist, x, y)) break; @@ -147,7 +147,7 @@ void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y) gint w, h; /* current size */ Rect desired_area; - Rect c_area = render_plugin->frame_get_window_area(c->frame); + Rect c_area = frame_engine->frame_get_window_area(c->frame); if (!resist) return; @@ -302,7 +302,7 @@ void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h, ObClient *target; /* target */ Rect dock_area; - Rect c_area = render_plugin->frame_get_window_area(c->frame); + Rect c_area = frame_engine->frame_get_window_area(c->frame); if (!resist) return; for (it = stacking_list; it; it = g_list_next(it)) { @@ -311,13 +311,13 @@ void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h, target = it->data; /* don't snap to invisibles or ourself */ - if (!render_plugin->frame_is_visible(target->frame) || target == c) + if (!frame_engine->frame_is_visible(target->frame) || target == c) continue; /* don't snap to windows set to below and skip_taskbar (desklets) */ if (target->below && !c->below && target->skip_taskbar) continue; - Rect target_area = render_plugin->frame_get_window_area(target->frame); + Rect target_area = frame_engine->frame_get_window_area(target->frame); if (resist_size_window(c_area, target_area, resist, w, h, dir)) break; @@ -339,7 +339,7 @@ void resist_size_monitors(ObClient *c, gint resist, gint *w, gint *h, guint i; Rect desired_area; - Rect c_area = render_plugin->frame_get_window_area(c->frame); + Rect c_area = frame_engine->frame_get_window_area(c->frame); if (!resist) return; diff --git a/openbox/screen.c b/openbox/screen.c index b525c57f..84b3f1d7 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -571,9 +571,9 @@ static void screen_fallback_focus(void) if (c->can_focus) { /* reduce flicker by hiliting now rather than waiting for the server FocusIn event */ - render_plugin->frame_set_is_focus (c->frame, TRUE); - render_plugin->frame_update_layout (c->frame, FALSE, FALSE); - render_plugin->frame_update_skin (c->frame); + frame_engine->frame_set_is_focus (c->frame, TRUE); + frame_engine->frame_update_layout (c->frame, FALSE, FALSE); + frame_engine->frame_update_skin (c->frame); /* do this here so that if you switch desktops to a window with helper windows then the helper windows won't flash */ client_bring_helper_windows(c); @@ -1228,9 +1228,9 @@ void screen_show_desktop(gboolean show, ObClient *show_only) if (c->can_focus) { /* reduce flicker by hiliting now rather than waiting for the server FocusIn event */ - render_plugin->frame_set_is_focus(c->frame, TRUE); - render_plugin->frame_update_layout (c->frame, FALSE, FALSE); - render_plugin->frame_update_skin (c->frame); + frame_engine->frame_set_is_focus(c->frame, TRUE); + frame_engine->frame_update_layout (c->frame, FALSE, FALSE); + frame_engine->frame_update_skin (c->frame); } } } diff --git a/openbox/stacking.c b/openbox/stacking.c index 0f86947f..f1a108ee 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -544,7 +544,7 @@ static gboolean stacking_occluded(ObClient *client, ObClient *sibling) gboolean occluded = FALSE; gboolean found = FALSE; - Rect client_area = render_plugin->frame_get_window_area(client->frame); + Rect client_area = frame_engine->frame_get_window_area(client->frame); /* no need for any looping in this case */ if (sibling && client->layer != sibling->layer) return occluded; @@ -558,7 +558,7 @@ static gboolean stacking_occluded(ObClient *client, ObClient *sibling) c->desktop == client->desktop) && !client_search_transient(client, c)) { - Rect c_area = render_plugin->frame_get_window_area(c->frame); + Rect c_area = frame_engine->frame_get_window_area(c->frame); if (RECT_INTERSECTS_RECT(c_area, client_area)) { if (sibling != NULL) { @@ -590,7 +590,7 @@ static gboolean stacking_occludes(ObClient *client, ObClient *sibling) gboolean occludes = FALSE; gboolean found = FALSE; - Rect client_area = render_plugin->frame_get_window_area(client->frame); + Rect client_area = frame_engine->frame_get_window_area(client->frame); /* no need for any looping in this case */ if (sibling && client->layer != sibling->layer) @@ -604,7 +604,7 @@ static gboolean stacking_occludes(ObClient *client, ObClient *sibling) c->desktop == client->desktop) && !client_search_transient(c, client)) { - Rect c_area = render_plugin->frame_get_window_area(c->frame); + Rect c_area = frame_engine->frame_get_window_area(c->frame); if (RECT_INTERSECTS_RECT(c_area, client_area)) { if (sibling != NULL) { diff --git a/openbox/window.c b/openbox/window.c index 4c6b998b..136720b3 100644 --- a/openbox/window.c +++ b/openbox/window.c @@ -55,7 +55,7 @@ Window window_top(ObWindow *self) case OB_WINDOW_CLASS_DOCK: return WINDOW_AS_DOCK(self)->frame; case OB_WINDOW_CLASS_CLIENT: - return render_plugin->frame_get_window(WINDOW_AS_CLIENT(self)->frame); + return frame_engine->frame_get_window(WINDOW_AS_CLIENT(self)->frame); case OB_WINDOW_CLASS_INTERNAL: return WINDOW_AS_INTERNAL(self)->window; case OB_WINDOW_CLASS_PROMPT: