[gtk+] Win32: Ensure native back-end for windows where the user requests their handle
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Win32: Ensure native back-end for windows where the user requests their handle
- Date: Thu, 10 Nov 2011 16:46:52 +0000 (UTC)
commit f9d8f9758bfe1417416e0b2bbea955f1cee75674
Author: Peter Clifton <pcjc2 cam ac uk>
Date: Fri Sep 9 15:17:29 2011 +0100
Win32: Ensure native back-end for windows where the user requests their handle
https://bugzilla.gnome.org/show_bug.cgi?id=658841
gdk/win32/gdkwindow-win32.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 25851e0..a8f1cbc 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -3409,5 +3409,15 @@ gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass)
HGDIOBJ
gdk_win32_window_get_handle (GdkWindow *window)
{
+ /* Try to ensure the window has a native window */
+ if (!_gdk_window_has_impl (window))
+ gdk_window_ensure_native (window);
+
+ if (!GDK_WINDOW_IS_WIN32 (window))
+ {
+ g_warning (G_STRLOC " window is not a native Win32 window");
+ return NULL;
+ }
+
return GDK_WINDOW_HWND (window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]