[gtk+] API: gtk: Remove client_event vfunc from GtkWidget
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] API: gtk: Remove client_event vfunc from GtkWidget
- Date: Tue, 1 Feb 2011 05:33:15 +0000 (UTC)
commit fac914d70cba9745379bfafd3b0298ed5aafb138
Author: Benjamin Otte <otte redhat com>
Date: Mon Jan 31 23:18:47 2011 +0100
API: gtk: Remove client_event vfunc from GtkWidget
Also remove the (de-facto unused) implementation from GtkWindow that was
only used for sockets/plugs.
gtk/gtkicontheme.c | 17 -------
gtk/gtksocket.c | 13 ------
gtk/gtkwidget.c | 27 ------------
gtk/gtkwidget.h | 2 -
gtk/gtkwindow.c | 109 ------------------------------------------------
gtk/gtkwindowprivate.h | 9 ----
6 files changed, 0 insertions(+), 177 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 720b3ab..1cd27cd 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -1209,23 +1209,6 @@ ensure_valid_themes (GtkIconTheme *icon_theme)
if (was_valid)
{
g_signal_emit (icon_theme, signal_changed, 0);
-
- if (!priv->check_reload && priv->screen)
- {
- static GdkAtom atom_iconthemes = GDK_NONE;
- GdkEvent *event = gdk_event_new (GDK_CLIENT_EVENT);
- int i;
-
- if (!atom_iconthemes)
- atom_iconthemes = gdk_atom_intern_static_string ("_GTK_LOAD_ICONTHEMES");
-
- for (i = 0; i < 5; i++)
- event->client.data.l[i] = 0;
- event->client.data_format = 32;
- event->client.message_type = atom_iconthemes;
-
- gdk_screen_broadcast_client_message (priv->screen, event);
- }
}
}
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index 68b1042..174ea93 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -34,7 +34,6 @@
#include "gtkmainprivate.h"
#include "gtkmarshalers.h"
#include "gtksizerequest.h"
-#include "gtkwindowprivate.h"
#include "gtkplug.h"
#include "gtkprivate.h"
#include "gtkdnd.h"
@@ -450,11 +449,6 @@ static void
gtk_socket_end_embedding (GtkSocket *socket)
{
GtkSocketPrivate *private = socket->priv;
- GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (socket));
-
- if (GTK_IS_WINDOW (toplevel))
- _gtk_window_remove_embedded_xid (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (socket))),
- GDK_WINDOW_XID (socket->priv->plug_window));
g_object_unref (private->plug_window);
private->plug_window = NULL;
@@ -1064,7 +1058,6 @@ gtk_socket_add_window (GtkSocket *socket,
}
else /* A foreign window */
{
- GtkWidget *toplevel;
GdkDragProtocol protocol;
gdk_error_trap_push ();
@@ -1129,12 +1122,6 @@ gtk_socket_add_window (GtkSocket *socket,
gtk_socket_filter_func,
socket);
- /* Add a pointer to the socket on our toplevel window */
-
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (socket));
- if (GTK_IS_WINDOW (toplevel))
- _gtk_window_add_embedded_xid (GTK_WINDOW (toplevel), xid);
-
#ifdef HAVE_XFIXES
gdk_error_trap_push ();
XFixesChangeSaveSet (GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (socket))),
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index faa1fc4..74d83f2 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -429,7 +429,6 @@ enum {
SELECTION_RECEIVED,
PROXIMITY_IN_EVENT,
PROXIMITY_OUT_EVENT,
- CLIENT_EVENT,
VISIBILITY_NOTIFY_EVENT,
WINDOW_STATE_EVENT,
DAMAGE_EVENT,
@@ -2746,29 +2745,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
/**
- * GtkWidget::client-event:
- * @widget: the object which received the signal
- * @event: (type Gdk.EventClient): the #GdkEventClient which triggered
- * this signal.
- *
- * The ::client-event will be emitted when the @widget's window
- * receives a message (via a ClientMessage event) from another
- * application.
- *
- * Returns: %TRUE to stop other handlers from being invoked for
- * the event. %FALSE to propagate the event further.
- */
- widget_signals[CLIENT_EVENT] =
- g_signal_new (I_("client-event"),
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GtkWidgetClass, client_event),
- _gtk_boolean_handled_accumulator, NULL,
- _gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- /**
* GtkWidget::window-state-event:
* @widget: the object which received the signal
* @event: (type Gdk.EventWindowState): the #GdkEventWindowState which
@@ -6060,9 +6036,6 @@ gtk_widget_event_internal (GtkWidget *widget,
case GDK_PROXIMITY_OUT:
signal_num = PROXIMITY_OUT_EVENT;
break;
- case GDK_CLIENT_EVENT:
- signal_num = CLIENT_EVENT;
- break;
case GDK_EXPOSE:
signal_num = EXPOSE_EVENT;
break;
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 17ff1f5..c391b22 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -323,8 +323,6 @@ struct _GtkWidgetClass
GdkEventProximity *event);
gboolean (* visibility_notify_event) (GtkWidget *widget,
GdkEventVisibility *event);
- gboolean (* client_event) (GtkWidget *widget,
- GdkEventClient *event);
gboolean (* window_state_event) (GtkWidget *widget,
GdkEventWindowState *event);
gboolean (* damage_event) (GtkWidget *widget,
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 2c4af39..5696c19 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -336,8 +336,6 @@ static gint gtk_window_focus_in_event (GtkWidget *widget,
static gint gtk_window_focus_out_event (GtkWidget *widget,
GdkEventFocus *event);
static void gtk_window_style_updated (GtkWidget *widget);
-static gint gtk_window_client_event (GtkWidget *widget,
- GdkEventClient *event);
static gboolean gtk_window_state_event (GtkWidget *widget,
GdkEventWindowState *event);
static void gtk_window_check_resize (GtkContainer *container);
@@ -575,7 +573,6 @@ gtk_window_class_init (GtkWindowClass *klass)
widget_class->focus_in_event = gtk_window_focus_in_event;
widget_class->button_press_event = gtk_window_button_press_event;
widget_class->focus_out_event = gtk_window_focus_out_event;
- widget_class->client_event = gtk_window_client_event;
widget_class->focus = gtk_window_focus;
widget_class->move_focus = gtk_window_move_focus;
widget_class->draw = gtk_window_draw;
@@ -2294,52 +2291,6 @@ gtk_window_list_toplevels (void)
return list;
}
-#ifdef GDK_WINDOWING_X11
-void
-_gtk_window_add_embedded_xid (GtkWindow *window, Window xid)
-{
- GList *embedded_windows;
-
- g_return_if_fail (GTK_IS_WINDOW (window));
-
- embedded_windows = g_object_get_qdata (G_OBJECT (window), quark_gtk_embedded);
- if (embedded_windows)
- g_object_steal_qdata (G_OBJECT (window), quark_gtk_embedded);
- embedded_windows = g_list_prepend (embedded_windows,
- GDK_XID_TO_POINTER (xid));
-
- g_object_set_qdata_full (G_OBJECT (window), quark_gtk_embedded,
- embedded_windows,
- embedded_windows ?
- (GDestroyNotify) g_list_free : NULL);
-}
-
-void
-_gtk_window_remove_embedded_xid (GtkWindow *window, Window xid)
-{
- GList *embedded_windows;
- GList *node;
-
- g_return_if_fail (GTK_IS_WINDOW (window));
-
- embedded_windows = g_object_get_qdata (G_OBJECT (window), quark_gtk_embedded);
- if (embedded_windows)
- g_object_steal_qdata (G_OBJECT (window), quark_gtk_embedded);
-
- node = g_list_find (embedded_windows, GDK_XID_TO_POINTER (xid));
- if (node)
- {
- embedded_windows = g_list_remove_link (embedded_windows, node);
- g_list_free_1 (node);
- }
-
- g_object_set_qdata_full (G_OBJECT (window), quark_gtk_embedded,
- embedded_windows,
- embedded_windows ?
- (GDestroyNotify) g_list_free : NULL);
-}
-#endif
-
static void
gtk_window_dispose (GObject *object)
{
@@ -5914,66 +5865,6 @@ gtk_window_focus_out_event (GtkWidget *widget,
return FALSE;
}
-#ifdef GDK_WINDOWING_X11
-static GdkAtom atom_rcfiles = GDK_NONE;
-static GdkAtom atom_iconthemes = GDK_NONE;
-
-static void
-send_client_message_to_embedded_windows (GtkWidget *widget,
- GdkAtom message_type)
-{
- GList *embedded_windows;
-
- embedded_windows = g_object_get_qdata (G_OBJECT (widget), quark_gtk_embedded);
- if (embedded_windows)
- {
- GdkEvent *send_event = gdk_event_new (GDK_CLIENT_EVENT);
- int i;
-
- for (i = 0; i < 5; i++)
- send_event->client.data.l[i] = 0;
- send_event->client.data_format = 32;
- send_event->client.message_type = message_type;
-
- while (embedded_windows)
- {
- Window xid = GDK_POINTER_TO_XID (embedded_windows->data);
- gdk_event_send_client_message_for_display (gtk_widget_get_display (widget), send_event, xid);
- embedded_windows = embedded_windows->next;
- }
-
- gdk_event_free (send_event);
- }
-}
-#endif
-
-static gint
-gtk_window_client_event (GtkWidget *widget,
- GdkEventClient *event)
-{
-#ifdef GDK_WINDOWING_X11
- if (!atom_rcfiles)
- {
- atom_rcfiles = gdk_atom_intern_static_string ("_GTK_READ_RCFILES");
- atom_iconthemes = gdk_atom_intern_static_string ("_GTK_LOAD_ICONTHEMES");
- }
-
- if (event->message_type == atom_rcfiles)
- {
- send_client_message_to_embedded_windows (widget, atom_rcfiles);
- gtk_style_context_reset_widgets (gtk_widget_get_screen (widget));
- }
-
- if (event->message_type == atom_iconthemes)
- {
- send_client_message_to_embedded_windows (widget, atom_iconthemes);
- _gtk_icon_theme_check_reload (gtk_widget_get_display (widget));
- }
-#endif
-
- return FALSE;
-}
-
static void
gtk_window_check_resize (GtkContainer *container)
{
diff --git a/gtk/gtkwindowprivate.h b/gtk/gtkwindowprivate.h
index 46ab473..4c95531 100644
--- a/gtk/gtkwindowprivate.h
+++ b/gtk/gtkwindowprivate.h
@@ -22,9 +22,6 @@
#define __GTK_WINDOW_PRIVATE_H__
#include <gdk/gdk.h>
-#ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
-#endif
#include "gtkwindow.h"
@@ -32,12 +29,6 @@ G_BEGIN_DECLS
void _gtk_window_internal_set_focus (GtkWindow *window,
GtkWidget *focus);
-#ifdef GDK_WINDOWING_X11
-void _gtk_window_remove_embedded_xid(GtkWindow *window,
- Window xid);
-void _gtk_window_add_embedded_xid (GtkWindow *window,
- Window xid);
-#endif
void _gtk_window_reposition (GtkWindow *window,
gint x,
gint y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]