all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* GTK scroll bar question
@ 2014-07-30 11:11 Dmitry Antipov
  2014-07-30 12:39 ` martin rudalics
  0 siblings, 1 reply; 12+ messages in thread
From: Dmitry Antipov @ 2014-07-30 11:11 UTC (permalink / raw)
  To: Emacs development discussions; +Cc: martin rudalics, Jan Djärv

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

Can someone explain why an attached patch works fine with GTK2 but
creates scroll bar artifacts with GTK3?  GTK3 3.10.9, GTK2 2.24.22.

Dmitry

[-- Attachment #2: gtk2.png --]
[-- Type: image/png, Size: 29755 bytes --]

[-- Attachment #3: gtk3.png --]
[-- Type: image/png, Size: 28563 bytes --]

[-- Attachment #4: scroll_bar_x_window.patch --]
[-- Type: text/x-patch, Size: 1193 bytes --]

=== modified file 'src/gtkutil.c'
--- src/gtkutil.c	2014-07-27 13:21:30 +0000
+++ src/gtkutil.c	2014-07-30 11:01:55 +0000
@@ -3660,6 +3660,15 @@
   /* Set the cursor to an arrow.  */
   xg_set_cursor (webox, FRAME_DISPLAY_INFO (f)->xg_cursor);
 
+  /* Realize so we can ask for underlying resources.  */
+  gtk_widget_realize (wscroll);
+  fprintf (stderr, "Vertical scroll bar's X window: %d\n",
+#ifdef HAVE_GTK3           
+           (int) gdk_x11_window_get_xid (gtk_widget_get_window (wscroll)));
+#else
+           (int) gdk_x11_drawable_get_xid (gtk_widget_get_window (wscroll)));
+#endif
+
   bar->x_window = scroll_id;
   bar->horizontal = 0;
 }
@@ -3727,6 +3736,15 @@
   /* Set the cursor to an arrow.  */
   xg_set_cursor (webox, FRAME_DISPLAY_INFO (f)->xg_cursor);
 
+  /* Realize so we can ask for underlying resources.  */
+  gtk_widget_realize (wscroll);
+  fprintf (stderr, "Horizontal scroll bar's X window: %d\n",
+#ifdef HAVE_GTK3           
+           (int) gdk_x11_window_get_xid (gtk_widget_get_window (wscroll)));
+#else
+           (int) gdk_x11_drawable_get_xid (gtk_widget_get_window (wscroll)));
+#endif
+
   bar->x_window = scroll_id;
   bar->horizontal = 1;
 }


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-07-31 15:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-30 11:11 GTK scroll bar question Dmitry Antipov
2014-07-30 12:39 ` martin rudalics
2014-07-30 15:38   ` Dmitry Antipov
2014-07-30 18:30     ` Jan Djärv
2014-07-31  5:05       ` Dmitry Antipov
2014-07-31  6:52         ` Jan D.
2014-07-31 10:19           ` Dmitry Antipov
2014-07-31 11:53             ` Jan Djärv
2014-07-31 15:13               ` Dmitry Antipov
2014-07-31 15:27                 ` Jan D.
2014-07-31 14:20   ` GTK scroll bar artifacts [Was: Re: GTK scroll bar question] Dmitry Antipov
2014-07-31 15:03     ` Jan D.

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.