emacs-devel
[Top][All Lists]
Advanced

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

Re: mouse-set-font and menu position?


From: Pavel Janík
Subject: Re: mouse-set-font and menu position?
Date: Mon, 12 Nov 2001 16:05:21 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i386-suse-linux-gnu)

   From: address@hidden (Kai Großjohann)
   Date: Sun, 04 Nov 2001 17:57:53 +0100

   > I remember some discussion on supporting window gravity for Sawfish
   > (maybe it was still called Sawmill at that time).  Maybe Sawfish is
   > the only window manager to do it right :-)

The more I look at it, I see that this is true and there is a bug in Emacs
somewhere.

I spent about 6 hours on this over the weekend and come up with the
following:

- I have current CVS with Xaw or Lesstif (does not matter) toolkit. (With
  oldXmenu, it works perfectly without any problem.)

When running this:

emacs -q -eval '(menu-bar-mode 1)' -geometry 110x45+50-55

Emacs will start up and his window gravity (as xprop reports) is
NorthWest. When running as

emacs -q -eval '(menu-bar-mode -1)' -geometry 110x45+50-55

its window gravity is SouthWest. So it seems to me, that when the menu-bar
is drawn, something (I do not know what it is :-() sets the window gravity
to NorthWest which is not the correct one.

And in the final scenario, which can be seen only under sawfish, which is
the only window manager (I know of) that follows window gravity as
specified by ICCCM, the following (/tmp/qq.el):

(sit-for 5)
(shell-command "import -window root snapshot-1.png")
(set-default-font "6x10")
(message "I have 6x10 now")
(sit-for 1)
(shell-command "import -window root snapshot-2.png")
(sit-for 5)
(set-default-font "6x13")
(message "I have 6x13 now")
(sit-for 1)
(shell-command "import -window root snapshot-3.png")

is the way to reproduce the problem. I generated snapshots of my whole
desktop in these phases for you on http://www.janik.cz/tmp/with/ and
http://www.janik.cz/tmp/without/. The first one (with menu-bar) is from:

emacs -q -eval '(menu-bar-mode 1)' -l /tmp/qq.el -geometry 110x45+50-55

and the second one (without) is from:

emacs -q -eval '(menu-bar-mode -1)' -l /tmp/qq.el -geometry 110x45+50-55

Do you see the difference between
http://www.janik.cz/tmp/without/snapshot-3.png and
http://www.janik.cz/tmp/with/snapshot-3.png?
If yes, try S-mouse-1. Is the menu shown just behind the cursor or about
5cm (which is approx. the length of "Emacs walk over the screen") from
mouse?
-- 
Pavel Janík

That's the problem: pretesters aren't finding many more bugs nowadays,
so it'll probably take until 2005 to find and fix enough bugs that we
can comfortably announce the code stable.
                  -- Stefan Monnier in comp.emacs

reply via email to

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