mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
Add a stack-freeze feature to CWindow.
Wed May 24 14:36:42 2006 Søren Sandmann <sandmann@redhat.com> * src/c-window.c (meta_comp_window_{freeze,thaw}_stack: Add a stack-freeze feature to CWindow. * src/c-screen.c (meta_comp_screen_restack): Don't restack if the window is frozen.
This commit is contained in:
parent
7d2f0bf1fe
commit
ca3236f76c
@ -1,3 +1,11 @@
|
||||
Wed May 24 14:36:42 2006 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* src/c-window.c (meta_comp_window_{freeze,thaw}_stack: Add a
|
||||
stack-freeze feature to CWindow.
|
||||
|
||||
* src/c-screen.c (meta_comp_screen_restack): Don't restack if the
|
||||
window is frozen.
|
||||
|
||||
Wed May 24 13:09:49 2006 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* src/c-window.c: Fix compilation in the non-composited case.
|
||||
|
@ -155,7 +155,7 @@ repaint (gpointer data)
|
||||
cm_state_enable_depth_buffer_update (state);
|
||||
|
||||
g_object_unref (state);
|
||||
|
||||
|
||||
ws_window_gl_swap_buffers (info->gl_window);
|
||||
glFinish();
|
||||
|
||||
@ -414,12 +414,16 @@ meta_comp_screen_restack (MetaCompScreen *info,
|
||||
Window window,
|
||||
Window above_this)
|
||||
{
|
||||
MetaCompWindow *comp_window = find_comp_window (info, window);
|
||||
MetaCompWindow *above_comp_window = find_comp_window (info, above_this);
|
||||
CmNode *window_node = find_node (info, window);
|
||||
CmNode *above_node = find_node (info, above_this);
|
||||
|
||||
#if 0
|
||||
g_print ("restack %lx over %lx \n", window, above_this);
|
||||
#endif
|
||||
|
||||
if ((comp_window && meta_comp_window_stack_frozen (comp_window)) ||
|
||||
(above_comp_window && meta_comp_window_stack_frozen (above_comp_window)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
dump_stacking_order (info->stacker->children);
|
||||
|
@ -51,6 +51,8 @@ struct _MetaCompWindow
|
||||
|
||||
gboolean animation_in_progress;
|
||||
gboolean hide_after_animation;
|
||||
|
||||
int stack_freeze_count;
|
||||
};
|
||||
|
||||
static Window
|
||||
@ -191,7 +193,6 @@ meta_comp_window_hide (MetaCompWindow *comp_window)
|
||||
return;
|
||||
}
|
||||
|
||||
g_print ("hide %p\n", comp_window->node);
|
||||
cm_drawable_node_set_viewable (CM_DRAWABLE_NODE (comp_window->node), FALSE);
|
||||
}
|
||||
|
||||
@ -528,7 +529,7 @@ meta_comp_window_set_updates (MetaCompWindow *comp_window,
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (comp_window->node);
|
||||
|
||||
comp_window->updates = updates;
|
||||
|
||||
|
||||
cm_drawable_node_set_updates (node, updates);
|
||||
|
||||
if (updates)
|
||||
@ -981,3 +982,21 @@ meta_compositor_minimize (MetaCompositor *compositor,
|
||||
g_idle_add (run_animation_01, info);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_comp_window_freeze_stack (MetaCompWindow *comp_window)
|
||||
{
|
||||
comp_window->stack_freeze_count++;
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_window_thaw_stack (MetaCompWindow *comp_window)
|
||||
{
|
||||
comp_window->stack_freeze_count--;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_comp_window_stack_frozen (MetaCompWindow *comp_window)
|
||||
{
|
||||
return comp_window->stack_freeze_count > 0;
|
||||
}
|
||||
|
@ -45,6 +45,11 @@ void meta_comp_window_shrink (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_unshrink (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_restack (MetaCompWindow *comp_window,
|
||||
MetaCompWindow *above);
|
||||
void meta_comp_window_freeze_stack (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_thaw_stack (MetaCompWindow *comp_window);
|
||||
gboolean meta_comp_window_stack_frozen (MetaCompWindow *comp_window);
|
||||
|
||||
#if 0
|
||||
void meta_comp_window_set_explode (MetaCompWindow *comp_window,
|
||||
|
@ -143,6 +143,7 @@ do_effect (MetaEffect *effect,
|
||||
MetaCompWindow *window =
|
||||
meta_comp_screen_lookup_window (screen, effect->u.minimize.window->frame->xwindow);
|
||||
|
||||
meta_comp_window_freeze_stack (window);
|
||||
meta_comp_window_set_updates (window, FALSE);
|
||||
meta_comp_window_explode (window, effect);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user