[mutter/wayland] Move send_icccm_message to window-x11
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] Move send_icccm_message to window-x11
- Date: Thu, 20 Mar 2014 20:25:24 +0000 (UTC)
commit 852589897e45c2b42f1e12438bd750b414567e30
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Mar 20 16:07:23 2014 -0400
Move send_icccm_message to window-x11
src/core/window-private.h | 6 -----
src/core/window.c | 36 -----------------------------------
src/x11/window-x11.c | 46 ++++++++++++++++++++++++++++++++++++++------
3 files changed, 39 insertions(+), 49 deletions(-)
---
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 56d902d..97b052c 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -612,12 +612,6 @@ void meta_window_get_geometry (MetaWindow *window,
void meta_window_update_unfocused_button_grabs (MetaWindow *window);
-/* Sends a client message */
-void meta_window_send_icccm_message (MetaWindow *window,
- Atom atom,
- guint32 timestamp);
-
-
void meta_window_move_resize_request(MetaWindow *window,
guint value_mask,
int gravity,
diff --git a/src/core/window.c b/src/core/window.c
index 12a3f2a..5d831ca 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -5363,42 +5363,6 @@ meta_window_lower (MetaWindow *window)
}
void
-meta_window_send_icccm_message (MetaWindow *window,
- Atom atom,
- guint32 timestamp)
-{
- /* This comment and code are from twm, copyright
- * Open Group, Evans & Sutherland, etc.
- */
-
- /*
- * ICCCM Client Messages - Section 4.2.8 of the ICCCM dictates that all
- * client messages will have the following form:
- *
- * event type ClientMessage
- * message type _XA_WM_PROTOCOLS
- * window tmp->w
- * format 32
- * data[0] message atom
- * data[1] time stamp
- */
-
- XClientMessageEvent ev;
-
- ev.type = ClientMessage;
- ev.window = window->xwindow;
- ev.message_type = window->display->atom_WM_PROTOCOLS;
- ev.format = 32;
- ev.data.l[0] = atom;
- ev.data.l[1] = timestamp;
-
- meta_error_trap_push (window->display);
- XSendEvent (window->display->xdisplay,
- window->xwindow, False, 0, (XEvent*) &ev);
- meta_error_trap_pop (window->display);
-}
-
-void
meta_window_move_resize_request (MetaWindow *window,
guint value_mask,
int gravity,
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 58c3d19..54b25fc 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -59,6 +59,42 @@ meta_window_x11_init (MetaWindowX11 *window_x11)
window_x11->priv = meta_window_x11_get_instance_private (window_x11);
}
+static void
+send_icccm_message (MetaWindow *window,
+ Atom atom,
+ guint32 timestamp)
+{
+ /* This comment and code are from twm, copyright
+ * Open Group, Evans & Sutherland, etc.
+ */
+
+ /*
+ * ICCCM Client Messages - Section 4.2.8 of the ICCCM dictates that all
+ * client messages will have the following form:
+ *
+ * event type ClientMessage
+ * message type _XA_WM_PROTOCOLS
+ * window tmp->w
+ * format 32
+ * data[0] message atom
+ * data[1] time stamp
+ */
+
+ XClientMessageEvent ev;
+
+ ev.type = ClientMessage;
+ ev.window = window->xwindow;
+ ev.message_type = window->display->atom_WM_PROTOCOLS;
+ ev.format = 32;
+ ev.data.l[0] = atom;
+ ev.data.l[1] = timestamp;
+
+ meta_error_trap_push (window->display);
+ XSendEvent (window->display->xdisplay,
+ window->xwindow, False, 0, (XEvent*) &ev);
+ meta_error_trap_pop (window->display);
+}
+
static Window
read_client_leader (MetaDisplay *display,
Window xwindow)
@@ -328,9 +364,7 @@ meta_window_x11_ping (MetaWindow *window,
{
MetaDisplay *display = window->display;
- meta_window_send_icccm_message (window,
- display->atom__NET_WM_PING,
- serial);
+ send_icccm_message (window, display->atom__NET_WM_PING, serial);
}
static void
@@ -343,9 +377,7 @@ meta_window_x11_delete (MetaWindow *window,
meta_topic (META_DEBUG_WINDOW_OPS,
"Deleting %s with delete_window request\n",
window->desc);
- meta_window_send_icccm_message (window,
- window->display->atom_WM_DELETE_WINDOW,
- timestamp);
+ send_icccm_message (window, window->display->atom_WM_DELETE_WINDOW, timestamp);
}
else
{
@@ -395,7 +427,7 @@ request_take_focus (MetaWindow *window,
meta_topic (META_DEBUG_FOCUS, "WM_TAKE_FOCUS(%s, %u)\n",
window->desc, timestamp);
- meta_window_send_icccm_message (window, display->atom_WM_TAKE_FOCUS, timestamp);
+ send_icccm_message (window, display->atom_WM_TAKE_FOCUS, timestamp);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]