summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Arceneaux <jla@gnu.org>1992-05-12 03:44:17 +0000
committerJoseph Arceneaux <jla@gnu.org>1992-05-12 03:44:17 +0000
commitc047688cf20e884f3db98b58f74bc9655fbcca15 (patch)
tree75f50b1397606b3dd4c8009d10df21a82eb6bf0a
parent3c25457042415d8ad853a8506f24a51561996553 (diff)
downloademacs-c047688cf20e884f3db98b58f74bc9655fbcca15.tar.gz
*** empty log message ***
-rw-r--r--src/xfns.c7
-rw-r--r--src/xterm.c57
-rw-r--r--src/xterm.h2
3 files changed, 61 insertions, 5 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 760c09b883c..6673ec1716f 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -171,8 +171,8 @@ extern Atom Xatom_wm_save_yourself;
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 @@ also be depressed for NEWSTRING to appear.")
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);
diff --git a/src/xterm.c b/src/xterm.c
index 1df1c7d36ba..69c16d843b3 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1691,6 +1691,18 @@ static char *events[] =
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 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
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,
diff --git a/src/xterm.h b/src/xterm.h
index 934a2917f34..9186ef8eacb 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -33,8 +33,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define EVENT_BUFFER_SIZE 64
-#define RES_CLASS "emacs"
-
/* Max and Min sizes in character columns. */
#define MINWIDTH 10
#define MINHEIGHT 10