summaryrefslogtreecommitdiff
path: root/gdk/mir
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2015-05-20 15:02:31 -0500
committerWilliam Hua <william.hua@canonical.com>2015-06-02 15:14:27 -0400
commita57636f057c6c9bc16a6b60a51b973c9dc8573ca (patch)
treecf4cb75efc25d34661dc9256b5490d4c81491448 /gdk/mir
parentaebac40d3819114d55bf33301d30ff5a2fd6ad1a (diff)
downloadgtk+-a57636f057c6c9bc16a6b60a51b973c9dc8573ca.tar.gz
mir: Remove redundant calls
Diffstat (limited to 'gdk/mir')
-rw-r--r--gdk/mir/gdkmirwindowimpl.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index 30d15806ec..8008fba352 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -155,18 +155,6 @@ set_surface_state (GdkMirWindowImpl *impl,
}
static void
-set_surface_type (GdkMirWindowImpl *impl,
- MirSurfaceType type)
-{
- if (impl->surface_type == type)
- return;
-
- impl->surface_type = type;
- if (impl->surface)
- mir_surface_set_type (impl->surface, type);
-}
-
-static void
event_cb (MirSurface *surface,
const MirEvent *event,
void *context)
@@ -230,8 +218,6 @@ ensure_surface_full (GdkWindow *window,
*/
mir_surface_set_event_handler (impl->surface, event_cb, window_ref); // FIXME: Ignore some events until shown
- set_surface_type (impl, impl->surface_type);
- set_surface_state (impl, impl->surface_state);
}
static void
@@ -277,6 +263,20 @@ ensure_no_surface (GdkWindow *window)
}
static void
+set_surface_type (GdkWindow *window,
+ MirSurfaceType type)
+{
+ GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
+
+ if (impl->surface_type == type)
+ return;
+
+ impl->surface_type = type;
+
+ ensure_no_surface (window);
+}
+
+static void
send_buffer (GdkWindow *window)
{
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
@@ -710,7 +710,7 @@ gdk_mir_window_impl_set_type_hint (GdkWindow *window,
break;
}
- set_surface_type (GDK_MIR_WINDOW_IMPL (window->impl), mir_type);
+ set_surface_type (window, mir_type);
}
static GdkWindowTypeHint