diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2018-07-26 15:05:46 +0300 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2021-08-15 21:21:07 +0100 |
commit | df425f75741ad18d996d3fec4f1feb120c26784d (patch) | |
tree | f84a6eb0ea7559c78ae8b5c09ff70e30bfe901bf | |
parent | f80769efcd35bc26ba7b15fb9d6d83b4bf69b8e3 (diff) | |
download | nautilus-df425f75741ad18d996d3fec4f1feb120c26784d.tar.gz |
pathbar: Remove event GdkWindow
This usage of GdkWindow is a X11'ism that's gone in GTK4.
Removing this doesn't seem to cause any visual or behavorial change at
the moment.
Rebased and ammended by António Fernandes <antoniof@gnome.org>
-rw-r--r-- | src/nautilus-pathbar.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c index d3c1f89c7..4741e0ac1 100644 --- a/src/nautilus-pathbar.c +++ b/src/nautilus-pathbar.c @@ -87,8 +87,6 @@ struct _NautilusPathBar { GtkContainer parent_instance; - GdkWindow *event_window; - GFile *current_path; gpointer current_button_data; @@ -434,30 +432,6 @@ nautilus_path_bar_get_preferred_height (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 */ @@ -626,57 +600,6 @@ nautilus_path_bar_screen_changed (GtkWidget *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) { @@ -854,10 +777,6 @@ nautilus_path_bar_class_init (NautilusPathBarClass *path_bar_class) widget_class->get_preferred_height = nautilus_path_bar_get_preferred_height; widget_class->get_preferred_width = nautilus_path_bar_get_preferred_width; - 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->screen_changed = nautilus_path_bar_screen_changed; |