emacs-devel
[Top][All Lists]
Advanced

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

[PATCH] Proposal for a new API to fullscreen


From: Ivan Kanis
Subject: [PATCH] Proposal for a new API to fullscreen
Date: Wed, 20 Aug 2008 17:21:25 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Hi,

Tassilo Horn <address@hidden> writes:

> So now I agree with Jason! ;-)
>
> If someone would ask me which parameter and values I'd choose, here
> they're:
>
>         - Parameter: maximize
>
>           I think that's better than fullscreen, cause fullscreen can be
>           seen as special maximization, whereas something like
>           vertically maximized is surely no special version of
>           fullscreen.
>
>         - Values:
>
>           vertical: maximized vertically, e.g. window fits from top of
>                     the usable screen (usable = screen, where no taskbar
>                     is) till the bottom
>
>           horizontal: Same as vertical, but from left to right
>
>           both or t: vertical + horizontal
>
>           fullscreen: What do you guess?!

This patch against CVS 22.2.9 is heading that way. It turns all
reference of 'fullscreen' to 'maximize'. This frees up the
'fullscreen' variable TDRT.

diff -r 2a9cc3cd6cde -r 7ad292c02ef4 etc/ChangeLog
--- a/etc/ChangeLog     Wed Aug 20 14:11:56 2008 +0200
+++ b/etc/ChangeLog     Wed Aug 20 17:11:45 2008 +0200
@@ -1,3 +1,7 @@
+2008-08-20 Ivan Kanis <address@hidden>
+
+       * emacs.1: update from fullscreen to maximize
+       
 2008-05-04  Glenn Morris  <address@hidden>
 
        * NEWS: Document removal of duplicated "alt-" input methods.
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 etc/emacs.1
--- a/etc/emacs.1       Wed Aug 20 14:11:56 2008 +0200
+++ b/etc/emacs.1       Wed Aug 20 17:11:45 2008 +0200
@@ -321,13 +321,13 @@
 .BR \-vb ", " \-\-vertical\-scroll\-bars
 Enable vertical scrollbars.
 .TP
-.BR \-fh ", " \-\-fullheight
+.BR \-mb ", " \-\-maxboth
+Make the first frame maximized.
+.TP
+.BR \-mh ", " \-\-maxheight
 Make the first frame as high as the screen.
 .TP
-.BR \-fs ", " \-\-fullscreen
-Make the first frame fullscreen.
-.TP
-.BR \-fw ", " \-\-fullwidth
+.BR \-mw ", " \-\-maxwidth
 Make the first frame as wide as the screen.
 .TP
 .BI \-fg " color\fR,\fP " \-\-foreground\-color " color"
@@ -441,15 +441,15 @@
 For color displays,
 sets the window's text color.
 .TP
-.BR fullscreen " (class " Fullscreen )
-The desired fullscreen size.
+.BR maximize " (class " Maximize )
+The desired way to maximize.
 The value can be one of
-.IR fullboth ,
-.IR fullwidth ,
+.IR maxboth ,
+.IR maxwidth ,
 or
