[metacity] xrender: stop handling MapNotify events
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] xrender: stop handling MapNotify events
- Date: Wed, 15 Mar 2017 15:40:27 +0000 (UTC)
commit d63ad8605570bbe826af563f1fc86070b4015b8a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Mar 15 16:52:47 2017 +0200
xrender: stop handling MapNotify events
Use meta_compositor_show_window to do same thing.
src/compositor/meta-compositor-xrender.c | 44 +++++++++++++++---------------
1 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index a3c0649..4857531 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -1900,14 +1900,10 @@ free_win (MetaCompositorXRender *xrender,
static void
map_win (MetaCompositorXRender *xrender,
- Window id)
+ MetaCompWindow *cw)
{
- MetaCompWindow *cw = find_window (xrender, id);
Display *xdisplay = xrender->xdisplay;
- if (cw == NULL)
- return;
-
/* The reason we deallocate this here and not in unmap
is so that we will still have a valid pixmap for
whenever the window is unmapped */
@@ -1946,8 +1942,6 @@ map_win (MetaCompositorXRender *xrender,
XFixesDestroyRegion (xdisplay, cw->shaded.client_region);
cw->shaded.client_region = None;
}
-
- cw->damaged = FALSE;
}
static void
@@ -2134,7 +2128,7 @@ add_win (MetaCompositorXRender *xrender,
g_hash_table_insert (xrender->windows_by_xid, (gpointer) xwindow, cw);
if (cw->window->mapped)
- map_win (xrender, xwindow);
+ map_win (xrender, cw);
}
static void
@@ -2407,16 +2401,6 @@ process_expose (MetaCompositorXRender *xrender,
}
static void
-process_map (MetaCompositorXRender *xrender,
- XMapEvent *event)
-{
- MetaCompWindow *cw = find_window (xrender, event->window);
-
- if (cw)
- map_win (xrender, event->window);
-}
-
-static void
process_damage (MetaCompositorXRender *xrender,
XDamageNotifyEvent *event)
{
@@ -2736,6 +2720,26 @@ meta_compositor_xrender_show_window (MetaCompositor *compositor,
MetaWindow *window,
MetaEffectType effect)
{
+ MetaCompositorXRender *xrender;
+ MetaFrame *frame;
+ Window xwindow;
+ MetaCompWindow *cw;
+
+ xrender = META_COMPOSITOR_XRENDER (compositor);
+ frame = meta_window_get_frame (window);
+
+ if (frame)
+ xwindow = meta_frame_get_xwindow (frame);
+ else
+ xwindow = meta_window_get_xwindow (window);
+
+ cw = find_window (xrender, xwindow);
+ if (cw == NULL)
+ return;
+
+ cw->damaged = TRUE;
+
+ map_win (xrender, cw);
}
static void
@@ -2892,10 +2896,6 @@ meta_compositor_xrender_process_event (MetaCompositor *compositor,
process_expose (xrender, (XExposeEvent *) event);
break;
- case MapNotify:
- process_map (xrender, (XMapEvent *) event);
- break;
-
default:
if (event->type == meta_display_get_damage_event_base (display) + XDamageNotify)
process_damage (xrender, (XDamageNotifyEvent *) event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]