GTK_WINDOW_POPUP works differently in x11 and wayland.
Hello.
See the following source code.
hodong@debian:~$ more popup-window.c
#include <gtk/gtk.h>
void main (void)
{
GtkWidget *window;
gtk_init (NULL, NULL);
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_widget_show_all (window);
gtk_main ();
}
gcc -o popup-window popup-window.c `pkg-config --cflags --libs gtk+-3.0`
Xwayland is running.
hodong@debian:~$ ps aux | grep wayland
hodong 3477 0.0 0.0 374556 5448 tty2 Ssl+ 11:01 0:00 /usr/lib/gdm3/gdm-wayland-session /usr/bin/gnome-session
hodong 3536 1.5 0.5 534464 83748 tty2 Sl+ 11:01 1:27 /usr/bin/Xwayland :0 -rootless -terminate -accessx -core -listen 4 -listen 5 -displayfd 6
hodong 20690 0.0 0.0 218612 892 pts/0 S+ 12:35 0:00 grep wayland
hodong@debian:~$ export | grep XDG
declare -x XDG_CURRENT_DESKTOP="GNOME"
declare -x XDG_DATA_DIRS="/home/hodong/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop"
declare -x XDG_MENU_PREFIX="gnome-"
declare -x XDG_RUNTIME_DIR="/run/user/1000"
declare -x XDG_SEAT="seat0"
declare -x XDG_SESSION_CLASS="user"
declare -x XDG_SESSION_DESKTOP="gnome"
declare -x XDG_SESSION_ID="18"
declare -x XDG_SESSION_TYPE="wayland"
declare -x XDG_VTNR="2"
hodong@debian:~$ GDK_BACKEND="x11" ./popup-window
^C
hodong@debian:~$ GDK_BACKEND="wayland" ./popup-window
GTK_WINDOW_POPUP
does not have focus in x11 environment.
But GTK_WINDOW_POPUP
has focus in wayland environment.
I want GTK_WINDOW_POPUP
not to have focus in the wayland environment.