-.IR fullheight ,
-which correspond to the command-line options `\-fs', `\-fw', and
-`\-fh', respectively.
+.IR maxheight ,
+which correspond to the command-line options `\-mb', `\-mw', and
+`\-mh', respectively.
 Note that this applies to the initial frame only.
 .TP
 .BR geometry " (class " Geometry )
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 lisp/ChangeLog
--- a/lisp/ChangeLog    Wed Aug 20 14:11:56 2008 +0200
+++ b/lisp/ChangeLog    Wed Aug 20 17:11:45 2008 +0200
@@ -1,3 +1,8 @@
+2008-08-20  Ivan Kanis <address@hidden>
+
+       * startup.el: change --fullscreen, --fullheight and --fullwidth to
+       --maxboth, --maxheight and --maxwidth
+
 2008-08-15  Glenn Morris  <address@hidden>
 
        * eshell/em-ls.el (eshell-ls-files): List one per line in a pipeline.
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 lisp/startup.el
--- a/lisp/startup.el   Wed Aug 20 14:11:56 2008 +0200
+++ b/lisp/startup.el   Wed Aug 20 17:11:45 2008 +0200
@@ -114,9 +114,9 @@
     ("-reverse-video" 0 x-handle-switch reverse t)
     ("-fn" 1 x-handle-switch font)
     ("-font" 1 x-handle-switch font)
-    ("-fs" 0 x-handle-initial-switch fullscreen fullboth)
-    ("-fw" 0 x-handle-initial-switch fullscreen fullwidth)
-    ("-fh" 0 x-handle-initial-switch fullscreen fullheight)
+    ("-mb" 0 x-handle-initial-switch maximize maxboth)
+    ("-mw" 0 x-handle-initial-switch maximize maxwidth)
+    ("-mh" 0 x-handle-initial-switch maximize maxheight)
     ("-ib" 1 x-handle-numeric-switch internal-border-width)
     ("-g" 1 x-handle-geometry)
     ("-lsp" 1 x-handle-numeric-switch line-spacing)
@@ -139,9 +139,9 @@
     ("--title" 1 x-handle-switch title)
     ("--reverse-video" 0 x-handle-switch reverse t)
     ("--font" 1 x-handle-switch font)
-    ("--fullscreen" 0 x-handle-initial-switch fullscreen fullboth)
-    ("--fullwidth" 0 x-handle-initial-switch fullscreen fullwidth)
-    ("--fullheight" 0 x-handle-initial-switch fullscreen fullheight)
+    ("--maxboth" 0 x-handle-initial-switch maximize maxboth)
+    ("--maxwidth" 0 x-handle-initial-switch maximize maxwidth)
+    ("--maxheight" 0 x-handle-initial-switch maximize maxheight)
     ("--internal-border" 1 x-handle-numeric-switch internal-border-width)
     ("--geometry" 1 x-handle-geometry)
     ("--foreground-color" 1 x-handle-switch foreground-color)
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 lispref/ChangeLog
--- a/lispref/ChangeLog Wed Aug 20 14:11:56 2008 +0200
+++ b/lispref/ChangeLog Wed Aug 20 17:11:45 2008 +0200
@@ -1,3 +1,8 @@
+2008-08-20  Ivan Kanis <address@hidden>
+
+       * frames.texi: update information on frame variable maximize
+       instead of fullscreen.
+       
 2008-08-05  Chong Yidong  <address@hidden>
 
        * symbols.texi (Other Plists): Fix incorrect example.
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 lispref/frames.texi
--- a/lispref/frames.texi       Wed Aug 20 14:11:56 2008 +0200
+++ b/lispref/frames.texi       Wed Aug 20 17:11:45 2008 +0200
@@ -463,11 +463,11 @@
 the @code{user-position} parameter (see above) does for the position
 parameters @code{top} and @code{left}.
 
address@hidden fullscreen
address@hidden maximize
 Specify that width, height or both shall be set to the size of the screen.
-The value @code{fullwidth} specifies that width shall be the size of the
-screen.  The value @code{fullheight} specifies that height shall be the
-size of the screen.  The value @code{fullboth} specifies that both the
+The value @code{maxwidth} specifies that width shall be the size of the
+screen.  The value @code{maxheight} specifies that height shall be the
+size of the screen.  The value @code{maxboth} specifies that both the
 width and the height shall be set to the size of the screen.
 @end table
 
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 man/ChangeLog
--- a/man/ChangeLog     Wed Aug 20 14:11:56 2008 +0200
+++ b/man/ChangeLog     Wed Aug 20 17:11:45 2008 +0200
@@ -1,3 +1,9 @@
+2008-08-20  Ivan Kanis <address@hidden>
+
+       * anti.texi, cmdargs.texi: change fullscreen to maximize
+       * faq.texi: rename faq entry from fullscreen to maximize
+       * xresources.texi: document maximise resources
+
 2008-06-15  Reiner Steib  <address@hidden>
 
        * gnus-faq.texi: Generate.  Change node names to "FAQ N-M".
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 man/anti.texi
--- a/man/anti.texi     Wed Aug 20 14:11:56 2008 +0200
+++ b/man/anti.texi     Wed Aug 20 17:11:45 2008 +0200
@@ -54,7 +54,7 @@
 
 @item
 These command line options have also been removed: @samp{--color},
address@hidden, @samp{--fullheight}, @samp{--fullscreen},
address@hidden, @samp{--maxheight}, @samp{--maxscreen},
 @samp{--no-blinking-cursor}, @samp{--no-desktop}, and @samp{-Q}.
 
 @item
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 man/cmdargs.texi
--- a/man/cmdargs.texi  Wed Aug 20 14:11:56 2008 +0200
+++ b/man/cmdargs.texi  Wed Aug 20 17:11:45 2008 +0200
@@ -1009,7 +1009,7 @@
 @cindex geometry of Emacs window
 @cindex position and size of Emacs frame
 @cindex width and height of Emacs frame
address@hidden specifying fullscreen for Emacs frame
address@hidden specifying maximize for Emacs frame
 
   Here is a list of the command-line options for specifying size and
 position of the initial Emacs frame:
@@ -1026,25 +1026,25 @@
 apply to all frames, whereas @var{xoffset} and @var{yoffset} only to
 the initial frame.
 
address@hidden -fs
address@hidden -fs
address@hidden --fullscreen
address@hidden --fullscreen
address@hidden fullscreen, command-line argument
address@hidden -mb
address@hidden -mb
address@hidden --maxboth
address@hidden --maxboth
address@hidden maxboth, command-line argument
 Specify that width and height shall be the size of the screen.
 
address@hidden -fh
address@hidden -fh
address@hidden --fullheight
address@hidden --fullheight
address@hidden fullheight, command-line argument
address@hidden -mh
address@hidden -mh
address@hidden --maxheight
address@hidden --maxheight
address@hidden maxheight, command-line argument
 Specify that the height shall be the height of the screen.
 
address@hidden -fw
address@hidden -fw
address@hidden --fullwidth
address@hidden --fullwidth
address@hidden fullwidth, command-line argument
address@hidden -mw
address@hidden -mw
address@hidden --maxwidth
address@hidden --maxwidth
address@hidden maxwidth, command-line argument
 Specify that the width shall be the width of the screen.
 @end table
 
@@ -1106,8 +1106,8 @@
 (@pxref{Table of Resources}); then Emacs will already know there's no
 tool bar when it processes the specified geometry.
 
-  When using one of @samp{--fullscreen}, @samp{--fullwidth} or
address@hidden there may be some space around the frame
+  When using one of @samp{--maxboth}, @samp{--maxwidth} or
address@hidden there may be some space around the frame
 anyway.  That is because Emacs rounds the sizes so they are an
 even number of character heights and widths.
 
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 man/faq.texi
--- a/man/faq.texi      Wed Aug 20 14:11:56 2008 +0200
+++ b/man/faq.texi      Wed Aug 20 17:11:45 2008 +0200
@@ -1297,7 +1297,7 @@
 * Editing MS-DOS files::
 * Filling paragraphs with a single space::
 * Escape sequences in shell output::
-* Fullscreen mode on MS-Windows::
+* Maximized mode on MS-Windows::
 @end menu
 
 @node Setting up a customization file, Using Customize, Common requests, 
Common requests
@@ -2703,7 +2703,7 @@
 (setq sentence-end-double-space nil)
 @end lisp
 
address@hidden Escape sequences in shell output, Fullscreen mode on MS-Windows, 
Filling paragraphs with a single space, Common requests
address@hidden Escape sequences in shell output, Maximized mode on MS-Windows, 
Filling paragraphs with a single space, Common requests
 @section Why these strange escape sequences from @code{ls} from the Shell mode?
 @cindex Escape sequences in @code{ls} output
 @cindex @code{ls} in Shell mode
@@ -2725,10 +2725,9 @@
 later), which converts these ANSI escape sequences into colors.
 @end itemize
 
address@hidden Fullscreen mode on MS-Windows,  , Escape sequences in shell 
output, Common requests
address@hidden How can I start Emacs in fullscreen mode on MS-Windows?
address@hidden Maximized mode on MS-Windows,  , Escape sequences in shell 
output, Common requests
address@hidden How can I start Emacs in maximized mode on MS-Windows?
 @cindex Maximize frame
address@hidden Fullscreen mode
 
 Use the function @code{w32-send-sys-command}.  For example, you can
 put the following in your @file{.emacs} file:
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 man/xresources.texi
--- a/man/xresources.texi       Wed Aug 20 14:11:56 2008 +0200
+++ b/man/xresources.texi       Wed Aug 20 17:11:45 2008 +0200
@@ -236,10 +236,10 @@
 all frames.
 
 @ifnottex
address@hidden @code{fullscreen} (class @code{Fullscreen})
-The desired fullscreen size.  The value can be one of @code{fullboth},
address@hidden or @code{fullheight}, which correspond to
-the command-line options @samp{-fs}, @samp{-fw}, and @samp{-fh}
address@hidden @code{maximize} (class @code{Maximize})
+The desired way to maximize.  The value can be one of @code{maxboth},
address@hidden or @code{maxheight}, which correspond to
+the command-line options @samp{-mb}, @samp{-mw}, and @samp{-mh}
 (@pxref{Window Size X}).
 
 Note that this applies to the initial frame only.
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/ChangeLog
--- a/src/ChangeLog     Wed Aug 20 14:11:56 2008 +0200
+++ b/src/ChangeLog     Wed Aug 20 17:11:45 2008 +0200
@@ -1,3 +1,18 @@
+2008-08-20  Ivan Kanis <address@hidden>
+
+       * emacs.c: update command switch to maximize
+
+       * frame.c, frame.h: subtitute maximize ressources
+
+       * term.c, termhooks.h: update name of function from of
+       fullscreen to maximize
+
+       * xfns.c, xterm.c: change X function name
+
+       * w32fns.c, w32term.c: change windows function name
+
+       * macfns.c: chang Mac OS function name
+       
 2008-08-10  Glenn Morris  <address@hidden>
 
        Sync from trunk 2008-07-08:
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/emacs.c
--- a/src/emacs.c       Wed Aug 20 14:11:56 2008 +0200
+++ b/src/emacs.c       Wed Aug 20 17:11:45 2008 +0200
@@ -311,14 +311,14 @@
 --cursor-color, -cr COLOR       color of the Emacs cursor indicating point\n\
 --font, -fn FONT                default font; must be fixed-width\n\
 --foreground-color, -fg COLOR   window foreground color\n\
---fullheight, -fh               make the first frame high as the screen\n\
---fullscreen, -fs               make first frame fullscreen\n\
---fullwidth, -fw                make the first frame wide as the screen\n\
 --geometry, -g GEOMETRY         window geometry\n\
 --no-bitmap-icon, -nbi          do not use picture of gnu for Emacs icon\n\
 --iconic                        start Emacs in iconified state\n\
 --internal-border, -ib WIDTH    width between text and main border\n\
 --line-spacing, -lsp PIXELS     additional space to put between lines\n\
+--maxboth, -mb                  make first frame maximized\n\
+--maxheight, -mh                make the first frame high as the screen\n\
+--maxwidth, -mw                 make the first frame wide as the screen\n\
 --mouse-color, -ms COLOR        mouse cursor color in Emacs window\n\
 --name NAME                     title for initial Emacs frame\n\
 --no-blinking-cursor, -nbc      disable blinking cursor\n\
@@ -1833,13 +1833,13 @@
   { "-nbc", "--no-blinking-cursor", 10, 0 },
   { "-fn", "--font", 10, 1 },
   { "-font", 0, 10, 1 },
-  { "-fs", "--fullscreen", 10, 0 },
-  { "-fw", "--fullwidth", 10, 0 },
-  { "-fh", "--fullheight", 10, 0 },
   { "-g", "--geometry", 10, 1 },
   { "-geometry", 0, 10, 1 },
   { "-T", "--title", 10, 1 },
   { "-title", 0, 10, 1 },
+  { "-mb", "--maxboth", 10, 0 },
+  { "-mw", "--maxwidth", 10, 0 },
+  { "-mh", "--maxheight", 10, 0 },
   { "-name", "--name", 10, 1 },
   { "-xrm", "--xrm", 10, 1 },
   { "-r", "--reverse-video", 5, 0 },
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/frame.c
--- a/src/frame.c       Wed Aug 20 14:11:56 2008 +0200
+++ b/src/frame.c       Wed Aug 20 17:11:45 2008 +0200
@@ -107,7 +107,7 @@
 Lisp_Object Qbuffer_predicate, Qbuffer_list;
 Lisp_Object Qtty_color_mode;
 
-Lisp_Object Qfullscreen, Qfullwidth, Qfullheight, Qfullboth;
+Lisp_Object Qmaximize, Qmaxwidth, Qmaxheight, Qmaxboth;
 
 Lisp_Object Qinhibit_face_set_after_frame_default;
 Lisp_Object Qface_set_after_frame_default;
@@ -298,7 +298,7 @@
   f->line_height = 1;  /* !FRAME_WINDOW_P value */
   f->x_pixels_diff = f->y_pixels_diff = 0;
 #ifdef HAVE_WINDOW_SYSTEM
-  f->want_fullscreen = FULLSCREEN_NONE;
+  f->want_maximize = MAXIMIZE_NONE;
 #endif
   f->size_hint_flags = 0;
   f->win_gravity = 0;
@@ -2582,7 +2582,7 @@
   {"left-fringe",              &Qleft_fringe},
   {"right-fringe",             &Qright_fringe},
   {"wait-for-wm",              &Qwait_for_wm},
-  {"fullscreen",                &Qfullscreen},
+  {"maximize",                  &Qmaximize},
 };
 
 #ifdef HAVE_WINDOW_SYSTEM
@@ -2590,14 +2590,14 @@
 extern Lisp_Object Qbox;
 extern Lisp_Object Qtop;
 
-/* Calculate fullscreen size.  Return in *TOP_POS and *LEFT_POS the
+/* Calculate maximize size.  Return in *TOP_POS and *LEFT_POS the
    wanted positions of the WM window (not Emacs window).
    Return in *WIDTH and *HEIGHT the wanted width and height of Emacs
    window (FRAME_X_WINDOW).
  */
 
 void
-x_fullscreen_adjust (f, width, height, top_pos, left_pos)
+x_maximize_adjust (f, width, height, top_pos, left_pos)
      struct frame *f;
      int *width;
      int *height;
@@ -2610,7 +2610,7 @@
   *top_pos = f->top_pos;
   *left_pos = f->left_pos;
 
-  if (f->want_fullscreen & FULLSCREEN_HEIGHT)
+  if (f->want_maximize & MAXIMIZE_HEIGHT)
     {
       int ph;
 
@@ -2621,7 +2621,7 @@
       *top_pos = 0;
     }
 
-  if (f->want_fullscreen & FULLSCREEN_WIDTH)
+  if (f->want_maximize & MAXIMIZE_WIDTH)
     {
       int pw;
 
@@ -2667,7 +2667,7 @@
   int i, p;
   int left_no_change = 0, top_no_change = 0;
   int icon_left_no_change = 0, icon_top_no_change = 0;
-  int fullscreen_is_being_set = 0;
+  int maximize_is_being_set = 0;
 
   struct gcpro gcpro1, gcpro2;
 
@@ -2710,7 +2710,7 @@
      They are independent of other properties, but other properties (e.g.,
      cursor_color) are dependent upon them.  */
   /* Process default font as well, since fringe widths depends on it.  */
-  /* Also, process fullscreen, width and height depend upon that */
+  /* Also, process maximize, width and height depend upon that */
   for (p = 0; p < i; p++)
     {
       Lisp_Object prop, val;
@@ -2720,13 +2720,13 @@
       if (EQ (prop, Qforeground_color)
          || EQ (prop, Qbackground_color)
          || EQ (prop, Qfont)
-          || EQ (prop, Qfullscreen))
+          || EQ (prop, Qmaximize))
        {
          register Lisp_Object param_index, old_value;
          int count = SPECPDL_INDEX ();
 
          old_value = get_frame_param (f, prop);
-         fullscreen_is_being_set |= EQ (prop, Qfullscreen);
+         maximize_is_being_set |= EQ (prop, Qmaximize);
 
          if (NILP (Fequal (val, old_value)))
            {
@@ -2774,7 +2774,7 @@
       else if (EQ (prop, Qforeground_color)
               || EQ (prop, Qbackground_color)
               || EQ (prop, Qfont)
-               || EQ (prop, Qfullscreen))
+               || EQ (prop, Qmaximize))
        /* Processed above.  */
        continue;
       else
@@ -2828,18 +2828,18 @@
        XSETINT (icon_top, 0);
     }
 
-  if (FRAME_VISIBLE_P (f) && fullscreen_is_being_set)
-    {
-      /* If the frame is visible already and the fullscreen parameter is
+  if (FRAME_VISIBLE_P (f) && maximize_is_being_set)
+    {
+      /* If the frame is visible already and the maximize parameter is
          being set, it is too late to set WM manager hints to specify
          size and position.
          Here we first get the width, height and position that applies to
-         fullscreen.  We then move the frame to the appropriate
+         maximize.  We then move the frame to the appropriate
          position.  Resize of the frame is taken care of in the code after
          this if-statement. */
       int new_left, new_top;
 
-      x_fullscreen_adjust (f, &width, &height, &new_top, &new_left);
+      x_maximize_adjust (f, &width, &height, &new_top, &new_left);
       if (new_top != f->top_pos || new_left != f->left_pos)
         x_set_offset (f, new_left, new_top, 1);
     }
@@ -3012,25 +3012,25 @@
 }
 
 
-/* Change the `fullscreen' frame parameter of frame F.  OLD_VALUE is
+/* Change the `maximize' frame parameter of frame F.  OLD_VALUE is
    the previous value of that parameter, NEW_VALUE is the new value. */
 
 void
