Added StructureNotifyMask for override redirect windows.

We need to be getting ConfigureNotify events for these, so we can respond
    to changes in position of these windows. We cannot add this to windows
    Metacity manages, as this makes it got mental.
This commit is contained in:
Tomas Frydrych 2008-10-28 13:02:33 +00:00
parent 8f8a193c7e
commit 8f594c93cd

View File

@ -1334,8 +1334,8 @@ add_win (MetaScreen *screen, MetaWindow *window, Window xwindow)
{ {
MetaDisplay *display = meta_screen_get_display (screen); MetaDisplay *display = meta_screen_get_display (screen);
MetaCompScreen *info = meta_screen_get_compositor_data (screen); MetaCompScreen *info = meta_screen_get_compositor_data (screen);
MutterWindow *cw; MutterWindow *cw;
MutterWindowPrivate *priv; MutterWindowPrivate *priv;
Display *xdisplay = meta_display_get_xdisplay (display); Display *xdisplay = meta_display_get_xdisplay (display);
XWindowAttributes attrs; XWindowAttributes attrs;
gulong events_needed; gulong events_needed;
@ -1355,8 +1355,16 @@ add_win (MetaScreen *screen, MetaWindow *window, Window xwindow)
*/ */
events_needed = PropertyChangeMask | SubstructureNotifyMask; events_needed = PropertyChangeMask | SubstructureNotifyMask;
if (!(attrs.your_event_mask & PropertyChangeMask) || /*
!(attrs.your_event_mask & SubstructureNotifyMask)) * Need ConfigureNotify for override windows.
*/
if (!window)
events_needed |= StructureNotifyMask;
/*
* Check the event mask contains all we need.
*/
if ((attrs.your_event_mask & events_needed) != events_needed)
{ {
gulong event_mask; gulong event_mask;
event_mask = attrs.your_event_mask | events_needed; event_mask = attrs.your_event_mask | events_needed;
@ -1376,6 +1384,7 @@ add_win (MetaScreen *screen, MetaWindow *window, Window xwindow)
clutter_actor_set_position (CLUTTER_ACTOR (cw), clutter_actor_set_position (CLUTTER_ACTOR (cw),
priv->attrs.x, priv->attrs.y); priv->attrs.x, priv->attrs.y);
clutter_container_add_actor (CLUTTER_CONTAINER (info->window_group), clutter_container_add_actor (CLUTTER_CONTAINER (info->window_group),
CLUTTER_ACTOR (cw)); CLUTTER_ACTOR (cw));
clutter_actor_hide (CLUTTER_ACTOR (cw)); clutter_actor_hide (CLUTTER_ACTOR (cw));
@ -2069,7 +2078,7 @@ clutter_cmp_manage_screen (MetaCompositor *compositor,
{ {
ClutterActor *foo; ClutterActor *foo;
foo = clutter_label_new_with_text ("Sans Bold 48px", foo = clutter_label_new_with_text ("Sans Bold 48px",
"Yessir. The compositor is running."); "Yessir. The compositor is running.");
clutter_actor_set_opacity (foo, 100); clutter_actor_set_opacity (foo, 100);
clutter_actor_set_position (foo, 20, height - 50); clutter_actor_set_position (foo, 20, height - 50);