changeset 642:b0ddc138b0b5

*** empty log message ***
author Joseph Arceneaux <jla@gnu.org>
date Tue, 12 May 1992 03:44:17 +0000
parents 78a0b78aa6de
children 9759addc5671
files src/xfns.c src/xterm.c src/xterm.h
diffstat 3 files changed, 61 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Tue May 12 02:31:53 1992 +0000
+++ b/src/xfns.c	Tue May 12 03:44:17 1992 +0000
@@ -171,8 +171,8 @@
 extern Atom Xatom_wm_delete_window;
 
 /* Other WM communication */
-Atom Xatom_wm_configure_denied;	  /* When our config request is denied */
-Atom Xatom_wm_window_moved;	  /* When the WM moves us. */
+extern Atom Xatom_wm_configure_denied; /* When our config request is denied */
+extern Atom Xatom_wm_window_moved;     /* When the WM moves us. */
 
 #else	/* X10 */
 
@@ -3922,7 +3922,8 @@
      register Lisp_Object newstring;
 {
   char *rawstring;
-  register KeySym keysym, modifier_list[16];
+  register KeySym keysym;
+  KeySym modifier_list[16];
 
   CHECK_STRING (x_keysym, 1);
   CHECK_STRING (newstring, 3);
--- a/src/xterm.c	Tue May 12 02:31:53 1992 +0000
+++ b/src/xterm.c	Tue May 12 03:44:17 1992 +0000
@@ -1691,6 +1691,18 @@
    sometimes don't work.  */
 static Time enter_timestamp;
 
+/* Communication with window managers. */
+Atom Xatom_wm_protocols;
+
+/* Kinds of protocol things we may receive. */
+Atom Xatom_wm_take_focus;
+Atom Xatom_wm_save_yourself;
+Atom Xatom_wm_delete_window;
+
+/* Other WM communication */
+Atom Xatom_wm_configure_denied;	  /* When our config request is denied */
+Atom Xatom_wm_window_moved;	  /* When the WM moves us. */
+
 /* Read events coming from the X server.
    This routine is called by the SIGIO handler.
    We return as soon as there are no more events to be read.
@@ -1761,6 +1773,51 @@
       switch (event.type)
 	{
 #ifdef HAVE_X11
+	case ClientMessage:
+	  {
+	    if (event.xclient.message_type == Xatom_wm_protocols
+		&& event.xclient.format == 32)
+	      {
+		if (event.xclient.data.l[0] == Xatom_wm_take_focus)
+		  {
+		    s = x_window_to_screen (event.xclient.window);
+		    if (s)
+		      x_focus_on_screen (s);
+		    /* Not certain about handling scrollbars here */
+		  }
+		else if (event.xclient.data.l[0] == Xatom_wm_save_yourself)
+		  {
+		    /* Save state modify the WM_COMMAND property to
+		       something which can reinstate us. This notifies
+		       the session manager, who's looking for such a
+		       PropertyNotify.  Can restart processing when
+		       a keyboard or mouse event arrives. */
+		    if (numchars > 0)
+		      {
+		      }
+		  }
+		else if (event.xclient.data.l[0] == Xatom_wm_delete_window)
+		  {
+		    struct screen *s = x_window_to_screen (event.xclient.window);
+
+		    if (s)
+		      if (numchars > 0)
+			{
+			}
+		  }
+	      }
+	    else if (event.xclient.message_type == Xatom_wm_configure_denied)
+	      {
+	      }
+	    else if (event.xclient.message_type == Xatom_wm_window_moved)
+	      {
+		int new_x, new_y;
+
+		new_x = event.xclient.data.s[0];
+		new_y = event.xclient.data.s[1];
+	      }
+	  }
+	  break;
 
 	case SelectionClear:	/* Someone has grabbed ownership. */
 	  x_disown_selection (event.xselectionclear.window,
--- a/src/xterm.h	Tue May 12 02:31:53 1992 +0000
+++ b/src/xterm.h	Tue May 12 03:44:17 1992 +0000
@@ -33,8 +33,6 @@
 
 #define EVENT_BUFFER_SIZE 64
 
-#define RES_CLASS "emacs"
-
 /* Max and Min sizes in character columns. */
 #define MINWIDTH 10
 #define MINHEIGHT 10