emacs-devel
[Top][All Lists]
Advanced

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

GTK frame changes


From: grischka
Subject: GTK frame changes
Date: Thu, 02 Jul 2009 14:53:31 +0200
User-agent: Thunderbird 2.0.0.18 (X11/20081125)

Jan Djärv <address@hidden> wrote in Changelog:

xg_frame_set_char_size): Do not set pixel width/height here or
call change_frame_size. Just call flush_and_sync.
(flush_and_sync): Reintroduced.

Nice work and the idea is right IMO, just the problem remains that
"flush_and_sync()" does not guarantee that the resize request was
actually handled,  i.e. that a ConfigureNotify was received before
flush_and_sync() returns.  In my tests in ~70% of runs this is not
the case.

It might be somehow tricky to get there though. What it needs is
probably some modal event-loop that returns once ConfigureNotify has
arrived and in between handles other important events to make sure
it doesn't freeze.  It probably also needs some timeout, as for
example with resizing invisible (not-mapped) frames the ConfigureNotify
might never arrive.

There is a similar modal loop in emacs in the context of X selections
(in x_get_foreign_selection where it says TRACE1 ("  Start waiting %d
secs for SelectionNotify", secs).  So maybe there are some ideas or
code to copy from.  "secs" here may sound somewhat scary however in
the case of ConfigureNotify it should arrive really quickly. Just not
quickly enough that "flush_and_sync()" already sees it,

--- grischka





reply via email to

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