g_free(self);
}
-void frame_show(gpointer _self)
-{
- ObDefaultFrame * self = (ObDefaultFrame *) _self;
- if (!self->visible) {
- self->visible = TRUE;
- frame_update_skin(self);
- /* 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. */
- grab_server(TRUE);
- XMapWindow(obp_display, self->client->w_client);
- XMapWindow(obp_display, self->window);
- grab_server(FALSE);
- }
-}
-
-gint frame_hide(gpointer self)
-{
- if (OBDEFAULTFRAME(self)->visible) {
- OBDEFAULTFRAME(self)->visible = FALSE;
- if (!frame_iconify_animating(self))
- XUnmapWindow(obp_display, OBDEFAULTFRAME(self)->window);
- /* we unmap the client itself so that we can get MapRequest
- events, and because the ICCCM tells us to! */
- XUnmapWindow(obp_display, OBDEFAULTFRAME(self)->client->w_client);
- return 1;
- }
- else {
- return 0;
- }
-}
-
void frame_adjust_theme(gpointer self)
{
free_theme_statics(self);
0, /* */
frame_new, //gpointer (*frame_new) (struct _ObClient *c);
frame_free, //void (*frame_free) (gpointer self);
- frame_show, //void (*frame_show) (gpointer self);
- frame_hide, //void (*frame_hide) (gpointer self);
+
frame_adjust_theme, //void (*frame_adjust_theme) (gpointer self);
frame_adjust_shape, //void (*frame_adjust_shape) (gpointer self);
frame_grab, //void (*frame_adjust_area) (gpointer self, gboolean moved, gboolean resized, gboolean fake);
if (!config_focus_under_mouse)
ignore_start = event_start_ignore_all_enters();
- self->ignore_unmaps += render_plugin->frame_hide(self->frame);
+ client_hide_frame(self);
/* flush to send the hide to the server quickly */
XFlush(obt_display);
should be going to something under the window */
mouse_replay_pointer();
- render_plugin->frame_show(self->frame);
+ client_show_frame(self);
show = TRUE;
/* According to the ICCCM (sec 4.1.3.1) when a window is not visible,
should be going to the window */
mouse_replay_pointer();
- self->ignore_unmaps += render_plugin->frame_hide(self->frame);
+ client_hide_frame(self);
hide = TRUE;
/* According to the ICCCM (sec 4.1.3.1) when a window is not visible,
{
return self->group && self->group->members->next;
}
+
+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);
+ /* 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. */
+ grab_server(TRUE);
+ XMapWindow(obt_display, self->w_client);
+ XMapWindow(obt_display, self->w_frame);
+ grab_server(FALSE);
+}
+
+void client_hide_frame(ObClient * self)
+{
+ render_plugin->frame_set_is_visible(self->frame, FALSE);
+ if (!render_plugin->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! */
+ XUnmapWindow(obt_display, self->w_client);
+ self->ignore_unmaps++;
+}
gboolean client_has_group_siblings(ObClient *self);
+void client_show_frame(ObClient *);
+void client_hide_frame(ObClient *);
#endif
/* Free the frame */
void (*frame_free)(gpointer self);
- void (*frame_show)(gpointer self);
- gint (*frame_hide)(gpointer self);
-
void (*frame_adjust_theme)(gpointer self);
void (*frame_adjust_shape)(gpointer self);