From: Dmitry Antipov Date: Tue, 17 Sep 2013 15:57:45 +0000 (+0400) Subject: * w32term.c (w32_read_socket): Avoid temporary X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1576 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0791d107eddb1ff08b321b204427fd3599e0b2cb;p=emacs.git * w32term.c (w32_read_socket): Avoid temporary variables in a call to x_real_positions. * xterm.c (handle_one_xevent): Likewise. --- diff --git a/src/ChangeLog b/src/ChangeLog index e900cfb1bb1..4223573a6ff 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-09-17 Dmitry Antipov + + * w32term.c (w32_read_socket): Avoid temporary + variables in a call to x_real_positions. + * xterm.c (handle_one_xevent): Likewise. + 2013-09-17 Dmitry Antipov * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function. diff --git a/src/w32term.c b/src/w32term.c index 59fdf130592..331a86ef7d7 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -4687,13 +4687,7 @@ w32_read_socket (struct terminal *terminal, f = x_window_to_frame (dpyinfo, msg.msg.hwnd); if (f && !FRAME_ICONIFIED_P (f)) - { - int x, y; - - x_real_positions (f, &x, &y); - f->left_pos = x; - f->top_pos = y; - } + x_real_positions (f, &f->left_pos, &f->top_pos); check_visibility = 1; break; @@ -4756,16 +4750,12 @@ w32_read_socket (struct terminal *terminal, if (iconified) { - int x, y; - /* Reset top and left positions of the Window here since Windows sends a WM_MOVE message BEFORE telling us the Window is minimized when the Window is iconified, with 3000,3000 as the co-ords. */ - x_real_positions (f, &x, &y); - f->left_pos = x; - f->top_pos = y; + x_real_positions (f, &f->left_pos, &f->top_pos); inev.kind = DEICONIFY_EVENT; XSETFRAME (inev.frame_or_window, f); diff --git a/src/xterm.c b/src/xterm.c index fadcdbfea98..08a360fd52c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6129,11 +6129,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, f = x_top_window_to_frame (dpyinfo, event->xreparent.window); if (f) { - int x, y; f->output_data.x->parent_desc = event->xreparent.parent; - x_real_positions (f, &x, &y); - f->left_pos = x; - f->top_pos = y; + x_real_positions (f, &f->left_pos, &f->top_pos); /* Perhaps reparented due to a WM restart. Reset this. */ FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN; @@ -6827,9 +6824,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (FRAME_GTK_OUTER_WIDGET (f) && gtk_widget_get_mapped (FRAME_GTK_OUTER_WIDGET (f))) #endif - { - x_real_positions (f, &f->left_pos, &f->top_pos); - } + x_real_positions (f, &f->left_pos, &f->top_pos); #ifdef HAVE_X_I18N if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMStatusArea))