[gtk+/gtk-3-18] wayland: Make window type conditions switches
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-18] wayland: Make window type conditions switches
- Date: Mon, 9 Nov 2015 13:51:39 +0000 (UTC)
commit a78f4d5444e2ba292a548bd9871c0b9ef9b9f262
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Sun Oct 18 20:23:07 2015 +0800
wayland: Make window type conditions switches
In order to make it easier to add/remove in future commits.
https://bugzilla.gnome.org/show_bug.cgi?id=756780
gdk/wayland/gdkwindow-wayland.c | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 8d31137..b8d5030 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1226,8 +1226,14 @@ should_map_as_subsurface (GdkWindow *window)
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
return TRUE;
- if (impl->hint == GDK_WINDOW_TYPE_HINT_TOOLTIP)
- return TRUE;
+ switch (impl->hint)
+ {
+ case GDK_WINDOW_TYPE_HINT_TOOLTIP:
+ return TRUE;
+
+ default:
+ break;
+ }
return FALSE;
}
@@ -1237,11 +1243,17 @@ should_map_as_popup (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
- if (impl->hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU ||
- impl->hint == GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU ||
- impl->hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
- impl->hint == GDK_WINDOW_TYPE_HINT_COMBO)
- return TRUE;
+ switch (impl->hint)
+ {
+ case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
+ case GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU:
+ case GDK_WINDOW_TYPE_HINT_UTILITY:
+ case GDK_WINDOW_TYPE_HINT_COMBO:
+ return TRUE;
+
+ default:
+ break;
+ }
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]