[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GTK scroll bar question
From: |
Jan Djärv |
Subject: |
Re: GTK scroll bar question |
Date: |
Wed, 30 Jul 2014 20:30:54 +0200 |
Hello.
30 jul 2014 kl. 17:38 skrev Dmitry Antipov <address@hidden>:
> On 07/30/2014 04:39 PM, martin rudalics wrote:
>
>> I suppose it's related to changes in GTK3. I often see this:
>>
>> http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg02228.html
>>
>> And there's also bug#17982.
>
> Recipe from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17982#8 works.
> Is it possible to fix this issue in a more regular and convenient way?
>
> Nevertheless it's pretty strange because, IIUC, these calls:
>
> gdk_x11_window_get_xid (gtk_widget_get_window (...))
>
> should not alter widget's internals but just ask about some data.
> So it's not clear for me why the results are so catastrophic.
This:
+ /* Realize so we can ask for underlying resources. */
+ gtk_widget_realize (wscroll);
is a noop on newer Gtk+ versions. Scrollbars does not have their own X window,
they write on the parent window.
Don't do like this:
+#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
+
Add a non-gtk3 define at the top as we do for others that are just name changes
for example:
#define gdk_window_get_geometry(w, a, b, c, d) \
gdk_window_get_geometry (w, a, b, c, d, 0)
#define gdk_x11_window_lookup_for_display(d, w) \
gdk_xid_table_lookup_for_display (d, w)
Jan D.
- GTK scroll bar question, Dmitry Antipov, 2014/07/30
- Re: GTK scroll bar question, martin rudalics, 2014/07/30
- Re: GTK scroll bar question, Dmitry Antipov, 2014/07/30
- Re: GTK scroll bar question,
Jan Djärv <=
- Re: GTK scroll bar question, Dmitry Antipov, 2014/07/31
- Re: GTK scroll bar question, Jan D., 2014/07/31
- Re: GTK scroll bar question, Dmitry Antipov, 2014/07/31
- Re: GTK scroll bar question, Jan Djärv, 2014/07/31
- Re: GTK scroll bar question, Dmitry Antipov, 2014/07/31
- Re: GTK scroll bar question, Jan D., 2014/07/31
GTK scroll bar artifacts [Was: Re: GTK scroll bar question], Dmitry Antipov, 2014/07/31