[nautilus/wip/ernestask/gtk4-continued: 10/50] pathbar: Remove event GdkWindow



commit 9c074fd56172cd49956bae38a987ea12948c1680
Author: Ernestas Kulik <ernestask gnome org>
Date:   Thu Jul 26 15:05:46 2018 +0300

    pathbar: Remove event GdkWindow

 src/nautilus-pathbar.c | 81 --------------------------------------------------
 1 file changed, 81 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index ebbb64f58..e26ccd0f4 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -85,8 +85,6 @@ struct _NautilusPathBar
 {
     GtkContainer parent_instance;
 
-    GdkWindow *event_window;
-
     GFile *current_path;
     gpointer current_button_data;
 
@@ -410,30 +408,6 @@ nautilus_path_bar_measure (GtkWidget      *widget,
     }
 }
 
-static void
-nautilus_path_bar_unmap (GtkWidget *widget)
-{
-    NautilusPathBar *self;
-
-    self = NAUTILUS_PATH_BAR (widget);
-
-    gdk_window_hide (self->event_window);
-
-    GTK_WIDGET_CLASS (nautilus_path_bar_parent_class)->unmap (widget);
-}
-
-static void
-nautilus_path_bar_map (GtkWidget *widget)
-{
-    NautilusPathBar *self;
-
-    self = NAUTILUS_PATH_BAR (widget);
-
-    gdk_window_show (self->event_window);
-
-    GTK_WIDGET_CLASS (nautilus_path_bar_parent_class)->map (widget);
-}
-
 #define BUTTON_BOTTOM_SHADOW 1
 
 /* This is a tad complicated */
@@ -601,57 +575,6 @@ nautilus_path_bar_display_changed (GtkWidget  *widget,
     nautilus_path_bar_check_icon_theme (NAUTILUS_PATH_BAR (widget));
 }
 
-static void
-nautilus_path_bar_realize (GtkWidget *widget)
-{
-    NautilusPathBar *self;
-    GtkAllocation allocation;
-    GdkWindow *window;
-    GdkWindowAttr attributes;
-    gint attributes_mask;
-
-    gtk_widget_set_realized (widget, TRUE);
-
-    self = NAUTILUS_PATH_BAR (widget);
-
-    window = gtk_widget_get_parent_window (widget);
-    gtk_widget_set_window (widget, window);
-    g_object_ref (window);
-
-    gtk_widget_get_allocation (widget, &allocation);
-
-    attributes.window_type = GDK_WINDOW_CHILD;
-    attributes.x = allocation.x;
-    attributes.y = allocation.y;
-    attributes.width = allocation.width;
-    attributes.height = allocation.height;
-    attributes.wclass = GDK_INPUT_ONLY;
-    attributes.event_mask = gtk_widget_get_events (widget);
-    attributes.event_mask |=
-        GDK_BUTTON_PRESS_MASK |
-        GDK_BUTTON_RELEASE_MASK |
-        GDK_POINTER_MOTION_MASK;
-    attributes_mask = GDK_WA_X | GDK_WA_Y;
-
-    self->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
-                                         &attributes, attributes_mask);
-    gdk_window_set_user_data (self->event_window, widget);
-}
-
-static void
-nautilus_path_bar_unrealize (GtkWidget *widget)
-{
-    NautilusPathBar *self;
-
-    self = NAUTILUS_PATH_BAR (widget);
-
-    gdk_window_set_user_data (self->event_window, NULL);
-    gdk_window_destroy (self->event_window);
-    self->event_window = NULL;
-
-    GTK_WIDGET_CLASS (nautilus_path_bar_parent_class)->unrealize (widget);
-}
-
 static void
 nautilus_path_bar_add (GtkContainer *container,
                        GtkWidget    *widget)
@@ -826,10 +749,6 @@ nautilus_path_bar_class_init (NautilusPathBarClass *path_bar_class)
     gobject_class->dispose = nautilus_path_bar_dispose;
 
     widget_class->measure = nautilus_path_bar_measure;
-    widget_class->realize = nautilus_path_bar_realize;
-    widget_class->unrealize = nautilus_path_bar_unrealize;
-    widget_class->unmap = nautilus_path_bar_unmap;
-    widget_class->map = nautilus_path_bar_map;
     widget_class->size_allocate = nautilus_path_bar_size_allocate;
     widget_class->style_updated = nautilus_path_bar_style_updated;
     widget_class->display_changed = nautilus_path_bar_display_changed;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]