mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
New function
Wed May 24 16:37:11 2006 Søren Sandmann <sandmann@redhat.com> * src/c-window.c (private_metacity_window): New function * src/c-window.c (meta_comp_window_refresh_attrs): Map metacity's own windows directly.
This commit is contained in:
parent
ca3236f76c
commit
7535f0f58a
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
Wed May 24 16:37:11 2006 Søren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
|
* 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 <sandmann@redhat.com>
|
||||||
|
|
||||||
|
* src/c-window.c (private_metacity_window):
|
||||||
|
|
||||||
Wed May 24 14:36:42 2006 Søren Sandmann <sandmann@redhat.com>
|
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
|
* src/c-window.c (meta_comp_window_{freeze,thaw}_stack: Add a
|
||||||
|
@ -537,7 +537,7 @@ meta_comp_screen_add_window (MetaCompScreen *info,
|
|||||||
goto out;
|
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);
|
g_hash_table_insert (info->windows_by_xid, (gpointer)WS_RESOURCE_XID (drawable), comp_window);
|
||||||
|
|
||||||
|
@ -33,10 +33,12 @@
|
|||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include "c-window.h"
|
#include "c-window.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
#include "frame.h"
|
||||||
|
|
||||||
struct _MetaCompWindow
|
struct _MetaCompWindow
|
||||||
{
|
{
|
||||||
MetaDisplay *display;
|
MetaDisplay *display;
|
||||||
|
MetaScreen *screen;
|
||||||
WsDrawable *drawable;
|
WsDrawable *drawable;
|
||||||
WsPixmap *pixmap;
|
WsPixmap *pixmap;
|
||||||
CmNode *node;
|
CmNode *node;
|
||||||
@ -197,16 +199,18 @@ meta_comp_window_hide (MetaCompWindow *comp_window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MetaCompWindow *
|
MetaCompWindow *
|
||||||
meta_comp_window_new (MetaDisplay *display,
|
meta_comp_window_new (MetaScreen *screen,
|
||||||
WsDrawable *drawable)
|
WsDrawable *drawable)
|
||||||
{
|
{
|
||||||
|
MetaDisplay *display = screen->display;
|
||||||
MetaCompWindow *window;
|
MetaCompWindow *window;
|
||||||
WsRectangle geometry;
|
WsRectangle geometry;
|
||||||
|
|
||||||
ws_drawable_query_geometry (drawable, &geometry);
|
ws_drawable_query_geometry (drawable, &geometry);
|
||||||
|
|
||||||
window = g_new0 (MetaCompWindow, 1);
|
window = g_new0 (MetaCompWindow, 1);
|
||||||
|
|
||||||
|
window->screen = screen;
|
||||||
window->display = display;
|
window->display = display;
|
||||||
window->drawable = g_object_ref (drawable);
|
window->drawable = g_object_ref (drawable);
|
||||||
window->node = CM_NODE (cm_drawable_node_new (drawable, &geometry));
|
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
|
static gboolean
|
||||||
frameless_managed (MetaCompWindow *comp_window)
|
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
|
* sync requests messages. FIXME: at some point need to find out
|
||||||
* what's going on
|
* what's going on
|
||||||
*/
|
*/
|
||||||
|
|
||||||
MetaWindow *mw = find_meta_window (comp_window);
|
MetaWindow *mw = find_meta_window (comp_window);
|
||||||
|
|
||||||
return mw && !mw->frame;
|
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
|
* sync counter stuff. FIXME: this should be figured out at
|
||||||
* some point.
|
* 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);
|
meta_comp_window_show (comp_window);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
g_print ("for %p waiting for alarm\n", comp_window);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
typedef struct _MetaCompWindow MetaCompWindow;
|
typedef struct _MetaCompWindow MetaCompWindow;
|
||||||
|
|
||||||
MetaCompWindow *meta_comp_window_new (MetaDisplay *display,
|
MetaCompWindow *meta_comp_window_new (MetaScreen *screen,
|
||||||
WsDrawable *drawable);
|
WsDrawable *drawable);
|
||||||
CmNode *meta_comp_window_get_node (MetaCompWindow *window);
|
CmNode *meta_comp_window_get_node (MetaCompWindow *window);
|
||||||
gboolean meta_comp_window_free (MetaCompWindow *window);
|
gboolean meta_comp_window_free (MetaCompWindow *window);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user