Skip to content

Commit 112ed43

Browse files
committed
nemo-icon-container.c: Set a transient parent on the interactive
search popup. This gets mis-handled in sway/wayland as a standalone window and is treated as such (like getting tiled next to the main nemo window). Fixes #2362
1 parent 768c515 commit 112ed43

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

libnemo-private/nemo-icon-container.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4011,15 +4011,19 @@ nemo_icon_container_search_init (GtkWidget *entry,
40114011
static void
40124012
nemo_icon_container_ensure_interactive_directory (NemoIconContainer *container)
40134013
{
4014-
GtkWidget *frame, *vbox;
4014+
GtkWidget *frame, *vbox, *toplevel;
40154015

40164016
if (container->details->search_window != NULL) {
40174017
return;
40184018
}
40194019

40204020
container->details->search_window = gtk_window_new (GTK_WINDOW_POPUP);
4021+
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container));
40214022

4022-
gtk_window_set_modal (GTK_WINDOW (container->details->search_window), TRUE);
4023+
gtk_window_set_transient_for (GTK_WINDOW (container->details->search_window),
4024+
GTK_WINDOW (toplevel));
4025+
4026+
gtk_window_set_destroy_with_parent (GTK_WINDOW (container->details->search_window), TRUE);
40234027
gtk_window_set_type_hint (GTK_WINDOW (container->details->search_window),
40244028
GDK_WINDOW_TYPE_HINT_COMBO);
40254029

0 commit comments

Comments
 (0)