aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorJoseph Arceneaux1992-05-12 03:44:17 +0000
committerJoseph Arceneaux1992-05-12 03:44:17 +0000
commitc047688cf20e884f3db98b58f74bc9655fbcca15 (patch)
tree75f50b1397606b3dd4c8009d10df21a82eb6bf0a /src/xterm.c
parent3c25457042415d8ad853a8506f24a51561996553 (diff)
downloademacs-c047688cf20e884f3db98b58f74bc9655fbcca15.tar.gz
emacs-c047688cf20e884f3db98b58f74bc9655fbcca15.zip
*** empty log message ***
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c57
1 files changed, 57 insertions, 0 deletions
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,