-x_set_fullscreen (f, new_value, old_value)
+x_set_maximize (f, new_value, old_value)
      struct frame *f;
      Lisp_Object new_value, old_value;
 {
   if (NILP (new_value))
-    f->want_fullscreen = FULLSCREEN_NONE;
-  else if (EQ (new_value, Qfullboth))
-    f->want_fullscreen = FULLSCREEN_BOTH;
-  else if (EQ (new_value, Qfullwidth))
-    f->want_fullscreen = FULLSCREEN_WIDTH;
-  else if (EQ (new_value, Qfullheight))
-    f->want_fullscreen = FULLSCREEN_HEIGHT;
-
-  if (fullscreen_hook != NULL) 
-    fullscreen_hook (f);
+    f->want_maximize = MAXIMIZE_NONE;
+  else if (EQ (new_value, Qmaxboth))
+    f->want_maximize = MAXIMIZE_BOTH;
+  else if (EQ (new_value, Qmaxwidth))
+    f->want_maximize = MAXIMIZE_WIDTH;
+  else if (EQ (new_value, Qmaxheight))
+    f->want_maximize = MAXIMIZE_HEIGHT;
+
+  if (maximize_hook != NULL) 
+    maximize_hook (f);
 }
 
 
@@ -3916,14 +3916,14 @@
        window_prompting |= PPosition;
     }
 
