[gtk+] win32: Remove all checks for GDK_WINDOW_ROOT



commit 0436cc44fc36abc545364054611e7237ea0c1fe6
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Nov 14 18:09:32 2017 -0500

    win32: Remove all checks for GDK_WINDOW_ROOT
    
    We are no longer creating windows of this type, so no
    need to check for it.

 gdk/win32/gdkdevice-win32.c   |    1 -
 gdk/win32/gdkevents-win32.c   |    8 ++++----
 gdk/win32/gdkgeometry-win32.c |   11 +++--------
 gdk/win32/gdkwindow-win32.c   |    2 +-
 4 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/gdk/win32/gdkdevice-win32.c b/gdk/win32/gdkdevice-win32.c
index d0e9654..c8c02dd 100644
--- a/gdk/win32/gdkdevice-win32.c
+++ b/gdk/win32/gdkdevice-win32.c
@@ -223,7 +223,6 @@ _gdk_device_win32_window_at_position (GdkDevice       *device,
         window = gdk_win32_handle_table_lookup (hwnd);
 
         if (window != NULL &&
-            GDK_WINDOW_TYPE (window) != GDK_WINDOW_ROOT &&
             GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
           break;
 
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 0df1805..720e749 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -1161,14 +1161,14 @@ find_common_ancestor (GdkWindow *win1,
   GList *list1, *list2;
 
   tmp = win1;
-  while (tmp != NULL && tmp->window_type != GDK_WINDOW_ROOT)
+  while (tmp != NULL)
     {
       path1 = g_list_prepend (path1, tmp);
       tmp = get_native_parent (tmp);
     }
 
   tmp = win2;
-  while (tmp != NULL && tmp->window_type != GDK_WINDOW_ROOT)
+  while (tmp != NULL)
     {
       path2 = g_list_prepend (path2, tmp);
       tmp = get_native_parent (tmp);
@@ -1241,7 +1241,7 @@ synthesize_crossing_events (GdkDisplay                 *display,
 
          last = a;
          win = get_native_parent (a);
-         while (win != c && win->window_type != GDK_WINDOW_ROOT)
+         while (win != c && win != NULL)
            {
              send_crossing_event (display,
                                   win, GDK_LEAVE_NOTIFY,
@@ -1264,7 +1264,7 @@ synthesize_crossing_events (GdkDisplay                 *display,
        {
          path = NULL;
          win = get_native_parent (b);
-         while (win != c && win->window_type != GDK_WINDOW_ROOT)
+         while (win != c && win != NULL)
            {
              path = g_list_prepend (path, win);
              win = get_native_parent (win);
diff --git a/gdk/win32/gdkgeometry-win32.c b/gdk/win32/gdkgeometry-win32.c
index 02d61ef..d748523 100644
--- a/gdk/win32/gdkgeometry-win32.c
+++ b/gdk/win32/gdkgeometry-win32.c
@@ -127,14 +127,11 @@ _gdk_win32_window_tmp_unset_bg (GdkWindow *window,
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 
-  if (window->input_only || window->destroyed ||
-      (window->window_type != GDK_WINDOW_ROOT &&
-       !GDK_WINDOW_IS_MAPPED (window)))
+  if (window->input_only || window->destroyed || !GDK_WINDOW_IS_MAPPED (window))
     return;
 
   if (_gdk_window_has_impl (window) &&
       GDK_WINDOW_IS_WIN32 (window) &&
-      window->window_type != GDK_WINDOW_ROOT &&
       window->window_type != GDK_WINDOW_FOREIGN)
     tmp_unset_bg (window);
 
@@ -150,7 +147,7 @@ _gdk_win32_window_tmp_unset_bg (GdkWindow *window,
 void
 _gdk_win32_window_tmp_unset_parent_bg (GdkWindow *window)
 {
-  if (GDK_WINDOW_TYPE (window->parent) == GDK_WINDOW_ROOT)
+  if (window->parent == NULL)
     return;
 
   window = _gdk_window_get_impl_window (window->parent);
@@ -163,13 +160,11 @@ _gdk_win32_window_tmp_reset_bg (GdkWindow *window,
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 
-  if (window->input_only || window->destroyed ||
-      (window->window_type != GDK_WINDOW_ROOT && !GDK_WINDOW_IS_MAPPED (window)))
+  if (window->input_only || window->destroyed || !GDK_WINDOW_IS_MAPPED (window))
     return;
 
   if (_gdk_window_has_impl (window) &&
       GDK_WINDOW_IS_WIN32 (window) &&
-      window->window_type != GDK_WINDOW_ROOT &&
       window->window_type != GDK_WINDOW_FOREIGN)
     {
       tmp_reset_bg (window);
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index ae1f243..9f62065 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -716,7 +716,7 @@ _gdk_win32_display_create_window_impl (GdkDisplay    *display,
   switch (window->window_type)
     {
     case GDK_WINDOW_TOPLEVEL:
-      if (window->parent && GDK_WINDOW_TYPE (window->parent) != GDK_WINDOW_ROOT)
+      if (window->parent)
        {
          /* The common code warns for this case. */
          hparent = GetDesktopWindow ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]