diff options
-rw-r--r-- | gdk/win32/gdkevents-win32.c | 6 | ||||
-rw-r--r-- | gdk/win32/gdkwindow-win32.c | 18 | ||||
-rw-r--r-- | gtk/gtkdnd.c | 54 | ||||
-rw-r--r-- | gtk/gtkdndprivate.h | 2 | ||||
-rw-r--r-- | gtk/gtkdragsource.c | 11 | ||||
-rw-r--r-- | gtk/gtkemojichooser.c | 4 | ||||
-rw-r--r-- | gtk/gtknotebook.c | 1 | ||||
-rw-r--r-- | gtk/theme/Adwaita/gtk-contained-dark.css | 4 | ||||
-rw-r--r-- | gtk/theme/Adwaita/gtk-contained.css | 4 |
9 files changed, 60 insertions, 44 deletions
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index 70f7c782d8..cfef93b44f 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -1930,7 +1930,7 @@ ensure_stacking_on_unminimize (MSG *msg) g_print (" restacking %p above %p", msg->hwnd, lowest_transient)); SetWindowPos (msg->hwnd, lowest_transient, 0, 0, 0, 0, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER); } } @@ -2011,7 +2011,7 @@ ensure_stacking_on_activate_app (MSG *msg, impl->transient_owner != NULL) { SetWindowPos (msg->hwnd, HWND_TOP, 0, 0, 0, 0, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER); return; } @@ -2053,7 +2053,7 @@ ensure_stacking_on_activate_app (MSG *msg, g_print (" restacking %p above %p", msg->hwnd, rover)); SetWindowPos (msg->hwnd, rover, 0, 0, 0, 0, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER); break; } } diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 2b6733fb8f..3951387e19 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -1474,7 +1474,7 @@ show_window_internal (GdkWindow *window, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), (window->state & GDK_WINDOW_STATE_ABOVE)?HWND_TOPMOST:HWND_NOTOPMOST, 0, 0, 0, 0, - SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE)); + SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER)); } } @@ -1824,7 +1824,7 @@ gdk_win32_window_raise (GdkWindow *window) if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP) API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOPMOST, 0, 0, 0, 0, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE)); + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER)); else if (window->accept_focus) /* Do not wrap this in an API_CALL macro as SetForegroundWindow might * fail when for example dragging a window belonging to a different @@ -1834,7 +1834,7 @@ gdk_win32_window_raise (GdkWindow *window) else API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP, 0, 0, 0, 0, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE)); + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER)); } } @@ -1851,7 +1851,7 @@ gdk_win32_window_lower (GdkWindow *window) API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_BOTTOM, 0, 0, 0, 0, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE)); + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER)); } } @@ -2910,7 +2910,7 @@ _gdk_win32_window_update_style_bits (GdkWindow *window) rect.right += after.right - before.right; rect.bottom += after.bottom - before.bottom; - flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION; + flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION | SWP_NOOWNERZORDER; if (will_be_topmost && !was_topmost) { @@ -5353,7 +5353,7 @@ gdk_win32_window_fullscreen (GdkWindow *window) API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP, x, y, width, height, - SWP_NOCOPYBITS | SWP_SHOWWINDOW)); + SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER)); } } @@ -5376,7 +5376,7 @@ gdk_win32_window_unfullscreen (GdkWindow *window) API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_NOTOPMOST, fi->r.left, fi->r.top, fi->r.right - fi->r.left, fi->r.bottom - fi->r.top, - SWP_NOCOPYBITS | SWP_SHOWWINDOW)); + SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER)); g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL); g_free (fi); @@ -5402,7 +5402,7 @@ gdk_win32_window_set_keep_above (GdkWindow *window, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), setting ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, - SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE)); + SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER)); } gdk_synthesize_window_state (window, @@ -5428,7 +5428,7 @@ gdk_win32_window_set_keep_below (GdkWindow *window, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), setting ? HWND_BOTTOM : HWND_NOTOPMOST, 0, 0, 0, 0, - SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE)); + SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER)); } gdk_synthesize_window_state (window, diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index fca79b5d90..96edea65f8 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -1699,18 +1699,20 @@ gtk_drag_is_managed (GtkWidget *source_widget) FALSE; } -/* Like gtk_drag_begin(), but also takes a GtkIconHelper - * so that we can set the icon from the source site information +/* Like gtk_drag_begin(), but also communicates the need to + * create an icon for the drag operation back to the caller. + * If the caller passes out_needs_icon == NULL, it means that + * the caller does not care. */ GdkDragContext * -gtk_drag_begin_internal (GtkWidget *widget, - GtkImageDefinition *icon, - GtkTargetList *target_list, - GdkDragAction actions, - gint button, - const GdkEvent *event, - int x, - int y) +gtk_drag_begin_internal (GtkWidget *widget, + gboolean *out_needs_icon, + GtkTargetList *target_list, + GdkDragAction actions, + gint button, + const GdkEvent *event, + int x, + int y) { GtkDragSourceInfo *info; GList *targets = NULL; @@ -1873,20 +1875,16 @@ gtk_drag_begin_internal (GtkWidget *widget, * application may have set one in ::drag_begin, or it may * not have set one. */ - if (!info->icon_widget) + if (!info->icon_widget && out_needs_icon == NULL) { - if (icon) - { - set_icon_helper (info->context, icon, 0, 0); - } - else - { - icon = gtk_image_definition_new_icon_name ("text-x-generic"); - set_icon_helper (info->context, icon, 0, 0); - gtk_image_definition_unref (icon); - } + GtkImageDefinition *icon = gtk_image_definition_new_icon_name ("text-x-generic"); + set_icon_helper (info->context, icon, 0, 0); + gtk_image_definition_unref (icon); } + if (out_needs_icon != NULL) + *out_needs_icon = (info->icon_widget == NULL); + if (managed) { g_signal_connect (context, "drop-performed", @@ -2768,6 +2766,9 @@ gtk_drag_source_info_free (GtkDragSourceInfo *info) static void gtk_drag_source_info_destroy (GtkDragSourceInfo *info) { + GdkDragContext *context; + GdkEvent *last_event; + g_signal_handlers_disconnect_by_func (info->context, gtk_drag_context_drop_performed_cb, info); @@ -2820,12 +2821,15 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info) /* keep the icon_window alive until the (possible) drag cancel animation is done */ g_object_set_data_full (G_OBJECT (info->context), "former-gtk-source-info", info, (GDestroyNotify)gtk_drag_source_info_free); + context = info->context; + last_event = info->last_event; - gtk_drag_clear_source_info (info->context); - g_object_unref (info->context); + gtk_drag_clear_source_info (context); - if (info->last_event) - gdk_event_free (info->last_event); + if (last_event) + gdk_event_free (last_event); + + g_object_unref (context); } static gboolean diff --git a/gtk/gtkdndprivate.h b/gtk/gtkdndprivate.h index f14a456ffb..89f1b0f4db 100644 --- a/gtk/gtkdndprivate.h +++ b/gtk/gtkdndprivate.h @@ -43,7 +43,7 @@ struct _GtkDragDestSite G_BEGIN_DECLS GdkDragContext * gtk_drag_begin_internal (GtkWidget *widget, - GtkImageDefinition *icon, + gboolean *out_needs_icon, GtkTargetList *target_list, GdkDragAction actions, gint button, diff --git a/gtk/gtkdragsource.c b/gtk/gtkdragsource.c index 677281aa88..bbe3d2ecad 100644 --- a/gtk/gtkdragsource.c +++ b/gtk/gtkdragsource.c @@ -88,6 +88,8 @@ gtk_drag_source_event_cb (GtkWidget *widget, GdkEventSequence *sequence; GdkEvent *last_event; guint button; + gboolean needs_icon; + GdkDragContext *context; sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (site->drag_gesture)); last_event = gdk_event_copy (gtk_gesture_get_last_event (site->drag_gesture, sequence)); @@ -95,9 +97,12 @@ gtk_drag_source_event_cb (GtkWidget *widget, button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (site->drag_gesture)); gtk_event_controller_reset (GTK_EVENT_CONTROLLER (site->drag_gesture)); - gtk_drag_begin_internal (widget, site->image_def, site->target_list, - site->actions, button, last_event, - start_x, start_y); + context = gtk_drag_begin_internal (widget, &needs_icon, site->target_list, + site->actions, button, last_event, + start_x, start_y); + + if (context != NULL && needs_icon) + gtk_drag_set_icon_definition (context, site->image_def, 0, 0); gdk_event_free (last_event); diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c index b2c161e381..3ca17b71f8 100644 --- a/gtk/gtkemojichooser.c +++ b/gtk/gtkemojichooser.c @@ -302,9 +302,9 @@ show_variations (GtkEmojiChooser *chooser, g_signal_connect (box, "child-activated", G_CALLBACK (emoji_activated), parent_popover); - add_emoji (box, FALSE, emoji_data, 0, NULL); + add_emoji (box, FALSE, emoji_data, 0, chooser); for (modifier = 0x1f3fb; modifier <= 0x1f3ff; modifier++) - add_emoji (box, FALSE, emoji_data, modifier, NULL); + add_emoji (box, FALSE, emoji_data, modifier, chooser); gtk_widget_show_all (view); gtk_popover_popup (GTK_POPOVER (popover)); diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 0de4281412..51d9f5b65c 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -7447,7 +7447,6 @@ gtk_notebook_set_tab_label_text (GtkNotebook *notebook, if (tab_text) tab_label = gtk_label_new (tab_text); gtk_notebook_set_tab_label (notebook, child, tab_label); - gtk_widget_child_notify (child, "tab-label"); } /** diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index d8366cd1c7..f24eaecf74 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -688,6 +688,10 @@ window.csd > .titlebar:not(headerbar) { padding: 0; background-color: transparen .titlebar:not(headerbar) > separator { background-color: #1b1f20; } +window.devel headerbar:last-child { background: transparent -gtk-icontheme("system-run-symbolic") 90% 0/256px 256px no-repeat, linear-gradient(to left, #313d45 8%, #33393b 25%); color: rgba(238, 238, 236, 0.1); } + +window.devel headerbar:last-child label { color: #eeeeec; } + /************ Pathbars * */ .path-bar button.text-button, .path-bar button.image-button, .path-bar button { padding-left: 4px; padding-right: 4px; } diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index cbb4e249e0..b6b2226c5c 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -696,6 +696,10 @@ window.csd > .titlebar:not(headerbar) { padding: 0; background-color: transparen .titlebar:not(headerbar) > separator { background-color: #b6b6b3; } +window.devel headerbar:last-child { background: transparent -gtk-icontheme("system-run-symbolic") 90% 0/256px 256px no-repeat, linear-gradient(to left, #d8dfe6 8%, #e8e8e7 25%); color: rgba(46, 52, 54, 0.1); } + +window.devel headerbar:last-child label { color: #2e3436; } + /************ Pathbars * */ .path-bar button.text-button, .path-bar button.image-button, .path-bar button { padding-left: 4px; padding-right: 4px; } |