Commit 61320cc9 authored by Paul Eggert's avatar Paul Eggert

Minor tweaks to frame_size_history_add

* frame.c (frame_size_history_add): Don't assume length fits in 'int'.
Prefer XCAR and XCDR to Fcar and Fcdr when the arg is a cons.
(Fframe_after_make_frame): Simplify.
* gtkutil.c: Remove commented-out code.
* xfns.c (Fx_create_frame): Fix indenting.
parent dd2aa937
2015-02-08 Paul Eggert <eggert@cs.ucla.edu>
Minor tweaks to frame_size_history_add
* frame.c (frame_size_history_add): Don't assume length fits in 'int'.
Prefer XCAR and XCDR to Fcar and Fcdr when the arg is a cons.
(Fframe_after_make_frame): Simplify.
* gtkutil.c: Remove commented-out code.
* xfns.c (Fx_create_frame): Fix indenting.
2015-02-08 Eli Zaretskii <eliz@gnu.org> 2015-02-08 Eli Zaretskii <eliz@gnu.org>
* frame.c (Fframe_parameter): Don't replace a non-nil value of * frame.c (Fframe_parameter): Don't replace a non-nil value of
......
...@@ -155,14 +155,13 @@ frame_size_history_add (struct frame *f, Lisp_Object fun_symbol, ...@@ -155,14 +155,13 @@ frame_size_history_add (struct frame *f, Lisp_Object fun_symbol,
int width, int height, Lisp_Object rest) int width, int height, Lisp_Object rest)
{ {
Lisp_Object frame; Lisp_Object frame;
int number;
XSETFRAME (frame, f); XSETFRAME (frame, f);
if (CONSP (frame_size_history) if (CONSP (frame_size_history)
&& NUMBERP (Fcar (frame_size_history)) && INTEGERP (XCAR (frame_size_history))
&& ((number = XINT (Fcar (frame_size_history))) > 0)) && 0 < XINT (XCAR (frame_size_history)))
frame_size_history = frame_size_history =
Fcons (make_number (number - 1), Fcons (make_number (XINT (XCAR (frame_size_history)) - 1),
Fcons (list4 Fcons (list4
(frame, fun_symbol, (frame, fun_symbol,
((width > 0) ((width > 0)
...@@ -172,7 +171,7 @@ frame_size_history_add (struct frame *f, Lisp_Object fun_symbol, ...@@ -172,7 +171,7 @@ frame_size_history_add (struct frame *f, Lisp_Object fun_symbol,
make_number (height)) make_number (height))
: Qnil), : Qnil),
rest), rest),
Fcdr (frame_size_history))); XCDR (frame_size_history)));
} }
...@@ -2298,9 +2297,7 @@ otherwise used with utter care to avoid that running functions on ...@@ -2298,9 +2297,7 @@ otherwise used with utter care to avoid that running functions on
(Lisp_Object frame, Lisp_Object made) (Lisp_Object frame, Lisp_Object made)
{ {
struct frame *f = decode_live_frame (frame); struct frame *f = decode_live_frame (frame);
f->after_make_frame = !NILP (made);
f->after_make_frame = NILP (made) ? false : true;
return made; return made;
} }
......
...@@ -50,12 +50,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -50,12 +50,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "emacsgtkfixed.h" #include "emacsgtkfixed.h"
#endif #endif
/** #define FRAME_TOTAL_PIXEL_HEIGHT(f) \ **/
/** (FRAME_PIXEL_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f)) **/
/** #define FRAME_TOTAL_PIXEL_WIDTH(f) \ **/
/** (FRAME_PIXEL_WIDTH (f) + FRAME_TOOLBAR_WIDTH (f)) **/
#ifndef HAVE_GTK_WIDGET_SET_HAS_WINDOW #ifndef HAVE_GTK_WIDGET_SET_HAS_WINDOW
#define gtk_widget_set_has_window(w, b) \ #define gtk_widget_set_has_window(w, b) \
(gtk_fixed_set_has_window (GTK_FIXED (w), b)) (gtk_fixed_set_has_window (GTK_FIXED (w), b))
...@@ -903,9 +897,6 @@ xg_frame_resized (struct frame *f, int pixelwidth, int pixelheight) ...@@ -903,9 +897,6 @@ xg_frame_resized (struct frame *f, int pixelwidth, int pixelheight)
|| pixelwidth != FRAME_PIXEL_WIDTH (f) || pixelwidth != FRAME_PIXEL_WIDTH (f)
|| pixelheight != FRAME_PIXEL_HEIGHT (f)) || pixelheight != FRAME_PIXEL_HEIGHT (f))
{ {
/** FRAME_PIXEL_WIDTH (f) = pixelwidth; **/
/** FRAME_PIXEL_HEIGHT (f) = pixelheight; **/
xg_clear_under_internal_border (f); xg_clear_under_internal_border (f);
change_frame_size (f, width, height, 0, 1, 0, 1); change_frame_size (f, width, height, 0, 1, 0, 1);
SET_FRAME_GARBAGED (f); SET_FRAME_GARBAGED (f);
......
...@@ -3184,7 +3184,7 @@ This function is an internal primitive--use `make-frame' instead. */) ...@@ -3184,7 +3184,7 @@ This function is an internal primitive--use `make-frame' instead. */)
"title", "Title", RES_TYPE_STRING); "title", "Title", RES_TYPE_STRING);
x_default_parameter (f, parms, Qwait_for_wm, Qt, x_default_parameter (f, parms, Qwait_for_wm, Qt,
"waitForWM", "WaitForWM", RES_TYPE_BOOLEAN); "waitForWM", "WaitForWM", RES_TYPE_BOOLEAN);
x_default_parameter (f, parms, Qtool_bar_position, x_default_parameter (f, parms, Qtool_bar_position,
FRAME_TOOL_BAR_POSITION (f), 0, 0, RES_TYPE_SYMBOL); FRAME_TOOL_BAR_POSITION (f), 0, 0, RES_TYPE_SYMBOL);
/* Compute the size of the X window. */ /* Compute the size of the X window. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment