emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r114323: * xterm.h (struct x_display_info): New memb


From: Dmitry Antipov
Subject: [Emacs-diffs] trunk r114323: * xterm.h (struct x_display_info): New member
Date: Tue, 17 Sep 2013 08:24:42 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114323
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2013-09-17 12:24:20 +0400
message:
  * xterm.h (struct x_display_info): New member
  x_pending_autoraise_frame, going to replace...
  * xterm.c (pending_autoraise_frame): ...static variable.
  (x_new_focus_frame, XTread_socket): Adjust users.
  * w32term.h (struct w32_display_info): New member
  w32_pending_autoraise_frame, going to replace...
  * w32term.c (pending_autoraise_frame): ...global variable.
  (x_new_focus_frame, w32_read_socket): Adjust users.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/w32term.c                  w32term.c-20091113204419-o5vbwnq5f7feedwu-950
  src/w32term.h                  w32term.h-20091113204419-o5vbwnq5f7feedwu-954
  src/xterm.c                    xterm.c-20091113204419-o5vbwnq5f7feedwu-244
  src/xterm.h                    xterm.h-20091113204419-o5vbwnq5f7feedwu-228
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-09-17 07:39:54 +0000
+++ b/src/ChangeLog     2013-09-17 08:24:20 +0000
@@ -1,3 +1,14 @@
+2013-09-17  Dmitry Antipov  <address@hidden>
+
+       * xterm.h (struct x_display_info): New member
+       x_pending_autoraise_frame, going to replace...
+       * xterm.c (pending_autoraise_frame): ...static variable.
+       (x_new_focus_frame, XTread_socket): Adjust users.
+       * w32term.h (struct w32_display_info): New member
+       w32_pending_autoraise_frame, going to replace...
+       * w32term.c (pending_autoraise_frame): ...global variable.
+       (x_new_focus_frame, w32_read_socket): Adjust users.
+
 2013-09-17  Glenn Morris  <address@hidden>
 
        * xdisp.c (message_dolog): If we create *Messages*,

=== modified file 'src/w32term.c'
--- a/src/w32term.c     2013-09-15 08:28:30 +0000
+++ b/src/w32term.c     2013-09-17 08:24:20 +0000
@@ -149,9 +149,6 @@
 #define SM_CYVIRTUALSCREEN 79
 #endif
 
-/* This is a frame waiting to be autoraised, within w32_read_socket.  */
-struct frame *pending_autoraise_frame;
-
 /* The handle of the frame that currently owns the system caret.  */
 HWND w32_system_caret_hwnd;
 int w32_system_caret_height;
@@ -2823,9 +2820,9 @@
        x_lower_frame (old_focus);
 
       if (dpyinfo->w32_focus_frame && dpyinfo->w32_focus_frame->auto_raise)
-       pending_autoraise_frame = dpyinfo->w32_focus_frame;
+       dpyinfo->w32_pending_autoraise_frame = dpyinfo->w32_focus_frame;
       else
-       pending_autoraise_frame = 0;
+       dpyinfo->w32_pending_autoraise_frame = NULL;
     }
 
   x_frame_rehighlight (dpyinfo);
@@ -4981,12 +4978,11 @@
     }
 
   /* If the focus was just given to an autoraising frame,
-     raise it now.  */
-  /* ??? This ought to be able to handle more than one such frame.  */
-  if (pending_autoraise_frame)
+     raise it now.  FIXME: handle more than one such frame.  */
+  if (dpyinfo->w32_pending_autoraise_frame)
     {
-      x_raise_frame (pending_autoraise_frame);
-      pending_autoraise_frame = 0;
+      x_raise_frame (dpyinfo->w32_pending_autoraise_frame);
+      dpyinfo->w32_pending_autoraise_frame = NULL;
     }
 
   /* Check which frames are still visible, if we have enqueued any user

=== modified file 'src/w32term.h'
--- a/src/w32term.h     2013-09-15 08:28:30 +0000
+++ b/src/w32term.h     2013-09-17 08:24:20 +0000
@@ -179,6 +179,9 @@
      frame.  It differs from w32_focus_frame when we're using a global
      minibuffer.  */
   struct frame *x_highlight_frame;
+
+  /* The frame waiting to be auto-raised in w32_read_socket.  */
+  struct frame *w32_pending_autoraise_frame;
 };
 
 /* This is a chain of structures for all the displays currently in use.  */

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2013-09-17 07:36:35 +0000
+++ b/src/xterm.c       2013-09-17 08:24:20 +0000
@@ -155,10 +155,6 @@
 
 Lisp_Object x_display_name_list;
 
-/* This is a frame waiting to be auto-raised, within XTread_socket.  */
-
-static struct frame *pending_autoraise_frame;
-
 #ifdef USE_X_TOOLKIT
 
 /* The application context for Xt use.  */
@@ -3299,9 +3295,9 @@
        x_lower_frame (old_focus);
 
       if (dpyinfo->x_focus_frame && dpyinfo->x_focus_frame->auto_raise)
-       pending_autoraise_frame = dpyinfo->x_focus_frame;
+       dpyinfo->x_pending_autoraise_frame = dpyinfo->x_focus_frame;
       else
-       pending_autoraise_frame = 0;
+       dpyinfo->x_pending_autoraise_frame = NULL;
     }
 
   x_frame_rehighlight (dpyinfo);
@@ -7088,6 +7084,7 @@
 {
   int count = 0;
   int event_found = 0;
+  struct x_display_info *dpyinfo = terminal->display_info.x;
 
   block_input ();
 
@@ -7095,36 +7092,33 @@
   input_signal_count++;
 
   /* For debugging, this gives a way to fake an I/O error.  */
-  if (terminal->display_info.x == XTread_socket_fake_io_error)
+  if (dpyinfo == XTread_socket_fake_io_error)
     {
       XTread_socket_fake_io_error = 0;
-      x_io_error_quitter (terminal->display_info.x->display);
+      x_io_error_quitter (dpyinfo->display);
     }
 
 #ifndef USE_GTK
-  while (XPending (terminal->display_info.x->display))
+  while (XPending (dpyinfo->display))
     {
       int finish;
       XEvent event;
 
-      XNextEvent (terminal->display_info.x->display, &event);
+      XNextEvent (dpyinfo->display, &event);
 
 #ifdef HAVE_X_I18N
       /* Filter events for the current X input method.  */
-      if (x_filter_event (terminal->display_info.x, &event))
+      if (x_filter_event (dpyinfo, &event))
         continue;
 #endif
       event_found = 1;
 
-      count += handle_one_xevent (terminal->display_info.x,
-                                  &event, &finish, hold_quit);
+      count += handle_one_xevent (dpyinfo, &event, &finish, hold_quit);
 
       if (finish == X_EVENT_GOTO_OUT)
-        goto out;
+       break;
     }
 
- out:;
-
 #else /* USE_GTK */
 
   /* For GTK we must use the GTK event loop.  But XEvents gets passed
@@ -7174,12 +7168,11 @@
     }
 
   /* If the focus was just given to an auto-raising frame,
-     raise it now.  */
-  /* ??? This ought to be able to handle more than one such frame.  */
-  if (pending_autoraise_frame)
+     raise it now.  FIXME: handle more than one such frame.  */
+  if (dpyinfo->x_pending_autoraise_frame)
     {
-      x_raise_frame (pending_autoraise_frame);
-      pending_autoraise_frame = 0;
+      x_raise_frame (dpyinfo->x_pending_autoraise_frame);
+      dpyinfo->x_pending_autoraise_frame = NULL;
     }
 
   unblock_input ();
@@ -10651,8 +10644,6 @@
 #endif
 #endif
 
-  pending_autoraise_frame = 0;
-
   /* Note that there is no real way portable across R3/R4 to get the
      original error handler.  */
   XSetErrorHandler (x_error_handler);

=== modified file 'src/xterm.h'
--- a/src/xterm.h       2013-09-17 07:06:42 +0000
+++ b/src/xterm.h       2013-09-17 08:24:20 +0000
@@ -302,6 +302,9 @@
      minibuffer.  */
   struct frame *x_highlight_frame;
 
+  /* The frame waiting to be auto-raised in XTread_socket.  */
+  struct frame *x_pending_autoraise_frame;
+
   /* Time of last user interaction as returned in X events on this display.  */
   Time last_user_time;
 


reply via email to

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