mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
[win32] Fix win32 theme crash on offscreen windows
We add _gdk_offscreen_window_get_real_drawable to get the real pixmap impl for offscreen windows, then we use this in gdkgc-win32.c:get_impl_drawable() for offscreen windows This fixes a crash when rendering win32 theme parts on offscreen windows (bug #623563)
This commit is contained in:
parent
f8170ee873
commit
e9b0f9e81a
@ -685,6 +685,7 @@ typedef struct _GdkOffscreenWindow GdkOffscreenWindow;
|
||||
#define GDK_OFFSCREEN_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_OFFSCREEN_WINDOW, GdkOffscreenWindow))
|
||||
#define GDK_IS_OFFSCREEN_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_OFFSCREEN_WINDOW))
|
||||
GType gdk_offscreen_window_get_type (void);
|
||||
GdkDrawable * _gdk_offscreen_window_get_real_drawable (GdkOffscreenWindow *window);
|
||||
void _gdk_offscreen_window_new (GdkWindow *window,
|
||||
GdkScreen *screen,
|
||||
GdkVisual *visual,
|
||||
|
@ -842,6 +842,12 @@ gdk_offscreen_window_get_pointer (GdkWindow *window,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GdkDrawable *
|
||||
_gdk_offscreen_window_get_real_drawable (GdkOffscreenWindow *offscreen)
|
||||
{
|
||||
return get_real_drawable (offscreen);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_offscreen_window_get_pixmap:
|
||||
* @window: a #GdkWindow
|
||||
|
@ -743,6 +743,8 @@ predraw (GdkGC *gc,
|
||||
static GdkDrawableImplWin32 *
|
||||
get_impl_drawable (GdkDrawable *drawable)
|
||||
{
|
||||
if (GDK_IS_OFFSCREEN_WINDOW (drawable))
|
||||
return _gdk_offscreen_window_get_real_drawable (GDK_OFFSCREEN_WINDOW (drawable));
|
||||
if (GDK_IS_DRAWABLE_IMPL_WIN32 (drawable))
|
||||
return GDK_DRAWABLE_IMPL_WIN32(drawable);
|
||||
else if (GDK_IS_WINDOW (drawable))
|
||||
|
Loading…
Reference in New Issue
Block a user