-  if (f->want_fullscreen != FULLSCREEN_NONE)
+  if (f->want_maximize != MAXIMIZE_NONE)
     {
       int left, top;
       int width, height;
 
       /* It takes both for some WM:s to place it where we want */
       window_prompting |= USPosition | PPosition;
-      x_fullscreen_adjust (f, &width, &height, &top, &left);
+      x_maximize_adjust (f, &width, &height, &top, &left);
       FRAME_COLS (f) = width;
       FRAME_LINES (f) = height;
       FRAME_PIXEL_WIDTH (f) = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width);
@@ -4033,12 +4033,12 @@
     = intern ("inhibit-face-set-after-frame-default");
   staticpro (&Qinhibit_face_set_after_frame_default);
 
-  Qfullwidth = intern ("fullwidth");
-  staticpro (&Qfullwidth);
-  Qfullheight = intern ("fullheight");
-  staticpro (&Qfullheight);
-  Qfullboth = intern ("fullboth");
-  staticpro (&Qfullboth);
+  Qmaxwidth = intern ("maxwidth");
+  staticpro (&Qmaxwidth);
+  Qmaxheight = intern ("maxheight");
+  staticpro (&Qmaxheight);
+  Qmaxboth = intern ("maxboth");
+  staticpro (&Qmaxboth);
   Qx_resource_name = intern ("x-resource-name");
   staticpro (&Qx_resource_name);
 
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/frame.h
--- a/src/frame.h       Wed Aug 20 14:11:56 2008 +0200
+++ b/src/frame.h       Wed Aug 20 17:11:45 2008 +0200
@@ -323,8 +323,8 @@
   struct kboard *kboard;
 #endif
 
