[mutter] MetaWindowWayland: Don't set X11 window attributes that'll get ignored
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] MetaWindowWayland: Don't set X11 window attributes that'll get ignored
- Date: Sat, 23 Jul 2016 02:56:38 +0000 (UTC)
commit 98cd8136cadc28bf112f61068672b13ea6992e30
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri Jul 22 16:04:47 2016 +0800
MetaWindowWayland: Don't set X11 window attributes that'll get ignored
We only use a handful of the attributes set, so lets stop pretending
that things are initialized for a reason. Eventually we should stop
using XWindowAttributes in the generic MetaWindow creation path.
https://bugzilla.gnome.org/show_bug.cgi?id=769070
src/wayland/meta-window-wayland.c | 23 ++++++-----------------
1 files changed, 6 insertions(+), 17 deletions(-)
---
diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c
index 4bd4cea..e9136d1 100644
--- a/src/wayland/meta-window-wayland.c
+++ b/src/wayland/meta-window-wayland.c
@@ -459,33 +459,22 @@ MetaWindow *
meta_window_wayland_new (MetaDisplay *display,
MetaWaylandSurface *surface)
{
- XWindowAttributes attrs;
+ XWindowAttributes attrs = { 0 };
MetaScreen *scr = display->screen;
MetaWindow *window;
+ /*
+ * Set attributes used by _meta_window_shared_new, don't bother trying to fake
+ * X11 window attributes with the rest, since they'll be ignored anyway.
+ */
attrs.x = 0;
attrs.y = 0;
attrs.width = 0;
attrs.height = 0;
- attrs.border_width = 0;
attrs.depth = 24;
attrs.visual = NULL;
- attrs.root = scr->xroot;
- attrs.class = InputOutput;
- attrs.bit_gravity = NorthWestGravity;
- attrs.win_gravity = NorthWestGravity;
- attrs.backing_store = 0;
- attrs.backing_planes = ~0;
- attrs.backing_pixel = 0;
- attrs.save_under = 0;
- attrs.colormap = 0;
- attrs.map_installed = 1;
attrs.map_state = IsUnmapped;
- attrs.all_event_masks = ~0;
- attrs.your_event_mask = 0;
- attrs.do_not_propagate_mask = 0;
- attrs.override_redirect = 0;
- attrs.screen = scr->xscreen;
+ attrs.override_redirect = False;
/* XXX: Note: In the Wayland case we currently still trap X errors while
* creating a MetaWindow because we will still be making various redundant
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]