GNU bug report logs - #21415
25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Fri, 4 Sep 2015 17:43:01 UTC

Severity: wishlist

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #299 received at 21415 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: 21415 <at> debbugs.gnu.org, Anders Lindgren <andlind <at> gmail.com>
Subject: Re: bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for
 x-create-frame
Date: Thu, 15 Oct 2015 11:59:49 +0200
I add a few observations from the GNUstep perspective.  This build is
inherently broken (emacs -Q starts out with _two_ identical tool bars)
but gets me similar results.  Anders what do you get when you repeat
Keith's experiment?  Only steps (1) and (2) make sense currently.

> (1) Toggle the tool bar off.  Does the overall frame height shrink or stay the same?
>
> A: Starting from Emacs -Q.  Using the mouse to toggle the toolbar off,
> the height of the frame shrinks -- i.e., top and left remain the same,
> and the bottom shrinks upward about one-half the height of the toolbar
> that disappears.  The minibuffer / echo area increases in size to
> about 3 lines of text, with just one line of text that reads:
> "menu-bar options showhide showhide-tool-bar".

This is more or less what happens here as well but worked previously.
IIUC it's due to Jan's change below:


diff --git a/src/ChangeLog b/src/ChangeLog
index 69da1c3..861ba91 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-06  Jan Djärv  <jan.h.d <at> swipnet.se>
+
+	* nsterm.m (x_set_window_size): Call updateFrameSize to get real
+	size instead of using widht/height.  The frame may be constrained.
+
 2015-01-05  Paul Eggert  <eggert <at> cs.ucla.edu>

 	* lisp.h (XSYMBOL): Parenthesize id in forward decl.
diff --git a/src/nsterm.m b/src/nsterm.m
index 2ccb7fe..bf3192b 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1404,15 +1404,8 @@ x_set_window_size (struct frame *f,
     [view setBoundsOrigin: origin];
   }

-  change_frame_size (f, width, height, 0, 1, 0, pixelwise);
-/*  SET_FRAME_GARBAGED (f); // this short-circuits expose call in drawRect */
-
-  mark_window_cursors_off (XWINDOW (f->root_window));
-  cancel_mouse_face (f);
-
+  [view updateFrameSize: NO];
   unblock_input ();
-
-  do_pending_window_change (0);
 }


Restoring the change_frame_size call fixes the problem here.


> (2) Toggle the tool bar on again.  Does the overall frame height increase or stay the same?
>

> A: The frame height quickly shrinks and expands, but ultimately
> remains the same size -- i.e., slightly less than when Emacs -Q first
> began its GUI session.

More or less same here.  I tried with earlier builds and all show the
same behavior: Toggling the tool bar on and off repeatedly has the frame
height ultimately shrink.


> (3) Evaluate (setq frame-inhibit-implied-resize t) and repeat steps (1) and (2).
>

> A: Starting again from Emacs -Q.  Evaluate `(setq
> frame-inhibit-implied-resize t)`.  Step 1 looks the same as previously
> reported.  Step 2 looks the same as previously reported.  I did not
> see any visual difference between this test and prior test mentioned
> above.

I'll try to fix this.  But we must fix (1) first, then (2) ...

Thanks, martin





This bug report was last modified 4 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.