[gtk/wip/otte/win32-cleanup: 9/19] win32: Remove usage of gdk_display_get_default()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/win32-cleanup: 9/19] win32: Remove usage of gdk_display_get_default()
- Date: Sat, 31 Jul 2021 01:55:22 +0000 (UTC)
commit 6b2ee0f5a58a9838408f83ff126a2e71e329cc67
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 a0ae3684ed..372f2a3294 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 8e09b181ca..de4ed1f054 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]