emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GTK scroll bar question


From: Jan D.
Subject: Re: GTK scroll bar question
Date: Thu, 31 Jul 2014 08:52:48 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Dmitry Antipov skrev 2014-07-31 07:05:
On 07/30/2014 10:30 PM, Jan Djärv wrote:

This:

+  /* Realize so we can ask for underlying resources.  */
+  gtk_widget_realize (wscroll);
is a noop on newer Gtk+ versions.

Hm...in this particular case, adding or removing call to gtk_widget_realize
doesn't change anything; but, looking through source code of this function,
it's hard to believe that this is just another version of do { } while (0).

Scrollbars does not have  their own X window, they write on the parent
window.

Is it legitimate to use Window id (of scroll bar or it's parent)
returned by

gdk_x11_window_get_xid (gtk_widget_get_window (...))


No, it never is. BTW, there may be many scroll bars on the same parent (many windows in a frame), so the mapping is not unique. You should at all possible cost avoid map a Gtk+ widget to some X window. It might have an X window now, but that might change. Also, porting to stuff like Cairo or other Gtk+ backends is so much more difficult (Cairo is a possibility, other backends less so).

So find another way of doing whatever you are trying to do tha does not involve X at all, just Gtk+.

in x_window_to_[whatever] functions from xterm.c?  If yes, there is a
simple
way to get rid of id_to_widget map, as I've tried in attached patch.


Why do you insist in changing stuff that work?  Stop that.

        Jan D.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]