aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
171extern Atom Xatom_wm_delete_window; 171extern Atom Xatom_wm_delete_window;
172 172
173/* Other WM communication */ 173/* Other WM communication */
174Atom Xatom_wm_configure_denied; /* When our config request is denied */ 174extern Atom Xatom_wm_configure_denied; /* When our config request is denied */
175Atom Xatom_wm_window_moved; /* When the WM moves us. */ 175extern Atom Xatom_wm_window_moved; /* When the WM moves us. */
176 176
177#else /* X10 */ 177#else /* X10 */
178 178
@@ -3922,7 +3922,8 @@ also be depressed for NEWSTRING to appear.")
3922 register Lisp_Object newstring; 3922 register Lisp_Object newstring;
3923{ 3923{
3924 char *rawstring; 3924 char *rawstring;
3925 register KeySym keysym, modifier_list[16]; 3925 register KeySym keysym;
3926 KeySym modifier_list[16];
3926 3927
3927 CHECK_STRING (x_keysym, 1); 3928 CHECK_STRING (x_keysym, 1);
3928 CHECK_STRING (newstring, 3); 3929 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[] =
1691 sometimes don't work. */ 1691 sometimes don't work. */
1692static Time enter_timestamp; 1692static Time enter_timestamp;
1693 1693
1694/* Communication with window managers. */
1695Atom Xatom_wm_protocols;
1696
1697/* Kinds of protocol things we may receive. */
1698Atom Xatom_wm_take_focus;
1699Atom Xatom_wm_save_yourself;
1700Atom Xatom_wm_delete_window;
1701
1702/* Other WM communication */
1703Atom Xatom_wm_configure_denied; /* When our config request is denied */
1704Atom Xatom_wm_window_moved; /* When the WM moves us. */
1705
1694/* Read events coming from the X server. 1706/* Read events coming from the X server.
1695 This routine is called by the SIGIO handler. 1707 This routine is called by the SIGIO handler.
1696 We return as soon as there are no more events to be read. 1708 We return as soon as there are no more events to be read.
@@ -1761,6 +1773,51 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
1761 switch (event.type) 1773 switch (event.type)
1762 { 1774 {
1763#ifdef HAVE_X11 1775#ifdef HAVE_X11
1776 case ClientMessage:
1777 {
1778 if (event.xclient.message_type == Xatom_wm_protocols
1779 && event.xclient.format == 32)
1780 {
1781 if (event.xclient.data.l[0] == Xatom_wm_take_focus)
1782 {
1783 s = x_window_to_screen (event.xclient.window);
1784 if (s)
1785 x_focus_on_screen (s);
1786 /* Not certain about handling scrollbars here */
1787 }
1788 else if (event.xclient.data.l[0] == Xatom_wm_save_yourself)
1789 {
1790 /* Save state modify the WM_COMMAND property to
1791 something which can reinstate us. This notifies
1792 the session manager, who's looking for such a
1793 PropertyNotify. Can restart processing when
1794 a keyboard or mouse event arrives. */
1795 if (numchars > 0)
1796 {
1797 }
1798 }
1799 else if (event.xclient.data.l[0] == Xatom_wm_delete_window)
1800 {
1801 struct screen *s = x_window_to_screen (event.xclient.window);
1802
1803 if (s)
1804 if (numchars > 0)
1805 {
1806 }
1807 }
1808 }
1809 else if (event.xclient.message_type == Xatom_wm_configure_denied)
1810 {
1811 }
1812 else if (event.xclient.message_type == Xatom_wm_window_moved)
1813 {
1814 int new_x, new_y;
1815
1816 new_x = event.xclient.data.s[0];
1817 new_y = event.xclient.data.s[1];
1818 }
1819 }
1820 break;
1764 1821
1765 case SelectionClear: /* Someone has grabbed ownership. */ 1822 case SelectionClear: /* Someone has grabbed ownership. */
1766 x_disown_selection (event.xselectionclear.window, 1823 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. */
33 33
34#define EVENT_BUFFER_SIZE 64 34#define EVENT_BUFFER_SIZE 64
35 35
36#define RES_CLASS "emacs"
37
38/* Max and Min sizes in character columns. */ 36/* Max and Min sizes in character columns. */
39#define MINWIDTH 10 37#define MINWIDTH 10
40#define MINHEIGHT 10 38#define MINHEIGHT 10