mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
compositor: Clean up
Remove a bunch of weird checks, random logs, unused variables and other cruft that nobody cares about today.
This commit is contained in:
parent
33f1bd96f5
commit
be57308663
@ -19,14 +19,10 @@ struct _MetaCompositor
|
|||||||
|
|
||||||
guint repaint_func_id;
|
guint repaint_func_id;
|
||||||
|
|
||||||
ClutterActor *shadow_src;
|
|
||||||
|
|
||||||
gint64 server_time_query_time;
|
gint64 server_time_query_time;
|
||||||
gint64 server_time_offset;
|
gint64 server_time_offset;
|
||||||
|
|
||||||
guint server_time_is_monotonic_time : 1;
|
guint server_time_is_monotonic_time : 1;
|
||||||
guint show_redraw : 1;
|
|
||||||
guint debug : 1;
|
|
||||||
guint no_mipmaps : 1;
|
guint no_mipmaps : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -34,10 +30,9 @@ struct _MetaCompScreen
|
|||||||
{
|
{
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
|
|
||||||
ClutterActor *stage, *window_group, *top_window_group, *overlay_group;
|
ClutterActor *stage, *window_group, *top_window_group;
|
||||||
ClutterActor *background_actor;
|
ClutterActor *background_actor;
|
||||||
GList *windows;
|
GList *windows;
|
||||||
GHashTable *windows_by_xid;
|
|
||||||
Window output;
|
Window output;
|
||||||
|
|
||||||
CoglOnscreen *onscreen;
|
CoglOnscreen *onscreen;
|
||||||
|
@ -89,9 +89,6 @@ is_modal (MetaDisplay *display)
|
|||||||
return display->grab_op == META_GRAB_OP_COMPOSITOR;
|
return display->grab_op == META_GRAB_OP_COMPOSITOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #define DEBUG_TRACE g_print */
|
|
||||||
#define DEBUG_TRACE(X)
|
|
||||||
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
composite_at_least_version (MetaDisplay *display, int maj, int min)
|
composite_at_least_version (MetaDisplay *display, int maj, int min)
|
||||||
{
|
{
|
||||||
@ -115,13 +112,8 @@ meta_finish_workspace_switch (MetaCompScreen *info)
|
|||||||
for (l = info->windows; l; l = l->next)
|
for (l = info->windows; l; l = l->next)
|
||||||
meta_window_actor_sync_visibility (l->data);
|
meta_window_actor_sync_visibility (l->data);
|
||||||
|
|
||||||
/*
|
/* Fix up stacking order. */
|
||||||
* Fix up stacking order in case the plugin messed it up.
|
|
||||||
*/
|
|
||||||
sync_actor_stacking (info);
|
sync_actor_stacking (info);
|
||||||
|
|
||||||
/* printf ("... FINISHED DESKTOP SWITCH\n"); */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -147,33 +139,12 @@ meta_compositor_destroy (MetaCompositor *compositor)
|
|||||||
clutter_threads_remove_repaint_func (compositor->repaint_func_id);
|
clutter_threads_remove_repaint_func (compositor->repaint_func_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
add_win (MetaWindow *window)
|
|
||||||
{
|
|
||||||
MetaScreen *screen = meta_window_get_screen (window);
|
|
||||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
|
||||||
|
|
||||||
g_return_if_fail (info != NULL);
|
|
||||||
|
|
||||||
meta_window_actor_new (window);
|
|
||||||
|
|
||||||
sync_actor_stacking (info);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
process_damage (MetaCompositor *compositor,
|
process_damage (MetaCompositor *compositor,
|
||||||
XDamageNotifyEvent *event,
|
XDamageNotifyEvent *event,
|
||||||
MetaWindow *window)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor;
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
|
|
||||||
if (window == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
|
||||||
if (window_actor == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
meta_window_actor_process_x11_damage (window_actor, event);
|
meta_window_actor_process_x11_damage (window_actor, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -767,11 +738,12 @@ meta_compositor_add_window (MetaCompositor *compositor,
|
|||||||
{
|
{
|
||||||
MetaScreen *screen = meta_window_get_screen (window);
|
MetaScreen *screen = meta_window_get_screen (window);
|
||||||
MetaDisplay *display = meta_screen_get_display (screen);
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
|
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_add_window\n");
|
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
|
|
||||||
add_win (window);
|
meta_window_actor_new (window);
|
||||||
|
sync_actor_stacking (info);
|
||||||
|
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
}
|
}
|
||||||
@ -780,17 +752,9 @@ void
|
|||||||
meta_compositor_remove_window (MetaCompositor *compositor,
|
meta_compositor_remove_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = NULL;
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
MetaScreen *screen;
|
MetaScreen *screen = meta_window_get_screen (window);
|
||||||
MetaCompScreen *info;
|
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_remove_window\n");
|
|
||||||
window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
|
||||||
if (!window_actor)
|
|
||||||
return;
|
|
||||||
|
|
||||||
screen = meta_window_get_screen (window);
|
|
||||||
info = meta_screen_get_compositor_data (screen);
|
|
||||||
|
|
||||||
if (info->unredirected_window == window)
|
if (info->unredirected_window == window)
|
||||||
set_unredirected_window (info, NULL);
|
set_unredirected_window (info, NULL);
|
||||||
@ -803,13 +767,7 @@ meta_compositor_set_updates_frozen (MetaCompositor *compositor,
|
|||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean updates_frozen)
|
gboolean updates_frozen)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor;
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_set_updates_frozen\n");
|
|
||||||
window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
|
||||||
if (!window_actor)
|
|
||||||
return;
|
|
||||||
|
|
||||||
meta_window_actor_set_updates_frozen (window_actor, updates_frozen);
|
meta_window_actor_set_updates_frozen (window_actor, updates_frozen);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -818,13 +776,7 @@ meta_compositor_queue_frame_drawn (MetaCompositor *compositor,
|
|||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean no_delay_frame)
|
gboolean no_delay_frame)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor;
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_queue_frame_drawn\n");
|
|
||||||
window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
|
||||||
if (!window_actor)
|
|
||||||
return;
|
|
||||||
|
|
||||||
meta_window_actor_queue_frame_drawn (window_actor, no_delay_frame);
|
meta_window_actor_queue_frame_drawn (window_actor, no_delay_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1017,10 +969,7 @@ meta_compositor_process_event (MetaCompositor *compositor,
|
|||||||
maybe_spoof_event_as_stage_event (info, window, event);
|
maybe_spoof_event_as_stage_event (info, window, event);
|
||||||
|
|
||||||
if (meta_plugin_manager_xevent_filter (info->plugin_mgr, event))
|
if (meta_plugin_manager_xevent_filter (info->plugin_mgr, event))
|
||||||
{
|
|
||||||
DEBUG_TRACE ("meta_compositor_process_event (filtered,window==NULL)\n");
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
|
||||||
|
|
||||||
if (!meta_is_wayland_compositor () &&
|
if (!meta_is_wayland_compositor () &&
|
||||||
event->type == meta_display_get_damage_event_base (compositor->display) + XDamageNotify)
|
event->type == meta_display_get_damage_event_base (compositor->display) + XDamageNotify)
|
||||||
@ -1034,7 +983,6 @@ meta_compositor_process_event (MetaCompositor *compositor,
|
|||||||
window = meta_display_lookup_x_window (compositor->display, xwin);
|
window = meta_display_lookup_x_window (compositor->display, xwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_process_event (process_damage)\n");
|
|
||||||
process_damage (compositor, (XDamageNotifyEvent *) event, window);
|
process_damage (compositor, (XDamageNotifyEvent *) event, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1069,10 +1017,6 @@ meta_compositor_show_window (MetaCompositor *compositor,
|
|||||||
MetaCompEffect effect)
|
MetaCompEffect effect)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
DEBUG_TRACE ("meta_compositor_show_window\n");
|
|
||||||
if (!window_actor)
|
|
||||||
return;
|
|
||||||
|
|
||||||
meta_window_actor_show (window_actor, effect);
|
meta_window_actor_show (window_actor, effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1082,10 +1026,6 @@ meta_compositor_hide_window (MetaCompositor *compositor,
|
|||||||
MetaCompEffect effect)
|
MetaCompEffect effect)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
DEBUG_TRACE ("meta_compositor_hide_window\n");
|
|
||||||
if (!window_actor)
|
|
||||||
return;
|
|
||||||
|
|
||||||
meta_window_actor_hide (window_actor, effect);
|
meta_window_actor_hide (window_actor, effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1096,10 +1036,6 @@ meta_compositor_maximize_window (MetaCompositor *compositor,
|
|||||||
MetaRectangle *new_rect)
|
MetaRectangle *new_rect)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
DEBUG_TRACE ("meta_compositor_maximize_window\n");
|
|
||||||
if (!window_actor)
|
|
||||||
return;
|
|
||||||
|
|
||||||
meta_window_actor_maximize (window_actor, old_rect, new_rect);
|
meta_window_actor_maximize (window_actor, old_rect, new_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1110,10 +1046,6 @@ meta_compositor_unmaximize_window (MetaCompositor *compositor,
|
|||||||
MetaRectangle *new_rect)
|
MetaRectangle *new_rect)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
DEBUG_TRACE ("meta_compositor_unmaximize_window\n");
|
|
||||||
if (!window_actor)
|
|
||||||
return;
|
|
||||||
|
|
||||||
meta_window_actor_unmaximize (window_actor, old_rect, new_rect);
|
meta_window_actor_unmaximize (window_actor, old_rect, new_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1131,8 +1063,6 @@ meta_compositor_switch_workspace (MetaCompositor *compositor,
|
|||||||
to_indx = meta_workspace_index (to);
|
to_indx = meta_workspace_index (to);
|
||||||
from_indx = meta_workspace_index (from);
|
from_indx = meta_workspace_index (from);
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_switch_workspace\n");
|
|
||||||
|
|
||||||
if (!info) /* During startup before manage_screen() */
|
if (!info) /* During startup before manage_screen() */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1251,8 +1181,6 @@ meta_compositor_sync_stack (MetaCompositor *compositor,
|
|||||||
GList *old_stack;
|
GList *old_stack;
|
||||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_sync_stack\n");
|
|
||||||
|
|
||||||
/* This is painful because hidden windows that we are in the process
|
/* This is painful because hidden windows that we are in the process
|
||||||
* of animating out of existence. They'll be at the bottom of the
|
* of animating out of existence. They'll be at the bottom of the
|
||||||
* stack of X windows, but we want to leave them in their old position
|
* stack of X windows, but we want to leave them in their old position
|
||||||
@ -1341,15 +1269,6 @@ meta_compositor_sync_window_geometry (MetaCompositor *compositor,
|
|||||||
gboolean did_placement)
|
gboolean did_placement)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
MetaScreen *screen = meta_window_get_screen (window);
|
|
||||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_sync_window_geometry\n");
|
|
||||||
g_return_if_fail (info);
|
|
||||||
|
|
||||||
if (!window_actor)
|
|
||||||
return;
|
|
||||||
|
|
||||||
meta_window_actor_sync_actor_geometry (window_actor, did_placement);
|
meta_window_actor_sync_actor_geometry (window_actor, did_placement);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1381,7 +1300,6 @@ meta_compositor_sync_screen_size (MetaCompositor *compositor,
|
|||||||
Display *xdisplay;
|
Display *xdisplay;
|
||||||
Window xwin;
|
Window xwin;
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_sync_screen_size\n");
|
|
||||||
g_return_if_fail (info);
|
g_return_if_fail (info);
|
||||||
|
|
||||||
xdisplay = meta_display_get_xdisplay (display);
|
xdisplay = meta_display_get_xdisplay (display);
|
||||||
|
Loading…
Reference in New Issue
Block a user