projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e68925a
)
GdkWin32: Position popups on the primary monitor if outside of the visible screen...
author
Luca Bacci
<luca.bacci982@gmail.com>
Tue, 23 Aug 2022 12:54:01 +0000
(14:54 +0200)
committer
Luca Bacci
<luca.bacci982@gmail.com>
Tue, 23 Aug 2022 12:54:01 +0000
(14:54 +0200)
Fixes a crash caused by attempting to dereference a NULL GdkMonitor*
in GdkWin32.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/5125
gdk/win32/gdksurface-win32.c
patch
|
blob
|
history
diff --git
a/gdk/win32/gdksurface-win32.c
b/gdk/win32/gdksurface-win32.c
index 6fc15f38155712bcc8d283d1f41c9e6b16b16a18..a94e43b68dbbccf8c0ba81bfb19ddcc968f6a0fc 100644
(file)
--- a/
gdk/win32/gdksurface-win32.c
+++ b/
gdk/win32/gdksurface-win32.c
@@
-1180,6
+1180,11
@@
gdk_win32_surface_layout_popup (GdkSurface *surface,
monitor = gdk_surface_get_layout_monitor (surface, layout,
gdk_win32_monitor_get_workarea);
+ if (!monitor)
+ {
+ GdkDisplay *display = gdk_surface_get_display (surface);
+ monitor = gdk_win32_display_get_primary_monitor (display);
+ }
gdk_win32_monitor_get_workarea (monitor, &bounds);
gdk_popup_layout_get_shadow_width (layout,