-  /* See FULLSCREEN_ enum below */
-  int want_fullscreen;
+  /* See MAXIMIZE_ enum below */
+  int want_maximize;
 
   /* Number of lines of menu bar.  */
   int menu_bar_lines;
@@ -1013,7 +1013,7 @@
 extern Lisp_Object Qscreen_gamma;
 extern Lisp_Object Qline_spacing;
 extern Lisp_Object Qwait_for_wm;
-extern Lisp_Object Qfullscreen;
+extern Lisp_Object Qmaximize;
 
 extern Lisp_Object Qleft_fringe, Qright_fringe;
 extern Lisp_Object Qheight, Qwidth;
@@ -1037,11 +1037,11 @@
 enum
 {
   /* Values used as a bit mask, BOTH == WIDTH | HEIGHT.  */
-  FULLSCREEN_NONE       = 0,
-  FULLSCREEN_WIDTH      = 1,
-  FULLSCREEN_HEIGHT     = 2,
-  FULLSCREEN_BOTH       = 3,
-  FULLSCREEN_WAIT       = 4
+  MAXIMIZE_NONE       = 0,
+  MAXIMIZE_WIDTH      = 1,
+  MAXIMIZE_HEIGHT     = 2,
+  MAXIMIZE_BOTH       = 3,
+  MAXIMIZE_WAIT       = 4
 };
 
 
