mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
x11: Try harder to find the right monitor
If we deal with a panel, we end up with no monitor, and crash, which isn't great and isn't necessary. Fixes: #3900
This commit is contained in:
parent
1a12ea6e5a
commit
f37662c655
@ -1822,9 +1822,16 @@ gdk_x11_surface_layout_popup (GdkSurface *surface,
|
||||
|
||||
monitor = gdk_surface_get_layout_monitor (surface, layout,
|
||||
gdk_x11_monitor_get_workarea);
|
||||
gdk_x11_monitor_get_workarea (monitor, &bounds);
|
||||
if (monitor)
|
||||
gdk_x11_monitor_get_workarea (monitor, &bounds);
|
||||
else
|
||||
{
|
||||
monitor = gdk_surface_get_layout_monitor (surface, layout,
|
||||
gdk_monitor_get_geometry);
|
||||
gdk_monitor_get_geometry (monitor, &bounds);
|
||||
}
|
||||
|
||||
gdk_popup_layout_get_shadow_width (layout,
|
||||
gdk_popup_layout_get_shadow_width (layout,
|
||||
&impl->shadow_left,
|
||||
&impl->shadow_right,
|
||||
&impl->shadow_top,
|
||||
|
Loading…
Reference in New Issue
Block a user