emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107791: * nsterm.m (constrainFram


From: Jan D.
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107791: * nsterm.m (constrainFrameRect): Always constrain when there is only
Date: Mon, 09 Apr 2012 12:01:04 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107791
fixes bug(s): http://debbugs.gnu.org/10962
committer: Jan D. <address@hidden>
branch nick: emacs-24
timestamp: Mon 2012-04-09 12:01:04 +0200
message:
  * nsterm.m (constrainFrameRect): Always constrain when there is only
  one screen.
modified:
  src/ChangeLog
  src/nsterm.m
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-04-06 13:10:30 +0000
+++ b/src/ChangeLog     2012-04-09 10:01:04 +0000
@@ -1,3 +1,8 @@
+2012-04-09  Jan Djärv  <address@hidden>
+
+       * nsterm.m (constrainFrameRect): Always constrain when there is only
+       one screen (Bug#10962).
+
 2012-04-06  Eli Zaretskii  <address@hidden>
 
        * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2012-02-04 15:10:54 +0000
+++ b/src/nsterm.m      2012-04-09 10:01:04 +0000
@@ -6038,11 +6038,15 @@
    restrict the height to just one monitor.  So we override this.  */
 - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
 {
-  /* When making the frame visible for the first time, we want to
-     constrain.  Other times not.  */
+  /* When making the frame visible for the first time or if there is just
+     one screen, we want to constrain.  Other times not.  */
+  NSUInteger nr_screens = [[NSScreen screens] count];
   struct frame *f = ((EmacsView *)[self delegate])->emacsframe;
   NSTRACE (constrainFrameRect);
 
+  if (nr_screens == 1)
+    return [super constrainFrameRect:frameRect toScreen:screen];
+  
   if (f->output_data.ns->dont_constrain
       || ns_menu_bar_should_be_hidden ())
     return frameRect;


reply via email to

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