@@ -1063,13 +1063,13 @@
 
 extern Lisp_Object Qface_set_after_frame_default;
 
-extern void x_fullscreen_adjust P_ ((struct frame *f, int *, int *,
+extern void x_maximize_adjust P_ ((struct frame *f, int *, int *,
                                     int *, int *));
 
 extern void x_set_frame_parameters P_ ((struct frame *, Lisp_Object));
 extern void x_report_frame_params P_ ((struct frame *, Lisp_Object *));
 
-extern void x_set_fullscreen P_ ((struct frame *, Lisp_Object, Lisp_Object));
+extern void x_set_maximize P_ ((struct frame *, Lisp_Object, Lisp_Object));
 extern void x_set_line_spacing P_ ((struct frame *, Lisp_Object, Lisp_Object));
 extern void x_set_screen_gamma P_ ((struct frame *, Lisp_Object, Lisp_Object));
 extern void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object));
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/macfns.c
--- a/src/macfns.c      Wed Aug 20 14:11:56 2008 +0200
+++ b/src/macfns.c      Wed Aug 20 17:11:45 2008 +0200
@@ -2615,8 +2615,8 @@
                       RES_TYPE_SYMBOL);
   x_default_parameter (f, parms, Qtitle, Qnil,
                       "title", "Title", RES_TYPE_STRING);
-  x_default_parameter (f, parms, Qfullscreen, Qnil,
-                       "fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
+  x_default_parameter (f, parms, Qmaximize, Qnil,
+                       "maximize", "Maximize", RES_TYPE_SYMBOL);
 
   f->output_data.mac->parent_desc = FRAME_MAC_DISPLAY_INFO (f)->root_window;
 
@@ -4341,7 +4341,7 @@
   x_set_fringe_width,
   x_set_fringe_width,
   0, /* x_set_wait_for_wm, */
-  x_set_fullscreen,
+  x_set_maximize,
 };
 
 void
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/term.c
--- a/src/term.c        Wed Aug 20 14:11:56 2008 +0200
+++ b/src/term.c        Wed Aug 20 17:11:45 2008 +0200
@@ -193,9 +193,9 @@
 void (*frame_raise_lower_hook) P_ ((FRAME_PTR f, int raise));
 
 /* If the value of the frame parameter changed, whis hook is called.
-   For example, if going from fullscreen to not fullscreen this hook
+   For example, if going from maximize to not this hook
    may do something OS dependent, like extended window manager hints on X11.  
*/
-void (*fullscreen_hook) P_ ((struct frame *f));
+void (*maximize_hook) P_ ((struct frame *f));
 
 /* Set the vertical scroll bar for WINDOW to have its upper left corner
    at (TOP, LEFT), and be LENGTH rows high.  Set its handle to
@@ -2781,7 +2781,7 @@
   defsubr (&Stty_display_color_cells);
   defsubr (&Stty_no_underline);
 
-  fullscreen_hook = NULL;
+  maximize_hook = NULL;
 #ifndef WINDOWSNT
   default_orig_pair = NULL;
   default_set_foreground = NULL;
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/termhooks.h
--- a/src/termhooks.h   Wed Aug 20 14:11:56 2008 +0200
+++ b/src/termhooks.h   Wed Aug 20 17:11:45 2008 +0200
@@ -121,9 +121,9 @@
 extern void (*frame_raise_lower_hook) P_ ((struct frame *f, int raise));
 
 /* If the value of the frame parameter changed, whis hook is called.
-   For example, if going from fullscreen to not fullscreen this hook
+   For example, if going from maximize to not this hook
    may do something OS dependent, like extended window manager hints on X11.  
*/
-extern void (*fullscreen_hook) P_ ((struct frame *f));
+extern void (*maximize_hook) P_ ((struct frame *f));
 
 
 /* Scroll bar hooks.  */
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/w32fns.c
--- a/src/w32fns.c      Wed Aug 20 14:11:56 2008 +0200
+++ b/src/w32fns.c      Wed Aug 20 17:11:45 2008 +0200
@@ -4352,8 +4352,8 @@
                       "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL);
   x_default_parameter (f, parameters, Qtitle, Qnil,
                       "title", "Title", RES_TYPE_STRING);
