diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 5978e3dac6..5deaed6099 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -2949,6 +2949,32 @@ gtk_notebook_button_press (GtkWidget *widget, priv->drag_offset_y = priv->drag_begin_y - page->allocation.y; } } + else + { + GtkWidget *window; + window = gtk_widget_get_toplevel (widget); + + if (window) + { + gboolean window_drag = FALSE; + gtk_widget_style_get (widget, + "window-dragging", &window_drag, + NULL); + + if (window_drag) + { + priv->during_detach = FALSE; + priv->during_reorder = FALSE; + priv->pressed_button = event->button; + + gtk_window_begin_move_drag (GTK_WINDOW (window), + event->button, + event->x_root, + event->y_root, + event->time); + } + } + } return TRUE; } diff --git a/tests/testgtk.css b/tests/testgtk.css index f5e8694f12..5a6c6c1699 100644 --- a/tests/testgtk.css +++ b/tests/testgtk.css @@ -24,6 +24,10 @@ -Gtest-bar: 47; } +GtkNotebook { + -GtkWidget-window-dragging: true; +} + GtkLabel:selected { background-color: gray; }