[gtk/wip/otte/win32-cleanup: 60/63] win32: Remove usage of gdk_display_get_default()




commit 33f7292bac967c0c1055b32baef30f1735a667b6
Author: Benjamin Otte <otte redhat com>
Date:   Fri Jul 23 04:21:15 2021 +0200

    win32: Remove usage of gdk_display_get_default()

 gdk/win32/gdkdisplay-win32.c | 1 -
 gdk/win32/gdkdrop-win32.c    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 66d4f291c8..4efc6c1f9c 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -615,7 +615,6 @@ gdk_win32_display_get_name (GdkDisplay *display)
 static void
 gdk_win32_display_beep (GdkDisplay *display)
 {
-  g_return_if_fail (display == gdk_display_get_default());
   if (!MessageBeep (-1))
     Beep(1000, 50);
 }
diff --git a/gdk/win32/gdkdrop-win32.c b/gdk/win32/gdkdrop-win32.c
index 87c5e36905..cf75961a02 100644
--- a/gdk/win32/gdkdrop-win32.c
+++ b/gdk/win32/gdkdrop-win32.c
@@ -1153,7 +1153,7 @@ _gdk_win32_surface_register_dnd (GdkSurface *window)
        * whether the window (widget) in question actually accepts files
        * (in gtk, data of type text/uri-list) or not.
        */
-      gdk_win32_display_add_filter (GDK_WIN32_DISPLAY (gdk_display_get_default ()), gdk_dropfiles_filter, 
NULL);
+      gdk_win32_display_add_filter (GDK_WIN32_DISPLAY (gdk_surface_get_display (window)), 
gdk_dropfiles_filter, NULL);
       DragAcceptFiles (GDK_SURFACE_HWND (window), TRUE);
     }
   else


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