unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: New Lucid menus
Date: Sat, 17 Apr 2010 20:29:30 +0200	[thread overview]
Message-ID: <4BC9FE0A.8000103@swipnet.se> (raw)
In-Reply-To: <jwv8w8ow7mc.fsf-monnier+emacs@gnu.org>

Stefan Monnier skrev:
> I really like the antialiased fonts in the Lucid menus, but the code
> still has some problems:
> - emacs -Q followed by C-mouse-3 gets us straight to a segfault because
>   of a "childs[0] = 0;" where childs has just been initialised to NULL.
>   But even after removing this assignment I still get some assertion
>   failure:
> 
>    % emacs -Q
>    C-down-mouse-2
>    ...move mouse down through the menu (making the submenus show up) and
>    then back up to just above the menu title...
>    ...release the mouse-2 button outside the menu
> 
>   I then get an assertion failure at insdel.c:2046 because
>   "XWINDOW (selected_window)->buffer" doesn't hold a buffer apparently :-(

I can not reprocude this, it must be timing.  Does it happen always?
Do I need ENABLE_CHECKING? I have enable-asserts.  I guess this isn't related 
to menu code, as the menu has popped down and control has been passed back to 
Emacs core (i.e. insdel.c).

> 
> - when I move the mouse through the menubar's submenus, they flicker like
>   crazy: they seem to be constantly redrawn.

The code did redraw all menus more or less on every mouse move.  This is OK 
for non-aa fonts as you can use XDrawImageString to make just one call to both 
clear and draw the text.  But for Xft two calls are needed, so flicker is more 
likely to be seen.  In any case, I didn't see it at all, it also depends on 
how fast your X server and computer is.

I fixed this so a lot fewer calls are made, and the whole menu is updated in 
one call.  It should be impossible to see flicker now (but you never know ... :-).

	Jan D.






      parent reply	other threads:[~2010-04-17 18:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16  0:54 New Lucid menus Stefan Monnier
2010-04-16  7:34 ` Jan D.
2010-04-17 18:29 ` Jan Djärv [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=4BC9FE0A.8000103@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).