[gtk+] GDK W32: Set default cursor from our own theme right away
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GDK W32: Set default cursor from our own theme right away
- Date: Thu, 3 Mar 2016 07:29:50 +0000 (UTC)
commit ba89fbd72d4557ab99182081ec2bd56ed8255e0a
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Tue Mar 1 03:40:36 2016 +0000
GDK W32: Set default cursor from our own theme right away
Otherwise WM-dependent default cursor is used, which does not
match our theme. Worse, later GDK will realize that we have
our own left_ptr cursor and will apply it after all, making
the discrepancy even more noticeable.
https://bugzilla.gnome.org/show_bug.cgi?id=762902
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 09db5d6..c84ceb8 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -138,6 +138,8 @@ _gdk_window_impl_win32_get_type (void)
static void
gdk_window_impl_win32_init (GdkWindowImplWin32 *impl)
{
+ GdkDisplay *display = gdk_display_get_default ();
+
impl->toplevel_window_type = -1;
impl->cursor = NULL;
impl->hicon_big = NULL;
@@ -148,6 +150,14 @@ gdk_window_impl_win32_init (GdkWindowImplWin32 *impl)
impl->transient_children = NULL;
impl->num_transients = 0;
impl->changing_state = FALSE;
+
+ if (display != NULL)
+ /* Replace WM-defined default cursor with the default cursor
+ * from our theme. Otherwise newly-opened windows (such as popup
+ * menus of all kinds) will have WM-default cursor when they are
+ * first shown, which will be replaced by our cursor only later on.
+ */
+ impl->cursor = _gdk_win32_display_get_cursor_for_type (display, GDK_LEFT_PTR);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]