wayland: Set DBus properties after we've constructed the xdg_surface

This commit is contained in:
Jasper St. Pierre 2013-11-19 16:24:57 -05:00
parent 7e3e50729f
commit 6f9b2ac805
2 changed files with 7 additions and 9 deletions

View File

@ -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;

View File

@ -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