[gtk+] wayland: Set DBus properties after we've constructed the xdg_surface
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Set DBus properties after we've constructed the xdg_surface
- Date: Tue, 19 Nov 2013 21:40:27 +0000 (UTC)
commit 6f9b2ac8058522cf9fc91fac3a335cb08c490996
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Nov 19 16:24:57 2013 -0500
wayland: Set DBus properties after we've constructed the xdg_surface
gdk/wayland/gdkwindow-wayland.c | 12 +++++-------
gtk/gtkapplicationwindow.c | 4 ++--
2 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 08e20af..83cf454 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -902,10 +902,6 @@ gdk_wayland_window_create_surface (GdkWindow *window)
wl_surface_set_user_data (impl->surface, window);
wl_surface_add_listener (impl->surface,
&surface_listener, window);
-
- if (display_wayland->gtk_shell)
- impl->gtk_surface = gtk_shell_get_gtk_surface (display_wayland->gtk_shell,
- impl->surface);
}
static void
@@ -1054,6 +1050,7 @@ gdk_wayland_window_create_xdg_popup (GdkWindow *window,
static void
gdk_wayland_window_map (GdkWindow *window)
{
+ GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWindowImplWayland *parent;
GdkWindow *transient_for;
@@ -1116,6 +1113,10 @@ gdk_wayland_window_map (GdkWindow *window)
mapped:
impl->mapped = TRUE;
+
+ if (display_wayland->gtk_shell)
+ impl->gtk_surface = gtk_shell_get_gtk_surface (display_wayland->gtk_shell,
+ impl->surface);
}
}
@@ -2300,9 +2301,6 @@ gdk_wayland_window_set_dbus_properties_libgtk_only (GdkWindow *window,
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
- if (!impl->surface)
- gdk_wayland_window_create_surface (window);
-
if (impl->gtk_surface == NULL)
return;
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index caee9b1..ce51233 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -750,6 +750,8 @@ gtk_application_window_real_map (GtkWidget *widget)
if (window->priv->menubar)
gtk_widget_map (window->priv->menubar);
+ GTK_WIDGET_CLASS (gtk_application_window_parent_class)->map (widget);
+
#ifdef GDK_WINDOWING_WAYLAND
{
GdkWindow *gdkwindow;
@@ -770,8 +772,6 @@ gtk_application_window_real_map (GtkWidget *widget)
}
}
#endif
-
- GTK_WIDGET_CLASS (gtk_application_window_parent_class)->map (widget);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]