diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2018-07-26 15:05:46 +0300 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2021-11-22 15:16:18 +0000 |
commit | 09628b74848b345aebfcd99525cbd34a48d80a7b (patch) | |
tree | 8d3a75db8890a42fcf17527ed058f280e439290b | |
parent | 2cf73a92a1802b25272623a760f2d00a29584e4e (diff) | |
download | nautilus-09628b74848b345aebfcd99525cbd34a48d80a7b.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 b4b51f2fd..f274296d0 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; @@ -433,30 +431,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); -} - /* This is a tad complicated */ static void nautilus_path_bar_size_allocate (GtkWidget *widget, @@ -623,57 +597,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) { @@ -851,10 +774,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; |