Compare commits
	
		
			9 Commits
		
	
	
		
			3.34.6
			...
			wip/mult-w
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 8b2a85f636 | ||
|   | df35234841 | ||
|   | 84b71cf297 | ||
|   | 8cf420b128 | ||
|   | d1dda65339 | ||
|   | 057d8830e9 | ||
|   | 570953819d | ||
|   | 0601987651 | ||
|   | 853098142f | 
| @@ -150,10 +150,28 @@ add_win (MetaWindow *window) | |||||||
| { | { | ||||||
|   MetaScreen		*screen = meta_window_get_screen (window); |   MetaScreen		*screen = meta_window_get_screen (window); | ||||||
|   MetaCompScreen        *info = meta_screen_get_compositor_data (screen); |   MetaCompScreen        *info = meta_screen_get_compositor_data (screen); | ||||||
|  |   MetaWindowActor       *actor; | ||||||
|  |   ClutterActor          *window_group; | ||||||
|  |  | ||||||
|   g_return_if_fail (info != NULL); |   g_return_if_fail (info != NULL); | ||||||
|  |  | ||||||
|   meta_window_actor_new (window); |   actor = meta_window_actor_new (window); | ||||||
|  |  | ||||||
|  |   window->core_actor = actor; | ||||||
|  |  | ||||||
|  |   if (window->layer == META_LAYER_OVERRIDE_REDIRECT) | ||||||
|  |     window_group = info->top_window_group; | ||||||
|  |   else | ||||||
|  |     window_group = info->window_group; | ||||||
|  |   clutter_actor_add_child (window_group, CLUTTER_ACTOR (actor)); | ||||||
|  |  | ||||||
|  |   clutter_actor_set_reactive (CLUTTER_ACTOR (actor), TRUE); | ||||||
|  |   clutter_actor_hide (CLUTTER_ACTOR (actor)); | ||||||
|  |  | ||||||
|  |   /* Initial position in the stack is arbitrary; stacking will be synced | ||||||
|  |    * before we first paint. | ||||||
|  |    */ | ||||||
|  |   info->windows = g_list_append (info->windows, actor); | ||||||
|  |  | ||||||
|   sync_actor_stacking (info); |   sync_actor_stacking (info); | ||||||
| } | } | ||||||
| @@ -163,16 +181,13 @@ process_damage (MetaCompositor     *compositor, | |||||||
|                 XDamageNotifyEvent *event, |                 XDamageNotifyEvent *event, | ||||||
|                 MetaWindow         *window) |                 MetaWindow         *window) | ||||||
| { | { | ||||||
|   MetaWindowActor *window_actor; |   GSList *iter; | ||||||
|  |  | ||||||
|   if (window == NULL) |   if (window == NULL) | ||||||
|     return; |     return; | ||||||
|  |  | ||||||
|   window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); |   for (iter = window->actors; iter != NULL; iter = iter->next) | ||||||
|   if (window_actor == NULL) |     meta_window_actor_process_damage (META_WINDOW_ACTOR (iter->data), event); | ||||||
|     return; |  | ||||||
|  |  | ||||||
|   meta_window_actor_process_damage (window_actor, event); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| static void | static void | ||||||
| @@ -180,24 +195,12 @@ process_property_notify (MetaCompositor	*compositor, | |||||||
|                          XPropertyEvent *event, |                          XPropertyEvent *event, | ||||||
|                          MetaWindow     *window) |                          MetaWindow     *window) | ||||||
| { | { | ||||||
|   MetaWindowActor *window_actor; |   if (window == NULL || window->core_actor == NULL) | ||||||
|  |  | ||||||
|   if (window == NULL) |  | ||||||
|     return; |  | ||||||
|  |  | ||||||
|   window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); |  | ||||||
|   if (window_actor == NULL) |  | ||||||
|     return; |     return; | ||||||
|  |  | ||||||
|   /* Check for the opacity changing */ |   /* Check for the opacity changing */ | ||||||
|   if (event->atom == compositor->atom_net_wm_window_opacity) |   if (event->atom == compositor->atom_net_wm_window_opacity) | ||||||
|     { |     meta_window_actor_update_opacity (window->core_actor); | ||||||
|       meta_window_actor_update_opacity (window_actor); |  | ||||||
|       DEBUG_TRACE ("process_property_notify: net_wm_window_opacity\n"); |  | ||||||
|       return; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|   DEBUG_TRACE ("process_property_notify: unknown\n"); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| static Window | static Window | ||||||
| @@ -789,27 +792,30 @@ void | |||||||
| meta_compositor_remove_window (MetaCompositor *compositor, | meta_compositor_remove_window (MetaCompositor *compositor, | ||||||
|                                MetaWindow     *window) |                                MetaWindow     *window) | ||||||
| { | { | ||||||
|   MetaWindowActor         *window_actor     = NULL; |  | ||||||
|   MetaScreen *screen; |   MetaScreen *screen; | ||||||
|   MetaCompScreen *info; |   MetaCompScreen *info; | ||||||
|  |   GSList *iter; | ||||||
|  |  | ||||||
|   DEBUG_TRACE ("meta_compositor_remove_window\n"); |   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); |   screen = meta_window_get_screen (window); | ||||||
|   info = meta_screen_get_compositor_data (screen); |   info = meta_screen_get_compositor_data (screen); | ||||||
|  |  | ||||||
|   if (window_actor == info->unredirected_window) |   if (window->core_actor == info->unredirected_window) | ||||||
|     { |     { | ||||||
|       meta_window_actor_set_redirected (window_actor, TRUE); |       meta_window_actor_set_redirected (info->unredirected_window, TRUE); | ||||||
|       meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (info->unredirected_window)), |       meta_shape_cow_for_window (meta_window_get_screen (window), NULL); | ||||||
|                                  NULL); |  | ||||||
|       info->unredirected_window = NULL; |       info->unredirected_window = NULL; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   meta_window_actor_destroy (window_actor); |   window->core_actor = NULL; | ||||||
|  |  | ||||||
|  |   for (iter = window->actors; iter != NULL; iter = iter->next) | ||||||
|  |     { | ||||||
|  |       MetaWindowActor *actor = META_WINDOW_ACTOR (iter->data); | ||||||
|  |       meta_window_actor_destroy (actor); | ||||||
|  |       info->windows = g_list_remove (info->windows, (gconstpointer) actor); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| @@ -869,12 +875,10 @@ void | |||||||
| meta_compositor_window_shape_changed (MetaCompositor *compositor, | meta_compositor_window_shape_changed (MetaCompositor *compositor, | ||||||
|                                       MetaWindow     *window) |                                       MetaWindow     *window) | ||||||
| { | { | ||||||
|   MetaWindowActor *window_actor; |   GSList *iter; | ||||||
|   window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); |  | ||||||
|   if (!window_actor) |  | ||||||
|     return; |  | ||||||
|  |  | ||||||
|   meta_window_actor_update_shape (window_actor); |   for (iter = window->actors; iter != NULL; iter = iter->next) | ||||||
|  |     meta_window_actor_update_shape (META_WINDOW_ACTOR (iter->data)); | ||||||
| } | } | ||||||
|  |  | ||||||
| /* Clutter makes the assumption that there is only one X window | /* Clutter makes the assumption that there is only one X window | ||||||
| @@ -1037,12 +1041,8 @@ meta_compositor_show_window (MetaCompositor *compositor, | |||||||
| 			     MetaWindow	    *window, | 			     MetaWindow	    *window, | ||||||
|                              MetaCompEffect  effect) |                              MetaCompEffect  effect) | ||||||
| { | { | ||||||
|   MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); |   if (window->core_actor != NULL) | ||||||
|   DEBUG_TRACE ("meta_compositor_show_window\n"); |     meta_window_actor_show (window->core_actor, effect); | ||||||
|   if (!window_actor) |  | ||||||
|     return; |  | ||||||
|  |  | ||||||
|   meta_window_actor_show (window_actor, effect); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| @@ -1050,12 +1050,8 @@ meta_compositor_hide_window (MetaCompositor *compositor, | |||||||
|                              MetaWindow     *window, |                              MetaWindow     *window, | ||||||
|                              MetaCompEffect  effect) |                              MetaCompEffect  effect) | ||||||
| { | { | ||||||
|   MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); |   if (window->core_actor != NULL) | ||||||
|   DEBUG_TRACE ("meta_compositor_hide_window\n"); |     meta_window_actor_hide (window->core_actor, effect); | ||||||
|   if (!window_actor) |  | ||||||
|     return; |  | ||||||
|  |  | ||||||
|   meta_window_actor_hide (window_actor, effect); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| @@ -1064,12 +1060,8 @@ meta_compositor_maximize_window (MetaCompositor    *compositor, | |||||||
| 				 MetaRectangle	   *old_rect, | 				 MetaRectangle	   *old_rect, | ||||||
| 				 MetaRectangle	   *new_rect) | 				 MetaRectangle	   *new_rect) | ||||||
| { | { | ||||||
|   MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); |   if (window->core_actor != NULL) | ||||||
|   DEBUG_TRACE ("meta_compositor_maximize_window\n"); |     meta_window_actor_maximize (window->core_actor, old_rect, new_rect); | ||||||
|   if (!window_actor) |  | ||||||
|     return; |  | ||||||
|  |  | ||||||
|   meta_window_actor_maximize (window_actor, old_rect, new_rect); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| @@ -1078,12 +1070,8 @@ meta_compositor_unmaximize_window (MetaCompositor    *compositor, | |||||||
| 				   MetaRectangle     *old_rect, | 				   MetaRectangle     *old_rect, | ||||||
| 				   MetaRectangle     *new_rect) | 				   MetaRectangle     *new_rect) | ||||||
| { | { | ||||||
|   MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); |   if (window->core_actor != NULL) | ||||||
|   DEBUG_TRACE ("meta_compositor_unmaximize_window\n"); |     meta_window_actor_unmaximize (window->core_actor, old_rect, new_rect); | ||||||
|   if (!window_actor) |  | ||||||
|     return; |  | ||||||
|  |  | ||||||
|   meta_window_actor_unmaximize (window_actor, old_rect, new_rect); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| @@ -1259,7 +1247,7 @@ meta_compositor_sync_stack (MetaCompositor  *compositor, | |||||||
|       while (stack) |       while (stack) | ||||||
|         { |         { | ||||||
|           stack_window = stack->data; |           stack_window = stack->data; | ||||||
|           stack_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (stack_window)); |           stack_actor = stack_window->core_actor; | ||||||
|           if (!stack_actor) |           if (!stack_actor) | ||||||
|             { |             { | ||||||
|               meta_verbose ("Failed to find corresponding MetaWindowActor " |               meta_verbose ("Failed to find corresponding MetaWindowActor " | ||||||
| @@ -1308,24 +1296,16 @@ void | |||||||
| meta_compositor_window_mapped (MetaCompositor *compositor, | meta_compositor_window_mapped (MetaCompositor *compositor, | ||||||
|                                MetaWindow     *window) |                                MetaWindow     *window) | ||||||
| { | { | ||||||
|   MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); |   if (window->core_actor != NULL) | ||||||
|   DEBUG_TRACE ("meta_compositor_window_mapped\n"); |     meta_window_actor_mapped (window->core_actor); | ||||||
|   if (!window_actor) |  | ||||||
|     return; |  | ||||||
|  |  | ||||||
|   meta_window_actor_mapped (window_actor); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| meta_compositor_window_unmapped (MetaCompositor *compositor, | meta_compositor_window_unmapped (MetaCompositor *compositor, | ||||||
|                                  MetaWindow     *window) |                                  MetaWindow     *window) | ||||||
| { | { | ||||||
|   MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); |   if (window->core_actor != NULL) | ||||||
|   DEBUG_TRACE ("meta_compositor_window_unmapped\n"); |     meta_window_actor_unmapped (window->core_actor); | ||||||
|   if (!window_actor) |  | ||||||
|     return; |  | ||||||
|  |  | ||||||
|   meta_window_actor_unmapped (window_actor); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| @@ -1333,17 +1313,8 @@ meta_compositor_sync_window_geometry (MetaCompositor *compositor, | |||||||
| 				      MetaWindow *window, | 				      MetaWindow *window, | ||||||
|                                       gboolean did_placement) |                                       gboolean did_placement) | ||||||
| { | { | ||||||
|   MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); |   if (window->core_actor != NULL) | ||||||
|   MetaScreen      *screen = meta_window_get_screen (window); |     meta_window_actor_sync_actor_geometry (window->core_actor, did_placement); | ||||||
|   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); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
|   | |||||||
| @@ -34,19 +34,11 @@ | |||||||
| #include "monitor-private.h" | #include "monitor-private.h" | ||||||
| #include "meta-cullable.h" | #include "meta-cullable.h" | ||||||
|  |  | ||||||
| enum { | static void meta_window_actor_queue_create_pixmap (MetaWindowActor *self); | ||||||
|   POSITION_CHANGED, |  | ||||||
|   SIZE_CHANGED, |  | ||||||
|   LAST_SIGNAL |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| static guint signals[LAST_SIGNAL] = {0}; |  | ||||||
|  |  | ||||||
|  |  | ||||||
| struct _MetaWindowActorPrivate | struct _MetaWindowActorPrivate | ||||||
| { | { | ||||||
|   MetaWindow       *window; |   MetaWindow       *window; | ||||||
|   Window            xwindow; |  | ||||||
|   MetaScreen       *screen; |   MetaScreen       *screen; | ||||||
|  |  | ||||||
|   ClutterActor     *actor; |   ClutterActor     *actor; | ||||||
| @@ -155,8 +147,6 @@ struct _FrameData | |||||||
| enum | enum | ||||||
| { | { | ||||||
|   PROP_META_WINDOW = 1, |   PROP_META_WINDOW = 1, | ||||||
|   PROP_META_SCREEN, |  | ||||||
|   PROP_X_WINDOW, |  | ||||||
|   PROP_NO_SHADOW, |   PROP_NO_SHADOW, | ||||||
|   PROP_SHADOW_CLASS |   PROP_SHADOW_CLASS | ||||||
| }; | }; | ||||||
| @@ -225,33 +215,12 @@ meta_window_actor_class_init (MetaWindowActorClass *klass) | |||||||
|                                "MetaWindow", |                                "MetaWindow", | ||||||
|                                "The displayed MetaWindow", |                                "The displayed MetaWindow", | ||||||
|                                META_TYPE_WINDOW, |                                META_TYPE_WINDOW, | ||||||
|                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT); |                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); | ||||||
|  |  | ||||||
|   g_object_class_install_property (object_class, |   g_object_class_install_property (object_class, | ||||||
|                                    PROP_META_WINDOW, |                                    PROP_META_WINDOW, | ||||||
|                                    pspec); |                                    pspec); | ||||||
|  |  | ||||||
|   pspec = g_param_spec_pointer ("meta-screen", |  | ||||||
| 				"MetaScreen", |  | ||||||
| 				"MetaScreen", |  | ||||||
| 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT); |  | ||||||
|  |  | ||||||
|   g_object_class_install_property (object_class, |  | ||||||
|                                    PROP_META_SCREEN, |  | ||||||
|                                    pspec); |  | ||||||
|  |  | ||||||
|   pspec = g_param_spec_ulong ("x-window", |  | ||||||
| 			      "Window", |  | ||||||
| 			      "Window", |  | ||||||
| 			      0, |  | ||||||
| 			      G_MAXULONG, |  | ||||||
| 			      0, |  | ||||||
| 			      G_PARAM_READWRITE | G_PARAM_CONSTRUCT); |  | ||||||
|  |  | ||||||
|   g_object_class_install_property (object_class, |  | ||||||
|                                    PROP_X_WINDOW, |  | ||||||
|                                    pspec); |  | ||||||
|  |  | ||||||
|   pspec = g_param_spec_boolean ("no-shadow", |   pspec = g_param_spec_boolean ("no-shadow", | ||||||
|                                 "No shadow", |                                 "No shadow", | ||||||
|                                 "Do not add shaddow to this window", |                                 "Do not add shaddow to this window", | ||||||
| @@ -271,19 +240,6 @@ meta_window_actor_class_init (MetaWindowActorClass *klass) | |||||||
|   g_object_class_install_property (object_class, |   g_object_class_install_property (object_class, | ||||||
|                                    PROP_SHADOW_CLASS, |                                    PROP_SHADOW_CLASS, | ||||||
|                                    pspec); |                                    pspec); | ||||||
|  |  | ||||||
|   signals[POSITION_CHANGED] = |  | ||||||
|     g_signal_new ("position-changed", |  | ||||||
|                   G_TYPE_FROM_CLASS (klass), |  | ||||||
|                   G_SIGNAL_RUN_LAST, |  | ||||||
|                   0, NULL, NULL, NULL, |  | ||||||
|                   G_TYPE_NONE, 0); |  | ||||||
|   signals[SIZE_CHANGED] = |  | ||||||
|     g_signal_new ("size-changed", |  | ||||||
|                   G_TYPE_FROM_CLASS (klass), |  | ||||||
|                   G_SIGNAL_RUN_LAST, |  | ||||||
|                   0, NULL, NULL, NULL, |  | ||||||
|                   G_TYPE_NONE, 0); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| static void | static void | ||||||
| @@ -296,6 +252,9 @@ meta_window_actor_init (MetaWindowActor *self) | |||||||
| 						   MetaWindowActorPrivate); | 						   MetaWindowActorPrivate); | ||||||
|   priv->opacity = 0xff; |   priv->opacity = 0xff; | ||||||
|   priv->shadow_class = NULL; |   priv->shadow_class = NULL; | ||||||
|  |  | ||||||
|  |   priv->last_width = -1; | ||||||
|  |   priv->last_height = -1; | ||||||
| } | } | ||||||
|  |  | ||||||
| static void | static void | ||||||
| @@ -305,11 +264,9 @@ window_decorated_notify (MetaWindow *mw, | |||||||
| { | { | ||||||
|   MetaWindowActor        *self     = META_WINDOW_ACTOR (data); |   MetaWindowActor        *self     = META_WINDOW_ACTOR (data); | ||||||
|   MetaWindowActorPrivate *priv     = self->priv; |   MetaWindowActorPrivate *priv     = self->priv; | ||||||
|   MetaFrame              *frame    = meta_window_get_frame (mw); |  | ||||||
|   MetaScreen             *screen   = priv->screen; |   MetaScreen             *screen   = priv->screen; | ||||||
|   MetaDisplay            *display  = meta_screen_get_display (screen); |   MetaDisplay            *display  = meta_screen_get_display (screen); | ||||||
|   Display                *xdisplay = meta_display_get_xdisplay (display); |   Display                *xdisplay = meta_display_get_xdisplay (display); | ||||||
|   Window                  new_xwindow; |  | ||||||
|  |  | ||||||
|   /* |   /* | ||||||
|    * Basically, we have to reconstruct the the internals of this object |    * Basically, we have to reconstruct the the internals of this object | ||||||
| @@ -317,11 +274,6 @@ window_decorated_notify (MetaWindow *mw, | |||||||
|    */ |    */ | ||||||
|   priv->redecorating = TRUE; |   priv->redecorating = TRUE; | ||||||
|  |  | ||||||
|   if (frame) |  | ||||||
|     new_xwindow = meta_frame_get_xwindow (frame); |  | ||||||
|   else |  | ||||||
|     new_xwindow = meta_window_get_xwindow (mw); |  | ||||||
|  |  | ||||||
|   meta_window_actor_detach (self); |   meta_window_actor_detach (self); | ||||||
|  |  | ||||||
|   /* |   /* | ||||||
| @@ -336,7 +288,7 @@ window_decorated_notify (MetaWindow *mw, | |||||||
|       priv->damage = None; |       priv->damage = None; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   priv->xwindow = new_xwindow; |   priv->xwindow = meta_window_get_toplevel_xwindow (priv->window); | ||||||
|  |  | ||||||
|   /* |   /* | ||||||
|    * Recreate the contents. |    * Recreate the contents. | ||||||
| @@ -357,13 +309,16 @@ meta_window_actor_constructed (GObject *object) | |||||||
| { | { | ||||||
|   MetaWindowActor        *self     = META_WINDOW_ACTOR (object); |   MetaWindowActor        *self     = META_WINDOW_ACTOR (object); | ||||||
|   MetaWindowActorPrivate *priv     = self->priv; |   MetaWindowActorPrivate *priv     = self->priv; | ||||||
|   MetaScreen             *screen   = priv->screen; |  | ||||||
|   MetaDisplay            *display  = meta_screen_get_display (screen); |  | ||||||
|   Window                  xwindow  = priv->xwindow; |  | ||||||
|   MetaWindow             *window   = priv->window; |   MetaWindow             *window   = priv->window; | ||||||
|  |   MetaScreen             *screen   = meta_window_get_screen (window); | ||||||
|  |   MetaDisplay            *display  = meta_screen_get_display (screen); | ||||||
|   Display                *xdisplay = meta_display_get_xdisplay (display); |   Display                *xdisplay = meta_display_get_xdisplay (display); | ||||||
|   XRenderPictFormat      *format; |   XRenderPictFormat      *format; | ||||||
|  |   Window                  xwindow; | ||||||
|  |  | ||||||
|  |   xwindow = meta_window_get_toplevel_xwindow (window); | ||||||
|  |  | ||||||
|  |   priv->screen = screen; | ||||||
|   priv->damage = XDamageCreate (xdisplay, xwindow, |   priv->damage = XDamageCreate (xdisplay, xwindow, | ||||||
|                                 XDamageReportBoundingBox); |                                 XDamageReportBoundingBox); | ||||||
|  |  | ||||||
| @@ -392,20 +347,28 @@ meta_window_actor_constructed (GObject *object) | |||||||
|       g_signal_connect_object (window, "notify::appears-focused", |       g_signal_connect_object (window, "notify::appears-focused", | ||||||
|                                G_CALLBACK (window_appears_focused_notify), self, 0); |                                G_CALLBACK (window_appears_focused_notify), self, 0); | ||||||
|     } |     } | ||||||
|   else |  | ||||||
|     { |  | ||||||
|       /* |  | ||||||
|        * This is the case where existing window is gaining/loosing frame. |  | ||||||
|        * Just ensure the actor is top most (i.e., above shadow). |  | ||||||
|        */ |  | ||||||
|       clutter_actor_set_child_above_sibling (CLUTTER_ACTOR (self), priv->actor, NULL); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|   meta_window_actor_update_opacity (self); |   meta_window_actor_update_opacity (self); | ||||||
|  |   meta_window_actor_sync_actor_position (self); | ||||||
|  |  | ||||||
|  |   priv->mapped = meta_window_toplevel_is_mapped (priv->window); | ||||||
|  |   if (priv->mapped) | ||||||
|  |     meta_window_actor_queue_create_pixmap (self); | ||||||
|  |  | ||||||
|  |   meta_window_actor_set_updates_frozen (self, | ||||||
|  |                                         meta_window_updates_are_frozen (priv->window)); | ||||||
|  |  | ||||||
|  |   /* If a window doesn't start off with updates frozen, we should | ||||||
|  |    * we should send a _NET_WM_FRAME_DRAWN immediately after the first drawn. | ||||||
|  |    */ | ||||||
|  |   if (priv->window->extended_sync_request_counter && !priv->updates_frozen) | ||||||
|  |     meta_window_actor_queue_frame_drawn (self, FALSE); | ||||||
|  |  | ||||||
|   /* Start off with an empty region to maintain the invariant that |   /* Start off with an empty region to maintain the invariant that | ||||||
|      the shape region is always set */ |      the shape region is always set */ | ||||||
|   priv->shape_region = cairo_region_create (); |   priv->shape_region = cairo_region_create (); | ||||||
|  |  | ||||||
|  |   G_OBJECT_CLASS (meta_window_actor_parent_class)->constructed (object); | ||||||
| } | } | ||||||
|  |  | ||||||
| static void | static void | ||||||
| @@ -416,7 +379,6 @@ meta_window_actor_dispose (GObject *object) | |||||||
|   MetaScreen             *screen; |   MetaScreen             *screen; | ||||||
|   MetaDisplay            *display; |   MetaDisplay            *display; | ||||||
|   Display                *xdisplay; |   Display                *xdisplay; | ||||||
|   MetaCompScreen         *info; |  | ||||||
|  |  | ||||||
|   if (priv->disposed) |   if (priv->disposed) | ||||||
|     return; |     return; | ||||||
| @@ -426,7 +388,6 @@ meta_window_actor_dispose (GObject *object) | |||||||
|   screen   = priv->screen; |   screen   = priv->screen; | ||||||
|   display  = meta_screen_get_display (screen); |   display  = meta_screen_get_display (screen); | ||||||
|   xdisplay = meta_display_get_xdisplay (display); |   xdisplay = meta_display_get_xdisplay (display); | ||||||
|   info     = meta_screen_get_compositor_data (screen); |  | ||||||
|  |  | ||||||
|   meta_window_actor_detach (self); |   meta_window_actor_detach (self); | ||||||
|  |  | ||||||
| @@ -456,8 +417,6 @@ meta_window_actor_dispose (GObject *object) | |||||||
|       priv->damage = None; |       priv->damage = None; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   info->windows = g_list_remove (info->windows, (gconstpointer) self); |  | ||||||
|  |  | ||||||
|   g_clear_object (&priv->window); |   g_clear_object (&priv->window); | ||||||
|  |  | ||||||
|   /* |   /* | ||||||
| @@ -491,17 +450,7 @@ meta_window_actor_set_property (GObject      *object, | |||||||
|   switch (prop_id) |   switch (prop_id) | ||||||
|     { |     { | ||||||
|     case PROP_META_WINDOW: |     case PROP_META_WINDOW: | ||||||
|       { |       priv->window = g_value_dup_object (value); | ||||||
|         if (priv->window) |  | ||||||
|           g_object_unref (priv->window); |  | ||||||
|         priv->window = g_value_dup_object (value); |  | ||||||
|       } |  | ||||||
|       break; |  | ||||||
|     case PROP_META_SCREEN: |  | ||||||
|       priv->screen = g_value_get_pointer (value); |  | ||||||
|       break; |  | ||||||
|     case PROP_X_WINDOW: |  | ||||||
|       priv->xwindow = g_value_get_ulong (value); |  | ||||||
|       break; |       break; | ||||||
|     case PROP_NO_SHADOW: |     case PROP_NO_SHADOW: | ||||||
|       { |       { | ||||||
| @@ -547,12 +496,6 @@ meta_window_actor_get_property (GObject      *object, | |||||||
|     case PROP_META_WINDOW: |     case PROP_META_WINDOW: | ||||||
|       g_value_set_object (value, priv->window); |       g_value_set_object (value, priv->window); | ||||||
|       break; |       break; | ||||||
|     case PROP_META_SCREEN: |  | ||||||
|       g_value_set_pointer (value, priv->screen); |  | ||||||
|       break; |  | ||||||
|     case PROP_X_WINDOW: |  | ||||||
|       g_value_set_ulong (value, priv->xwindow); |  | ||||||
|       break; |  | ||||||
|     case PROP_NO_SHADOW: |     case PROP_NO_SHADOW: | ||||||
|       g_value_set_boolean (value, priv->no_shadow); |       g_value_set_boolean (value, priv->no_shadow); | ||||||
|       break; |       break; | ||||||
| @@ -820,20 +763,6 @@ meta_window_actor_has_shadow (MetaWindowActor *self) | |||||||
|   return FALSE; |   return FALSE; | ||||||
| } | } | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * meta_window_actor_get_x_window: (skip) |  | ||||||
|  * @self: a #MetaWindowActor |  | ||||||
|  * |  | ||||||
|  */ |  | ||||||
| Window |  | ||||||
| meta_window_actor_get_x_window (MetaWindowActor *self) |  | ||||||
| { |  | ||||||
|   if (!self) |  | ||||||
|     return None; |  | ||||||
|  |  | ||||||
|   return self->priv->xwindow; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * meta_window_actor_get_meta_window: |  * meta_window_actor_get_meta_window: | ||||||
|  * @self: a #MetaWindowActor |  * @self: a #MetaWindowActor | ||||||
| @@ -876,59 +805,6 @@ meta_window_actor_is_destroyed (MetaWindowActor *self) | |||||||
|   return self->priv->disposed; |   return self->priv->disposed; | ||||||
| } | } | ||||||
|  |  | ||||||
| gboolean |  | ||||||
| meta_window_actor_is_override_redirect (MetaWindowActor *self) |  | ||||||
| { |  | ||||||
|   return meta_window_is_override_redirect (self->priv->window); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * meta_window_actor_get_workspace: |  | ||||||
|  * @self: #MetaWindowActor |  | ||||||
|  * |  | ||||||
|  * Returns the index of workspace on which this window is located; if the |  | ||||||
|  * window is sticky, or is not currently located on any workspace, returns -1. |  | ||||||
|  * This function is deprecated  and should not be used in newly written code; |  | ||||||
|  * meta_window_get_workspace() instead. |  | ||||||
|  * |  | ||||||
|  * Return value: (transfer none): index of workspace on which this window is |  | ||||||
|  * located. |  | ||||||
|  */ |  | ||||||
| gint |  | ||||||
| meta_window_actor_get_workspace (MetaWindowActor *self) |  | ||||||
| { |  | ||||||
|   MetaWindowActorPrivate *priv; |  | ||||||
|   MetaWorkspace          *workspace; |  | ||||||
|  |  | ||||||
|   if (!self) |  | ||||||
|     return -1; |  | ||||||
|  |  | ||||||
|   priv = self->priv; |  | ||||||
|  |  | ||||||
|   if (!priv->window || meta_window_is_on_all_workspaces (priv->window)) |  | ||||||
|     return -1; |  | ||||||
|  |  | ||||||
|   workspace = meta_window_get_workspace (priv->window); |  | ||||||
|  |  | ||||||
|   if (!workspace) |  | ||||||
|     return -1; |  | ||||||
|  |  | ||||||
|   return meta_workspace_index (workspace); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| gboolean |  | ||||||
| meta_window_actor_showing_on_its_workspace (MetaWindowActor *self) |  | ||||||
| { |  | ||||||
|   if (!self) |  | ||||||
|     return FALSE; |  | ||||||
|  |  | ||||||
|   /* If override redirect: */ |  | ||||||
|   if (!self->priv->window) |  | ||||||
|     return TRUE; |  | ||||||
|  |  | ||||||
|   return meta_window_showing_on_its_workspace (self->priv->window); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| static void | static void | ||||||
| meta_window_actor_freeze (MetaWindowActor *self) | meta_window_actor_freeze (MetaWindowActor *self) | ||||||
| { | { | ||||||
| @@ -1369,7 +1245,7 @@ meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state) | |||||||
|   MetaDisplay *display = meta_window_get_display (metaWindow); |   MetaDisplay *display = meta_window_get_display (metaWindow); | ||||||
|  |  | ||||||
|   Display *xdisplay = meta_display_get_xdisplay (display); |   Display *xdisplay = meta_display_get_xdisplay (display); | ||||||
|   Window  xwin = meta_window_actor_get_x_window (self); |   Window  xwin = meta_window_get_toplevel_xwindow (metaWindow); | ||||||
|  |  | ||||||
|   if (state) |   if (state) | ||||||
|     { |     { | ||||||
| @@ -1392,7 +1268,6 @@ void | |||||||
| meta_window_actor_destroy (MetaWindowActor *self) | meta_window_actor_destroy (MetaWindowActor *self) | ||||||
| { | { | ||||||
|   MetaWindow	      *window; |   MetaWindow	      *window; | ||||||
|   MetaCompScreen      *info; |  | ||||||
|   MetaWindowActorPrivate *priv; |   MetaWindowActorPrivate *priv; | ||||||
|   MetaWindowType window_type; |   MetaWindowType window_type; | ||||||
|  |  | ||||||
| @@ -1400,14 +1275,6 @@ meta_window_actor_destroy (MetaWindowActor *self) | |||||||
|  |  | ||||||
|   window = priv->window; |   window = priv->window; | ||||||
|   window_type = meta_window_get_window_type (window); |   window_type = meta_window_get_window_type (window); | ||||||
|   meta_window_set_compositor_private (window, NULL); |  | ||||||
|  |  | ||||||
|   /* |  | ||||||
|    * We remove the window from internal lookup hashes and thus any other |  | ||||||
|    * unmap events etc fail |  | ||||||
|    */ |  | ||||||
|   info = meta_screen_get_compositor_data (priv->screen); |  | ||||||
|   info->windows = g_list_remove (info->windows, (gconstpointer) self); |  | ||||||
|  |  | ||||||
|   if (window_type == META_WINDOW_DROPDOWN_MENU || |   if (window_type == META_WINDOW_DROPDOWN_MENU || | ||||||
|       window_type == META_WINDOW_POPUP_MENU || |       window_type == META_WINDOW_POPUP_MENU || | ||||||
| @@ -1470,8 +1337,6 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self, | |||||||
|                               window_rect.x, window_rect.y); |                               window_rect.x, window_rect.y); | ||||||
|   clutter_actor_set_size (CLUTTER_ACTOR (self), |   clutter_actor_set_size (CLUTTER_ACTOR (self), | ||||||
|                           window_rect.width, window_rect.height); |                           window_rect.width, window_rect.height); | ||||||
|  |  | ||||||
|   g_signal_emit (self, signals[POSITION_CHANGED], 0); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| @@ -1619,68 +1484,9 @@ meta_window_actor_unmaximize (MetaWindowActor   *self, | |||||||
| MetaWindowActor * | MetaWindowActor * | ||||||
| meta_window_actor_new (MetaWindow *window) | meta_window_actor_new (MetaWindow *window) | ||||||
| { | { | ||||||
|   MetaScreen	 	 *screen = meta_window_get_screen (window); |   return g_object_new (META_TYPE_WINDOW_ACTOR, | ||||||
|   MetaCompScreen         *info = meta_screen_get_compositor_data (screen); |                        "meta-window", window, | ||||||
|   MetaWindowActor        *self; |  | ||||||
|   MetaWindowActorPrivate *priv; |  | ||||||
|   MetaFrame		 *frame; |  | ||||||
|   Window		  top_window; |  | ||||||
|   ClutterActor           *window_group; |  | ||||||
|  |  | ||||||
|   frame = meta_window_get_frame (window); |  | ||||||
|   if (frame) |  | ||||||
|     top_window = meta_frame_get_xwindow (frame); |  | ||||||
|   else |  | ||||||
|     top_window = meta_window_get_xwindow (window); |  | ||||||
|  |  | ||||||
|   meta_verbose ("add window: Meta %p, xwin 0x%x\n", window, (guint)top_window); |  | ||||||
|  |  | ||||||
|   self = g_object_new (META_TYPE_WINDOW_ACTOR, |  | ||||||
|                        "meta-window",         window, |  | ||||||
|                        "x-window",            top_window, |  | ||||||
|                        "meta-screen",         screen, |  | ||||||
|                        NULL); |                        NULL); | ||||||
|  |  | ||||||
|   priv = self->priv; |  | ||||||
|  |  | ||||||
|   priv->last_width = -1; |  | ||||||
|   priv->last_height = -1; |  | ||||||
|  |  | ||||||
|   priv->mapped = meta_window_toplevel_is_mapped (priv->window); |  | ||||||
|   if (priv->mapped) |  | ||||||
|     meta_window_actor_queue_create_pixmap (self); |  | ||||||
|  |  | ||||||
|   meta_window_actor_set_updates_frozen (self, |  | ||||||
|                                         meta_window_updates_are_frozen (priv->window)); |  | ||||||
|  |  | ||||||
|   /* If a window doesn't start off with updates frozen, we should |  | ||||||
|    * we should send a _NET_WM_FRAME_DRAWN immediately after the first drawn. |  | ||||||
|    */ |  | ||||||
|   if (priv->window->extended_sync_request_counter && !priv->updates_frozen) |  | ||||||
|     meta_window_actor_queue_frame_drawn (self, FALSE); |  | ||||||
|  |  | ||||||
|   meta_window_actor_sync_actor_geometry (self, priv->window->placed); |  | ||||||
|  |  | ||||||
|   /* Hang our compositor window state off the MetaWindow for fast retrieval */ |  | ||||||
|   meta_window_set_compositor_private (window, G_OBJECT (self)); |  | ||||||
|  |  | ||||||
|   if (window->layer == META_LAYER_OVERRIDE_REDIRECT) |  | ||||||
|     window_group = info->top_window_group; |  | ||||||
|   else |  | ||||||
|     window_group = info->window_group; |  | ||||||
|  |  | ||||||
|   clutter_actor_add_child (window_group, CLUTTER_ACTOR (self)); |  | ||||||
|  |  | ||||||
|   clutter_actor_hide (CLUTTER_ACTOR (self)); |  | ||||||
|  |  | ||||||
|   clutter_actor_set_reactive (CLUTTER_ACTOR (self), TRUE); |  | ||||||
|  |  | ||||||
|   /* Initial position in the stack is arbitrary; stacking will be synced |  | ||||||
|    * before we first paint. |  | ||||||
|    */ |  | ||||||
|   info->windows = g_list_append (info->windows, self); |  | ||||||
|  |  | ||||||
|   return self; |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| @@ -1906,8 +1712,8 @@ check_needs_pixmap (MetaWindowActor *self) | |||||||
|   MetaDisplay         *display  = meta_screen_get_display (screen); |   MetaDisplay         *display  = meta_screen_get_display (screen); | ||||||
|   Display             *xdisplay = meta_display_get_xdisplay (display); |   Display             *xdisplay = meta_display_get_xdisplay (display); | ||||||
|   MetaCompScreen      *info     = meta_screen_get_compositor_data (screen); |   MetaCompScreen      *info     = meta_screen_get_compositor_data (screen); | ||||||
|  |   Window               xwindow  = meta_window_get_toplevel_xwindow (priv->window); | ||||||
|   MetaCompositor      *compositor; |   MetaCompositor      *compositor; | ||||||
|   Window               xwindow  = priv->xwindow; |  | ||||||
|  |  | ||||||
|   if (!priv->needs_pixmap) |   if (!priv->needs_pixmap) | ||||||
|     return; |     return; | ||||||
| @@ -1971,17 +1777,6 @@ check_needs_pixmap (MetaWindowActor *self) | |||||||
|        */ |        */ | ||||||
|       if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture)))) |       if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture)))) | ||||||
|         g_warning ("NOTE: Not using GLX TFP!\n"); |         g_warning ("NOTE: Not using GLX TFP!\n"); | ||||||
|  |  | ||||||
|       /* ::size-changed is supposed to refer to meta_window_get_frame_rect(). |  | ||||||
|        * Emitting it here works pretty much OK because a new value of the |  | ||||||
|        * *input* rect (which is the outer rect with the addition of invisible |  | ||||||
|        * borders) forces a new pixmap and we get here. In the rare case where |  | ||||||
|        * a change to the window size was exactly balanced by a change to the |  | ||||||
|        * invisible borders, we would miss emitting the signal. We would also |  | ||||||
|        * emit spurious signals when we get a new pixmap without a new size, |  | ||||||
|        * but that should be mostly harmless. |  | ||||||
|        */ |  | ||||||
|       g_signal_emit (self, signals[SIZE_CHANGED], 0); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   priv->needs_pixmap = FALSE; |   priv->needs_pixmap = FALSE; | ||||||
|   | |||||||
| @@ -412,7 +412,7 @@ switch_workspace (MetaPlugin *plugin, | |||||||
|       ClutterActor    *actor	    = CLUTTER_ACTOR (window_actor); |       ClutterActor    *actor	    = CLUTTER_ACTOR (window_actor); | ||||||
|       gint             win_workspace; |       gint             win_workspace; | ||||||
|  |  | ||||||
|       win_workspace = meta_window_actor_get_workspace (window_actor); |       win_workspace = meta_window_get_workspace (meta_window_actor_get_meta_window (window_actor)); | ||||||
|  |  | ||||||
|       if (win_workspace == to || win_workspace == from) |       if (win_workspace == to || win_workspace == from) | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -280,8 +280,7 @@ meta_core_lower_beneath_grab_window (Display *xdisplay, | |||||||
|     return; |     return; | ||||||
|  |  | ||||||
|   changes.stack_mode = Below; |   changes.stack_mode = Below; | ||||||
|   changes.sibling = grab_window->frame ? grab_window->frame->xwindow |   changes.sibling = meta_window_get_toplevel_xwindow (grab_window); | ||||||
|                                        : grab_window->xwindow; |  | ||||||
|  |  | ||||||
|   meta_stack_tracker_record_lower_below (screen->stack_tracker, |   meta_stack_tracker_record_lower_below (screen->stack_tracker, | ||||||
|                                          xwindow, |                                          xwindow, | ||||||
|   | |||||||
| @@ -4008,7 +4008,7 @@ meta_display_begin_grab_op (MetaDisplay *display, | |||||||
|    *   key grab on the RootWindow. |    *   key grab on the RootWindow. | ||||||
|    */ |    */ | ||||||
|   if (grab_window) |   if (grab_window) | ||||||
|     grab_xwindow = grab_window->frame ? grab_window->frame->xwindow : grab_window->xwindow; |     grab_xwindow = meta_window_get_toplevel_xwindow (grab_window); | ||||||
|   else |   else | ||||||
|     grab_xwindow = screen->xroot; |     grab_xwindow = screen->xroot; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1277,7 +1277,7 @@ meta_window_grab_keys (MetaWindow  *window) | |||||||
|     } |     } | ||||||
|  |  | ||||||
|   meta_window_change_keygrabs (window, |   meta_window_change_keygrabs (window, | ||||||
|                                window->frame ? window->frame->xwindow : window->xwindow, |                                meta_window_get_toplevel_xwindow (window), | ||||||
|                                TRUE); |                                TRUE); | ||||||
|  |  | ||||||
|   window->keys_grabbed = TRUE; |   window->keys_grabbed = TRUE; | ||||||
| @@ -1580,7 +1580,7 @@ meta_window_grab_all_keys (MetaWindow  *window, | |||||||
|               window->desc); |               window->desc); | ||||||
|   meta_window_focus (window, timestamp); |   meta_window_focus (window, timestamp); | ||||||
|  |  | ||||||
|   grabwindow = window->frame ? window->frame->xwindow : window->xwindow; |   grabwindow = meta_window_get_toplevel_xwindow (window); | ||||||
|  |  | ||||||
|   meta_topic (META_DEBUG_KEYBINDINGS, |   meta_topic (META_DEBUG_KEYBINDINGS, | ||||||
|               "Grabbing all keys on window %s\n", window->desc); |               "Grabbing all keys on window %s\n", window->desc); | ||||||
|   | |||||||
| @@ -36,6 +36,7 @@ | |||||||
|  |  | ||||||
| #include <config.h> | #include <config.h> | ||||||
| #include <meta/compositor.h> | #include <meta/compositor.h> | ||||||
|  | #include <meta/meta-window-actor.h> | ||||||
| #include <meta/window.h> | #include <meta/window.h> | ||||||
| #include "screen-private.h" | #include "screen-private.h" | ||||||
| #include <meta/util.h> | #include <meta/util.h> | ||||||
| @@ -438,7 +439,10 @@ struct _MetaWindow | |||||||
|   /* maintained by group.c */ |   /* maintained by group.c */ | ||||||
|   MetaGroup *group; |   MetaGroup *group; | ||||||
|  |  | ||||||
|   GObject *compositor_private; |   GSList *actors; | ||||||
|  |  | ||||||
|  |   /* The core actor is the one in the window group. */ | ||||||
|  |   MetaWindowActor *core_actor; | ||||||
|  |  | ||||||
|   /* Focused window that is (directly or indirectly) attached to this one */ |   /* Focused window that is (directly or indirectly) attached to this one */ | ||||||
|   MetaWindow *attached_focus_window; |   MetaWindow *attached_focus_window; | ||||||
| @@ -696,4 +700,6 @@ void meta_window_set_shape_region         (MetaWindow     *window, | |||||||
|                                            cairo_region_t *region); |                                            cairo_region_t *region); | ||||||
| void meta_window_update_shape_region_x11  (MetaWindow *window); | void meta_window_update_shape_region_x11  (MetaWindow *window); | ||||||
|  |  | ||||||
|  | Window meta_window_get_toplevel_xwindow (MetaWindow *window); | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -194,6 +194,8 @@ enum | |||||||
|   FOCUS, |   FOCUS, | ||||||
|   RAISED, |   RAISED, | ||||||
|   UNMANAGED, |   UNMANAGED, | ||||||
|  |   SIZE_CHANGED, | ||||||
|  |   POSITION_CHANGED, | ||||||
|  |  | ||||||
|   LAST_SIGNAL |   LAST_SIGNAL | ||||||
| }; | }; | ||||||
| @@ -587,6 +589,22 @@ meta_window_class_init (MetaWindowClass *klass) | |||||||
|                   G_STRUCT_OFFSET (MetaWindowClass, unmanaged), |                   G_STRUCT_OFFSET (MetaWindowClass, unmanaged), | ||||||
|                   NULL, NULL, NULL, |                   NULL, NULL, NULL, | ||||||
|                   G_TYPE_NONE, 0); |                   G_TYPE_NONE, 0); | ||||||
|  |  | ||||||
|  |   window_signals[POSITION_CHANGED] = | ||||||
|  |     g_signal_new ("position-changed", | ||||||
|  |                   G_TYPE_FROM_CLASS (object_class), | ||||||
|  |                   G_SIGNAL_RUN_LAST, | ||||||
|  |                   0, | ||||||
|  |                   NULL, NULL, NULL, | ||||||
|  |                   G_TYPE_NONE, 0); | ||||||
|  |  | ||||||
|  |   window_signals[SIZE_CHANGED] = | ||||||
|  |     g_signal_new ("size-changed", | ||||||
|  |                   G_TYPE_FROM_CLASS (object_class), | ||||||
|  |                   G_SIGNAL_RUN_LAST, | ||||||
|  |                   0, | ||||||
|  |                   NULL, NULL, NULL, | ||||||
|  |                   G_TYPE_NONE, 0); | ||||||
| } | } | ||||||
|  |  | ||||||
| static void | static void | ||||||
| @@ -1175,7 +1193,8 @@ meta_window_new_with_attrs (MetaDisplay       *display, | |||||||
|   window->initial_workspace = 0; /* not used */ |   window->initial_workspace = 0; /* not used */ | ||||||
|   window->initial_timestamp = 0; /* not used */ |   window->initial_timestamp = 0; /* not used */ | ||||||
|  |  | ||||||
|   window->compositor_private = NULL; |   window->core_actor = NULL; | ||||||
|  |   window->actors = NULL; | ||||||
|  |  | ||||||
|   window->monitor = meta_screen_get_monitor_for_window (window->screen, window); |   window->monitor = meta_screen_get_monitor_for_window (window->screen, window); | ||||||
|  |  | ||||||
| @@ -5283,6 +5302,12 @@ meta_window_move_resize_internal (MetaWindow          *window, | |||||||
|   else if (is_user_action) |   else if (is_user_action) | ||||||
|     save_user_window_placement (window); |     save_user_window_placement (window); | ||||||
|  |  | ||||||
|  |   if (need_move_frame) | ||||||
|  |     g_signal_emit (window, window_signals[POSITION_CHANGED], 0); | ||||||
|  |  | ||||||
|  |   if (need_resize_client) | ||||||
|  |     g_signal_emit (window, window_signals[SIZE_CHANGED], 0); | ||||||
|  |  | ||||||
|   if (need_move_frame || need_resize_frame || |   if (need_move_frame || need_resize_frame || | ||||||
|       need_move_client || need_resize_client || |       need_move_client || need_resize_client || | ||||||
|       did_placement) |       did_placement) | ||||||
| @@ -11040,24 +11065,15 @@ meta_window_get_gtk_menubar_object_path (MetaWindow *window) | |||||||
|  * meta_window_get_compositor_private: |  * meta_window_get_compositor_private: | ||||||
|  * @window: a #MetaWindow |  * @window: a #MetaWindow | ||||||
|  * |  * | ||||||
|  * Gets the compositor's wrapper object for @window. |  * Return value: (transfer none): | ||||||
|  * |  */ | ||||||
|  * Return value: (transfer none): the wrapper object. |  | ||||||
|  **/ |  | ||||||
| GObject * | GObject * | ||||||
| meta_window_get_compositor_private (MetaWindow *window) | meta_window_get_compositor_private (MetaWindow *window) | ||||||
| { | { | ||||||
|   if (!window) |   if (!window) | ||||||
|     return NULL; |     return NULL; | ||||||
|   return window->compositor_private; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| void |   return G_OBJECT (window->core_actor); | ||||||
| meta_window_set_compositor_private (MetaWindow *window, GObject *priv) |  | ||||||
| { |  | ||||||
|   if (!window) |  | ||||||
|     return; |  | ||||||
|   window->compositor_private = priv; |  | ||||||
| } | } | ||||||
|  |  | ||||||
| const char * | const char * | ||||||
| @@ -11438,3 +11454,9 @@ meta_window_can_close (MetaWindow *window) | |||||||
| { | { | ||||||
|   return window->has_close_func; |   return window->has_close_func; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | Window | ||||||
|  | meta_window_get_toplevel_xwindow (MetaWindow *window) | ||||||
|  | { | ||||||
|  |   return window->frame ? window->frame->xwindow : window->xwindow; | ||||||
|  | } | ||||||
|   | |||||||
| @@ -60,11 +60,8 @@ struct _MetaWindowActor | |||||||
| GType meta_window_actor_get_type (void); | GType meta_window_actor_get_type (void); | ||||||
|  |  | ||||||
| Window             meta_window_actor_get_x_window         (MetaWindowActor *self); | Window             meta_window_actor_get_x_window         (MetaWindowActor *self); | ||||||
| gint               meta_window_actor_get_workspace        (MetaWindowActor *self); |  | ||||||
| MetaWindow *       meta_window_actor_get_meta_window      (MetaWindowActor *self); | MetaWindow *       meta_window_actor_get_meta_window      (MetaWindowActor *self); | ||||||
| ClutterActor *     meta_window_actor_get_texture          (MetaWindowActor *self); | ClutterActor *     meta_window_actor_get_texture          (MetaWindowActor *self); | ||||||
| gboolean           meta_window_actor_is_override_redirect (MetaWindowActor *self); |  | ||||||
| gboolean       meta_window_actor_showing_on_its_workspace (MetaWindowActor *self); |  | ||||||
| gboolean       meta_window_actor_is_destroyed (MetaWindowActor *self); | gboolean       meta_window_actor_is_destroyed (MetaWindowActor *self); | ||||||
|  |  | ||||||
| #endif /* META_WINDOW_ACTOR_H */ | #endif /* META_WINDOW_ACTOR_H */ | ||||||
|   | |||||||
| @@ -154,7 +154,6 @@ void meta_window_change_workspace_by_index (MetaWindow *window, | |||||||
| void meta_window_change_workspace          (MetaWindow  *window, | void meta_window_change_workspace          (MetaWindow  *window, | ||||||
|                                             MetaWorkspace *workspace); |                                             MetaWorkspace *workspace); | ||||||
| GObject *meta_window_get_compositor_private (MetaWindow *window); | GObject *meta_window_get_compositor_private (MetaWindow *window); | ||||||
| void meta_window_set_compositor_private (MetaWindow *window, GObject *priv); |  | ||||||
| void meta_window_configure_notify (MetaWindow *window, XConfigureEvent *event); | void meta_window_configure_notify (MetaWindow *window, XConfigureEvent *event); | ||||||
| const char *meta_window_get_role (MetaWindow *window); | const char *meta_window_get_role (MetaWindow *window); | ||||||
| MetaStackLayer meta_window_get_layer (MetaWindow *window); | MetaStackLayer meta_window_get_layer (MetaWindow *window); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user