[gtk+/wip/carlosg/event-delivery: 57/105] gtkseparatortoolitem: Remove event window
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/event-delivery: 57/105] gtkseparatortoolitem: Remove event window
- Date: Sun, 14 May 2017 23:42:14 +0000 (UTC)
commit dd6081fbd0928674dbc71ced71715d5cfc8382fc
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Apr 2 16:24:31 2017 +0200
gtkseparatortoolitem: Remove event window
It's not necessary. It wasn't either before, as this widget handles no
events.
gtk/gtkseparatortoolitem.c | 78 --------------------------------------------
1 files changed, 0 insertions(+), 78 deletions(-)
---
diff --git a/gtk/gtkseparatortoolitem.c b/gtk/gtkseparatortoolitem.c
index 9d11cf5..be16d47 100644
--- a/gtk/gtkseparatortoolitem.c
+++ b/gtk/gtkseparatortoolitem.c
@@ -53,7 +53,6 @@
struct _GtkSeparatorToolItemPrivate
{
GtkCssGadget *gadget;
- GdkWindow *event_window;
guint draw : 1;
};
@@ -84,10 +83,6 @@ static void gtk_separator_tool_item_snapshot (GtkWidget
GtkSnapshot *snapshot);
static void gtk_separator_tool_item_add (GtkContainer *container,
GtkWidget *child);
-static void gtk_separator_tool_item_realize (GtkWidget *widget);
-static void gtk_separator_tool_item_unrealize (GtkWidget *widget);
-static void gtk_separator_tool_item_map (GtkWidget *widget);
-static void gtk_separator_tool_item_unmap (GtkWidget *widget);
G_DEFINE_TYPE_WITH_PRIVATE (GtkSeparatorToolItem, gtk_separator_tool_item, GTK_TYPE_TOOL_ITEM)
@@ -121,10 +116,6 @@ gtk_separator_tool_item_class_init (GtkSeparatorToolItemClass *class)
widget_class->measure = gtk_separator_tool_item_measure;
widget_class->size_allocate = gtk_separator_tool_item_size_allocate;
widget_class->snapshot = gtk_separator_tool_item_snapshot;
- widget_class->realize = gtk_separator_tool_item_realize;
- widget_class->unrealize = gtk_separator_tool_item_unrealize;
- widget_class->map = gtk_separator_tool_item_map;
- widget_class->unmap = gtk_separator_tool_item_unmap;
toolitem_class->create_menu_proxy = gtk_separator_tool_item_create_menu_proxy;
@@ -244,13 +235,6 @@ gtk_separator_tool_item_size_allocate (GtkWidget *widget,
gtk_widget_set_allocation (widget, allocation);
- if (gtk_widget_get_realized (widget))
- gdk_window_move_resize (priv->event_window,
- allocation->x,
- allocation->y,
- allocation->width,
- allocation->height);
-
gtk_css_gadget_allocate (priv->gadget,
allocation,
gtk_widget_get_allocated_baseline (widget),
@@ -260,68 +244,6 @@ gtk_separator_tool_item_size_allocate (GtkWidget *widget,
}
static void
-gtk_separator_tool_item_realize (GtkWidget *widget)
-{
- GtkAllocation allocation;
- GtkSeparatorToolItem *separator = GTK_SEPARATOR_TOOL_ITEM (widget);
- GtkSeparatorToolItemPrivate *priv = separator->priv;
- GdkWindow *window;
-
- gtk_widget_set_realized (widget, TRUE);
-
- gtk_widget_get_allocation (widget, &allocation);
-
- window = gtk_widget_get_parent_window (widget);
- gtk_widget_set_window (widget, window);
- g_object_ref (window);
-
- priv->event_window = gdk_window_new_input (gtk_widget_get_parent_window (widget),
- GDK_ALL_EVENTS_MASK,
- &allocation);
- gtk_widget_register_window (widget, priv->event_window);
-}
-
-static void
-gtk_separator_tool_item_unrealize (GtkWidget *widget)
-{
- GtkSeparatorToolItem *separator = GTK_SEPARATOR_TOOL_ITEM (widget);
- GtkSeparatorToolItemPrivate *priv = separator->priv;
-
- if (priv->event_window)
- {
- gtk_widget_unregister_window (widget, priv->event_window);
- gdk_window_destroy (priv->event_window);
- priv->event_window = NULL;
- }
-
- GTK_WIDGET_CLASS (gtk_separator_tool_item_parent_class)->unrealize (widget);
-}
-
-static void
-gtk_separator_tool_item_map (GtkWidget *widget)
-{
- GtkSeparatorToolItem *separator = GTK_SEPARATOR_TOOL_ITEM (widget);
- GtkSeparatorToolItemPrivate *priv = separator->priv;
-
- GTK_WIDGET_CLASS (gtk_separator_tool_item_parent_class)->map (widget);
-
- if (priv->event_window)
- gdk_window_show (priv->event_window);
-}
-
-static void
-gtk_separator_tool_item_unmap (GtkWidget *widget)
-{
- GtkSeparatorToolItem *separator = GTK_SEPARATOR_TOOL_ITEM (widget);
- GtkSeparatorToolItemPrivate *priv = separator->priv;
-
- if (priv->event_window)
- gdk_window_hide (priv->event_window);
-
- GTK_WIDGET_CLASS (gtk_separator_tool_item_parent_class)->unmap (widget);
-}
-
-static void
gtk_separator_tool_item_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]