diff --git a/ChangeLog b/ChangeLog index 378fa1be2..184b4891d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Wed May 24 16:37:11 2006 Søren Sandmann + + * src/c-window.c (private_metacity_window): New function + + * src/c-window.c (meta_comp_window_refresh_attrs): Map metacity's + own windows directly. + +Wed May 24 16:35:54 2006 Søren Sandmann + + * src/c-window.c (private_metacity_window): + Wed May 24 14:36:42 2006 Søren Sandmann * src/c-window.c (meta_comp_window_{freeze,thaw}_stack: Add a diff --git a/src/c-screen.c b/src/c-screen.c index ab5a9e7df..585cb28e8 100644 --- a/src/c-screen.c +++ b/src/c-screen.c @@ -537,7 +537,7 @@ meta_comp_screen_add_window (MetaCompScreen *info, goto out; } - comp_window = meta_comp_window_new (info->meta_screen->display, drawable); + comp_window = meta_comp_window_new (info->meta_screen, drawable); g_hash_table_insert (info->windows_by_xid, (gpointer)WS_RESOURCE_XID (drawable), comp_window); diff --git a/src/c-window.c b/src/c-window.c index 872ae938e..d56c39820 100644 --- a/src/c-window.c +++ b/src/c-window.c @@ -33,10 +33,12 @@ #include "effects.h" #include "c-window.h" #include "window.h" +#include "frame.h" struct _MetaCompWindow { MetaDisplay *display; + MetaScreen *screen; WsDrawable *drawable; WsPixmap *pixmap; CmNode *node; @@ -197,16 +199,18 @@ meta_comp_window_hide (MetaCompWindow *comp_window) } MetaCompWindow * -meta_comp_window_new (MetaDisplay *display, +meta_comp_window_new (MetaScreen *screen, WsDrawable *drawable) { + MetaDisplay *display = screen->display; MetaCompWindow *window; WsRectangle geometry; ws_drawable_query_geometry (drawable, &geometry); window = g_new0 (MetaCompWindow, 1); - + + window->screen = screen; window->display = display; window->drawable = g_object_ref (drawable); window->node = CM_NODE (cm_drawable_node_new (drawable, &geometry)); @@ -370,6 +374,17 @@ find_client_window (MetaCompWindow *comp_window) } } +static gboolean +private_metacity_window (MetaCompWindow *comp_window) +{ + /* Returns TRUE if this is a private metacity window + * such as a tooltip or a menu + */ + XID xid = WS_RESOURCE_XID (comp_window->drawable); + + return meta_ui_window_is_widget (comp_window->screen->ui, xid); +} + static gboolean frameless_managed (MetaCompWindow *comp_window) { @@ -377,9 +392,8 @@ frameless_managed (MetaCompWindow *comp_window) * sync requests messages. FIXME: at some point need to find out * what's going on */ - MetaWindow *mw = find_meta_window (comp_window); - + return mw && !mw->frame; } @@ -497,19 +511,12 @@ meta_comp_window_refresh_attrs (MetaCompWindow *comp_window) * sync counter stuff. FIXME: this should be figured out at * some point. */ - if (frameless_managed (comp_window) || !send_sync_request (comp_window)) + if (frameless_managed (comp_window) || + private_metacity_window (comp_window) || + !send_sync_request (comp_window)) { -#if 0 - g_print ("directly showing %p\n", comp_window); -#endif meta_comp_window_show (comp_window); } - else - { -#if 0 - g_print ("for %p waiting for alarm\n", comp_window); -#endif - } } } else diff --git a/src/c-window.h b/src/c-window.h index aaf234944..9c356989f 100644 --- a/src/c-window.h +++ b/src/c-window.h @@ -26,7 +26,7 @@ typedef struct _MetaCompWindow MetaCompWindow; -MetaCompWindow *meta_comp_window_new (MetaDisplay *display, +MetaCompWindow *meta_comp_window_new (MetaScreen *screen, WsDrawable *drawable); CmNode *meta_comp_window_get_node (MetaCompWindow *window); gboolean meta_comp_window_free (MetaCompWindow *window);