win32: Remove all checks for GDK_WINDOW_ROOT

We are no longer creating windows of this type, so no
need to check for it.
This commit is contained in:
Matthias Clasen
2017-11-14 18:09:32 -05:00
parent e2682e62a8
commit 0436cc44fc
4 changed files with 8 additions and 14 deletions

View File

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

View File

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

View File

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

View File

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