-  x_default_parameter (f, parameters, Qfullscreen, Qnil,
-                       "fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
+  x_default_parameter (f, parameters, Qmaximize, Qnil,
+                       "maximize", "Maximize", RES_TYPE_SYMBOL);
 
   f->output_data.w32->dwStyle = WS_OVERLAPPEDWINDOW;
   f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
@@ -8608,7 +8608,7 @@
   x_set_fringe_width,
   x_set_fringe_width,
   0, /* x_set_wait_for_wm, */
-  x_set_fullscreen,
+  x_set_maximize,
 };
 
 void
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/w32term.c
--- a/src/w32term.c     Wed Aug 20 14:11:56 2008 +0200
+++ b/src/w32term.c     Wed Aug 20 17:11:45 2008 +0200
@@ -3271,7 +3271,7 @@
 
 static struct scroll_bar *x_window_to_scroll_bar ();
 static void x_scroll_bar_report_motion ();
-static void x_check_fullscreen P_ ((struct frame *));
+static void x_check_maximize P_ ((struct frame *));
 
 static void
 redo_mouse_highlight ()
@@ -4616,8 +4616,8 @@
          f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
          if (f)
            {
-             if (f->want_fullscreen & FULLSCREEN_WAIT)
-               f->want_fullscreen &= ~(FULLSCREEN_WAIT|FULLSCREEN_BOTH);
+             if (f->want_maximize & MAXIMIZE_WAIT)
+               f->want_maximize &= ~(MAXIMIZE_WAIT|MAXIMIZE_BOTH);
            }
          check_visibility = 1;
          break;
@@ -4626,7 +4626,7 @@
        case WM_ACTIVATEAPP:
          f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
          if (f)
-           x_check_fullscreen (f);
+           x_check_maximize (f);
          check_visibility = 1;
          break;
 
@@ -5566,19 +5566,19 @@
 }
 
 
-/* Check if we need to resize the frame due to a fullscreen request.
+/* Check if we need to resize the frame due to a maximize request.
    If so needed, resize the frame. */
 static void
-x_check_fullscreen (f)
-     struct frame *f;
-{
-  if (f->want_fullscreen & FULLSCREEN_BOTH)
+x_check_maximize (f)
+     struct frame *f;
+{
+  if (f->want_maximize & MAXIMIZE_BOTH)
     {
       int width, height, ign;
 
       x_real_positions (f, &f->left_pos, &f->top_pos);
 
-      x_fullscreen_adjust (f, &width, &height, &ign, &ign);
+      x_maximize_adjust (f, &width, &height, &ign, &ign);
 
       /* We do not need to move the window, it shall be taken care of
          when setting WM manager hints.  */
@@ -5589,7 +5589,7 @@
           cancel_mouse_face (f);
 
           /* Wait for the change of frame size to occur */
-          f->want_fullscreen |= FULLSCREEN_WAIT;
+          f->want_maximize |= MAXIMIZE_WAIT;
         }
     }
 }
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/xfns.c
--- a/src/xfns.c        Wed Aug 20 14:11:56 2008 +0200
+++ b/src/xfns.c        Wed Aug 20 17:11:45 2008 +0200
@@ -3324,8 +3324,8 @@
                       "title", "Title", RES_TYPE_STRING);
   x_default_parameter (f, parms, Qwait_for_wm, Qt,
                       "waitForWM", "WaitForWM", RES_TYPE_BOOLEAN);
-  x_default_parameter (f, parms, Qfullscreen, Qnil,
-                       "fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
+  x_default_parameter (f, parms, Qmaximize, Qnil,
+                       "maximize", "Maximize", RES_TYPE_SYMBOL);
 
   f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
 
@@ -5767,7 +5767,7 @@
   x_set_fringe_width,
   x_set_fringe_width,
   x_set_wait_for_wm,
-  x_set_fullscreen,
+  x_set_maximize,
 };
 
 void
diff -r 2a9cc3cd6cde -r 7ad292c02ef4 src/xterm.c
--- a/src/xterm.c       Wed Aug 20 14:11:56 2008 +0200
+++ b/src/xterm.c       Wed Aug 20 17:11:45 2008 +0200
@@ -363,7 +363,7 @@
                                            enum scroll_bar_part *,
                                            Lisp_Object *, Lisp_Object *,
                                            unsigned long *));
