forked from AuroraMiddleware/gtk
Merge branch '379-fix-quartz-offscreen-window-crash' into 'gtk-3-24'
Resolve "gtkdnd-quartz crash when realizing a GtkOffscreenWindow" See merge request GNOME/gtk!145
This commit is contained in:
commit
615fa7cfb6
@ -36,6 +36,7 @@
|
||||
#include "gtkimageprivate.h"
|
||||
#include "gtkinvisible.h"
|
||||
#include "gtkmain.h"
|
||||
#include "gtkoffscreenwindow.h"
|
||||
#include "deprecated/gtkstock.h"
|
||||
#include "gtkwindow.h"
|
||||
#include "gtkintl.h"
|
||||
@ -354,7 +355,11 @@ get_toplevel_nswindow (GtkWidget *widget)
|
||||
{
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||
GdkWindow *window = gtk_widget_get_window (toplevel);
|
||||
|
||||
|
||||
/* Offscreen windows don't support drag and drop */
|
||||
if (GTK_IS_OFFSCREEN_WINDOW (toplevel))
|
||||
return NULL;
|
||||
|
||||
if (gtk_widget_is_toplevel (toplevel) && window)
|
||||
return [gdk_quartz_window_get_nsview (window) window];
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user