all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: grischka <grishka@gmx.de>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: GTK frame changes
Date: Thu, 02 Jul 2009 14:53:31 +0200	[thread overview]
Message-ID: <4A4CADCB.8000304@gmx.de> (raw)

Jan Djärv <jan.h.d@swipnet.se> 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	other threads:[~2009-07-02 12:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 12:53 grischka [this message]
2009-07-02 14:27 ` GTK frame changes Jan Djärv
2009-07-02 15:50   ` grischka
2009-07-02 16:18     ` Jan Djärv
2009-07-02 17:46       ` grischka
2009-07-02 19:44         ` Jan Djärv
2009-07-03 10:53           ` grischka
2009-07-03 11:37             ` Jan Djärv
2009-07-03 12:14             ` Stephen J. Turnbull
2009-07-03 12:43               ` Jan Djärv
2009-07-03 12:47               ` Stephen J. Turnbull

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=4A4CADCB.8000304@gmx.de \
    --to=grishka@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=jan.h.d@swipnet.se \
    /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.