-static void x_check_fullscreen P_ ((struct frame *));
+static void x_check_maximize P_ ((struct frame *));
 static void x_check_expected_move P_ ((struct frame *, int, int));
 static void x_sync_with_move P_ ((struct frame *, int, int, int));
 static int handle_one_xevent P_ ((struct x_display_info *, XEvent *,
@@ -5967,7 +5967,7 @@
       f = x_window_to_frame (dpyinfo, event.xexpose.window);
       if (f)
         {
-          x_check_fullscreen (f);
+          x_check_maximize (f);
 
 #ifdef USE_GTK
           /* This seems to be needed for GTK 2.6.  */
@@ -6676,12 +6676,12 @@
           xg_resize_widgets (f, event.xconfigure.width,
                              event.xconfigure.height);
 #else /* not USE_GTK */
-          /* If there is a pending resize for fullscreen, don't
+          /* If there is a pending resize for maximize, don't
              do this one, the right one will come later.
              The toolkit version doesn't seem to need this, but we
              need to reset it below.  */
           int dont_resize
-           = ((f->want_fullscreen & FULLSCREEN_WAIT)
+           = ((f->want_maximize & MAXIMIZE_WAIT)
               && f->new_text_cols != 0);
           int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, 
event.xconfigure.height);
           int columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, 
event.xconfigure.width);
@@ -6713,15 +6713,15 @@
 
 #ifdef USE_GTK
           /* GTK creates windows but doesn't map them.
-             Only get real positions and check fullscreen when mapped. */
+             Only get real positions and check maximize when mapped. */
           if (FRAME_GTK_OUTER_WIDGET (f)
               && GTK_WIDGET_MAPPED (FRAME_GTK_OUTER_WIDGET (f)))
 #endif
             {
              x_real_positions (f, &f->left_pos, &f->top_pos);
 
-             if (f->want_fullscreen & FULLSCREEN_WAIT)
-               f->want_fullscreen &= ~(FULLSCREEN_WAIT|FULLSCREEN_BOTH);
+             if (f->want_maximize & MAXIMIZE_WAIT)
+               f->want_maximize &= ~(MAXIMIZE_WAIT|MAXIMIZE_BOTH);
             }
 
 #ifdef HAVE_X_I18N
@@ -8428,10 +8428,10 @@
   return rc;
 }
 
-/* Do fullscreen as specified in extended window manager hints */
-
-static int
-do_ewmh_fullscreen (f)
+/* Do maximize as specified in extended window manager hints */
+
+static int
+do_ewmh_maximize (f)
      struct frame *f;
 {
   int have_net_atom = wm_supports (f, "_NET_WM_STATE");
@@ -8454,15 +8454,15 @@
 
       /* If there are _NET_ atoms we assume we have extended window manager
          hints.  */
-      switch (f->want_fullscreen)
-        {
-        case FULLSCREEN_BOTH:
+      switch (f->want_maximize)
+        {
+        case MAXIMIZE_BOTH:
           what = fs;
           break;
-        case FULLSCREEN_WIDTH:
+        case MAXIMIZE_WIDTH:
           what = fw;
           break;
-        case FULLSCREEN_HEIGHT:
+        case MAXIMIZE_HEIGHT:
           what = fh;
           break;
         }
@@ -8494,7 +8494,7 @@
                                    (make_unibyte_string (fw,
                                                          strlen (fw)),
                                     Qnil)));
-      f->want_fullscreen = FULLSCREEN_NONE;
+      f->want_maximize = MAXIMIZE_NONE;
       if (what != NULL)
         Fx_send_client_event (frame, make_number (0), frame,
                               make_unibyte_string (atom, strlen (atom)),
@@ -8510,35 +8510,35 @@
 }
 
 static void
-XTfullscreen_hook (f)
+XTmaximize_hook (f)
      FRAME_PTR f;
 {
   if (f->async_visible)
     {
       BLOCK_INPUT;
-      do_ewmh_fullscreen (f);
+      do_ewmh_maximize (f);
       x_sync (f);
       UNBLOCK_INPUT;
     }
 }
 
 
-/* Check if we need to resize the frame due to a fullscreen request.
+/* Check if we need to resize the frame due to a maximize request.
    If so needed, resize the frame. */
 static void
-x_check_fullscreen (f)
-     struct frame *f;
-{
-  if (f->want_fullscreen & FULLSCREEN_BOTH)
+x_check_maximize (f)
+     struct frame *f;
+{
+  if (f->want_maximize & MAXIMIZE_BOTH)
     {
       int width, height, ign;
 
-      if (do_ewmh_fullscreen (f))
+      if (do_ewmh_maximize (f))
         return;
 
       x_real_positions (f, &f->left_pos, &f->top_pos);
 
-      x_fullscreen_adjust (f, &width, &height, &ign, &ign);
+      x_maximize_adjust (f, &width, &height, &ign, &ign);
 
       /* We do not need to move the window, it shall be taken care of
          when setting WM manager hints.
@@ -8551,7 +8551,7 @@
           cancel_mouse_face (f);
 
           /* Wait for the change of frame size to occur */
-          f->want_fullscreen |= FULLSCREEN_WAIT;
+          f->want_maximize |= MAXIMIZE_WAIT;
         }
     }
 }
@@ -11181,7 +11181,7 @@
   condemn_scroll_bars_hook = XTcondemn_scroll_bars;
   redeem_scroll_bar_hook = XTredeem_scroll_bar;
   judge_scroll_bars_hook = XTjudge_scroll_bars;
-  fullscreen_hook = XTfullscreen_hook;
+  maximize_hook = XTmaximize_hook;
 
   scroll_region_ok = 1;                /* we'll scroll partial frames */
   char_ins_del_ok = 1;

-- 
Ivan
http://kanis.fr

The West won the world not by the superiority of its ideas or values
or religion ... but rather by its superiority in applying organized
violence. Westerners often forget this fact; non-Westerners never do.
    -- Samuel Huntington 





reply via email to

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