all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: martin rudalics <rudalics@gmx.at>,
	Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: GTK scroll bar question
Date: Wed, 30 Jul 2014 20:30:54 +0200	[thread overview]
Message-ID: <BFCA2551-5457-43B2-98FC-DBF72B679EC8@swipnet.se> (raw)
In-Reply-To: <53D91162.9010503@yandex.ru>

Hello.

30 jul 2014 kl. 17:38 skrev Dmitry Antipov <dmantipov@yandex.ru>:

> 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.







  reply	other threads:[~2014-07-30 18:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BFCA2551-5457-43B2-98FC-DBF72B679EC8@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=dmantipov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.