Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-06-01 18:50:23

KBar
Member
Registered: 2021-11-05
Posts: 689

xfdesktop's window fails to grab focus on session start-up

XFCE_DESKTOP_WINDOW cannot grab focus over the root window (0x0) on session start-up until clicked. This messes up two things:

  1. Screensaver won't ever activate

  2. Can't navigate through icons with the arrow keys

Default debug mode did not print out anything meaningful. I set up a script to catch property changes of the root window:

     1	2022-06-01T23:18:05+05:00
     2	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x0, 0x0
     3	2022-06-01T23:18:06+05:00
     4	NAUTILUS_DESKTOP_WINDOW_ID(WINDOW): window id # 0x2e000a6
     5	2022-06-01T23:18:06+05:00
     6	XFCE_DESKTOP_WINDOW(WINDOW): window id # 0x2e000a6
     7	2022-06-01T23:18:06+05:00
     8	_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0xe00006, 0xe00012, 0xe00018, 0xe0001e
     9	2022-06-01T23:18:06+05:00
    10	XKLAVIER_ALLOW_SECONDARY(INTEGER) = 0
    11	2022-06-01T23:18:06+05:00
    12	_NET_CLIENT_LIST(WINDOW): window id # 0xe00006, 0xe00012, 0xe00018, 0xe0001e
    13	2022-06-01T23:18:06+05:00
    14	XFree86_DDC_EDID1_RAWDATA(INTEGER) = 0, -1, -1, -1, -1, -1, -1, 0, 48, -28, 63, 3, 0, 0, 0, 0, 0, 24, 1, 4, -112, 31, 17, 120, -22, -21, -11, -107, 89, 84, -112, 39, 30, 80, 84, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -48, 29, 86, -12, 80, 0, 22, 48, 48, 32, 53, 0, 54, -82, 16, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 76, 71, 32, 68, 105, 115, 112, 108, 97, 121, 10, 32, 32, 0, 0, 0, -2, 0, 76, 80, 49, 52, 48, 87, 72, 56, 45, 84, 76, 65, 49, 0, 81
    15	2022-06-01T23:18:06+05:00
    16	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x0, 0x0
    17	2022-06-01T23:18:06+05:00
    18	_NET_CURRENT_DESKTOP(CARDINAL) = 0
    19	2022-06-01T23:18:06+05:00
    20	_NET_DESKTOP_VIEWPORT(CARDINAL) = 0, 0
    21	2022-06-01T23:18:06+05:00
    22	_NET_DESKTOP_GEOMETRY(CARDINAL) = 1366, 768
    23	2022-06-01T23:18:06+05:00
    24	_NET_SUPPORTING_WM_CHECK(WINDOW): window id # 0xa000ae
    25	2022-06-01T23:18:06+05:00
    26	_NET_SUPPORTED(ATOM) = _NET_ACTIVE_WINDOW, _NET_CLIENT_LIST, _NET_CLIENT_LIST_STACKING, _NET_CLOSE_WINDOW, _NET_CURRENT_DESKTOP, _NET_DESKTOP_GEOMETRY, _NET_DESKTOP_LAYOUT, _NET_DESKTOP_NAMES, _NET_DESKTOP_VIEWPORT, _NET_FRAME_EXTENTS, _NET_MOVERESIZE_WINDOW, _NET_NUMBER_OF_DESKTOPS, _NET_REQUEST_FRAME_EXTENTS, _NET_SHOWING_DESKTOP, _NET_SUPPORTED, _NET_SUPPORTING_WM_CHECK, _NET_SYSTEM_TRAY_OPCODE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_STICK, _NET_WM_ALLOWED_ACTIONS, _NET_WM_BYPASS_COMPOSITOR, _NET_WM_CONTEXT_HELP, _NET_WM_DESKTOP, _NET_WM_FULLSCREEN_MONITORS, _NET_WM_ICON, _NET_WM_ICON_GEOMETRY, _NET_WM_ICON_NAME, _NET_WM_MOVERESIZE, _NET_WM_NAME, _NET_WM_PID, _NET_WM_PING, _NET_WM_STATE, _NET_WM_STATE_ABOVE, _NET_WM_STATE_BELOW, _NET_WM_STATE_DEMANDS_ATTENTION, _NET_WM_STATE_FOCUSED, _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_HIDDEN, _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MODAL, _NET_WM_STATE_SHADED, _NET_WM_STATE_SKIP_PAGER, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_STICKY, _NET_WM_STRUT, _NET_WM_STRUT_PARTIAL, _NET_WM_SYNC_REQUEST, _NET_WM_SYNC_REQUEST_COUNTER, _NET_WM_USER_TIME, _NET_WM_USER_TIME_WINDOW, _NET_WM_WINDOW_OPACITY, _NET_WM_WINDOW_OPACITY_LOCKED, _NET_WM_WINDOW_TYPE, _NET_WM_WINDOW_TYPE_DESKTOP, _NET_WM_WINDOW_TYPE_DIALOG, _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_MENU, _NET_WM_WINDOW_TYPE_NORMAL, _NET_WM_WINDOW_TYPE_SPLASH, _NET_WM_WINDOW_TYPE_TOOLBAR, _NET_WM_WINDOW_TYPE_UTILITY, _NET_WORKAREA, _GTK_FRAME_EXTENTS, _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED, _GTK_SHOW_WINDOW_MENU, _NET_STARTUP_ID
    27	2022-06-01T23:18:06+05:00
    28	_NET_WORKAREA(CARDINAL) = 64, 24, 1302, 744
    29	2022-06-01T23:18:06+05:00
    30	_NET_NUMBER_OF_DESKTOPS(CARDINAL) = 1
    31	2022-06-01T23:18:06+05:00
    32	GNOME_SM_PROXY(CARDINAL) = 4194306
    33	2022-06-01T23:18:06+05:00
    34	AT_SPI_BUS(STRING) = "unix:abstract=/tmp/dbus-uZwi5zAING,guid=eb84af2e5a53766ce9e88df86297ad5a"
    35	2022-06-01T23:18:06+05:00
    36	GDK_VISUALS(INTEGER) = 277, 344
    37	2022-06-01T23:18:06+05:00
    38	RESOURCE_MANAGER(STRING) = "*customization:t-colornxscreensaver.Dialog.Button.background:t#444nxscreensaver.Dialog.Button.foreground:t#EDEDFFnxscreensaver.Dialog.background:t#202020nxscreensaver.Dialog.bodyFont:t-*-dina-medium-r-*-*-10-*-*-*-*-*-*-*nxscreensaver.Dialog.borderWidth:t0nxscreensaver.Dialog.bottomShadowColor:t#202024nxscreensaver.Dialog.buttonFont:t-*-dina-bold-r-*-*-10-*-*-*-*-*-*-*nxscreensaver.Dialog.dateFont:t-*-dina-medium-r-*-*-10-*-*-*-*-*-*-*nxscreensaver.Dialog.foreground:t#EDEDEDnxscreensaver.Dialog.headingFont:t-*-dina-bold-r-*-*-10-*-*-*-*-*-*-*nxscreensaver.Dialog.internalBorderWidth:t24nxscreensaver.Dialog.labelFont:t-*-dina-medium-r-*-*-10-*-*-*-*-*-*-*nxscreensaver.Dialog.shadowThickness:t2nxscreensaver.Dialog.text.background:t#444nxscreensaver.Dialog.text.foreground:t#EDEDFFnxscreensaver.Dialog.topShadowColor:t#202024nxscreensaver.Dialog.unameFont:t-*-dina-medium-r-*-*-10-*-*-*-*-*-*-*nxscreensaver.dateFormat:t%I:%M%P %a %b %d, %Ynxscreensaver.passwd.passwdFont:t-*-dina-bold-r-*-*-10-*-*-*-*-*-*-*nxscreensaver.passwd.thermometer.background:t#202020nxscreensaver.passwd.thermometer.foreground:t#A9B7C4nxscreensaver.passwd.thermometer.width:t8nXft.antialias:t1nXft.hinting:t1nXft.hintstyle:thintslightnXft.rgba:trgbnXft.lcdfilter:tlcddefaultnXft.dpi:t96nXcursor.theme:tDMZ-WhitenXcursor.size:t24nXcursor.theme_core:t1n"
    39	2022-06-01T23:18:06+05:00
    40	_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us,cn,tr,ru", ",altgr-pinyin,,", "grp:win_space_toggle"
    41	2022-06-01T23:18:06+05:00
    42	XFree86_has_VT(INTEGER) = 1
    43	2022-06-01T23:18:06+05:00
    44	XFree86_VT(INTEGER) = 7
    45	2022-06-01T23:18:06+05:00
    46	Xorg_Seat(STRING) = "seat0"
    47	2022-06-01T23:18:07+05:00
    48	_ICC_PROFILE(CARDINAL) = 0, 0, 6, 84, 108, 99, 109, 115, 4, 48, 0, 0, 109, 110, 116, 114, 82, 71, 66, 32, 88, 89, 90, 32, 7, 228, 0, 3, 0, 20, 0, 14, 0, 50, 0, 36, 97, 99, 115, 112, 65, 80, 80, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 214, 0, 1, 0, 0, 0, 0, 211, 45, 108, 99, 109, 115, 245, 144, 224, 74, 187, 145, 5, 252, 38, 73, 200, 251, 250, 226, 24, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 100, 101, 115, 99, 0, 0, 1, 32, 0, 0, 0, 92, 99, 112, 114, 116, 0, 0, 1, 124, 0, 0, 0, 132, 119, 116, 112, 116, 0, 0, 2, 0, 0, 0, 0, 20, 99, 104, 97, 100, 0, 0, 2, 20, 0, 0, 0, 44, 114, 88, 89, 90, 0, 0, 2, 64, 0, 0, 0, 20, 98, 88, 89, 90, 0, 0, 2, 84, 0, 0, 0, 20, 103, 88, 89, 90, 0, 0, 2, 104, 0, 0, 0, 20, 114, 84, 82, 67, 0, 0, 2, 124, 0, 0, 0, 16, 103, 84, 82, 67, 0, 0, 2, 124, 0, 0, 0, 16, 98, 84, 82, 67, 0, 0, 2, 124, 0, 0, 0, 16, 99, 104, 114, 109, 0, 0, 2, 140, 0, 0, 0, 36, 109, 101, 116, 97, 0, 0, 2, 176, 0, 0, 1, 144, 100, 109, 100, 100, 0, 0, 4, 64, 0, 0, 2, 18, 109, 108, 117, 99, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 101, 110, 85, 83, 0, 0, 0, 64, 0, 0, 0, 28, 0, 67, 0, 111, 0, 109, 0, 112, 0, 97, 0, 116, 0, 105, 0, 98, 0, 108, 0, 101, 0, 32, 0, 119, 0, 105, 0, 116, 0, 104, 0, 32, 0, 65, 0, 100, 0, 111, 0, 98, 0, 101, 0, 32, 0, 82, 0, 71, 0, 66, 0, 32, 0, 40, 0, 49, 0, 57, 0, 57, 0, 56, 0, 41, 109, 108, 117, 99, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 101, 110, 85, 83, 0, 0, 0, 104, 0, 0, 0, 28, 0, 84, 0, 104, 0, 105, 0, 115, 0, 32, 0, 112, 0, 114, 0, 111, 0, 102, 0, 105, 0, 108, 0, 101, 0, 32, 0, 105, 0, 115, 0, 32, 0, 102, 0, 114, 0, 101, 0, 101, 0, 32, 0, 111, 0, 102, 0, 32, 0, 107, 0, 110, 0, 111, 0, 119, 0, 110, 0, 32, 0, 99, 0, 111, 0, 112, 0, 121, 0, 114, 0, 105, 0, 103, 0, 104, 0, 116, 0, 32, 0, 114, 0, 101, 0, 115, 0, 116, 0, 114, 0, 105, 0, 99, 0, 116, 0, 105, 0, 111, 0, 110, 0, 115, 88, 89, 90, 32, 0, 0, 0, 0, 0, 0, 246, 214, 0, 1, 0, 0, 0, 0, 211, 45, 115, 102, 51, 50, 0, 0, 0, 0, 0, 1, 12, 74, 0, 0, 5, 227, 255, 255, 243, 42, 0, 0, 7, 155, 0, 0, 253, 135, 255, 255, 251, 162, 255, 255, 253, 163, 0, 0, 3, 216, 0, 0, 192, 148, 88, 89, 90, 32, 0, 0, 0, 0, 0, 0, 156, 17, 0, 0, 79, 160, 0, 0, 4, 252, 88, 89, 90, 32, 0, 0, 0, 0, 0, 0, 38, 48, 0, 0, 16, 45, 0, 0, 190, 153, 88, 89, 90, 32, 0, 0, 0, 0, 0, 0, 52, 149, 0, 0, 160, 50, 0, 0, 15, 151, 112, 97, 114, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 51, 0, 99, 104, 114, 109, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 163, 215, 0, 0, 84, 123, 0, 0, 53, 195, 0, 0, 181, 195, 0, 0, 38, 102, 0, 0, 15, 92, 100, 105, 99, 116, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 16, 0, 0, 0, 128, 0, 0, 0, 22, 0, 0, 0, 150, 0, 0, 0, 16, 0, 0, 0, 166, 0, 0, 0, 20, 0, 0, 0, 186, 0, 0, 0, 34, 0, 0, 0, 220, 0, 0, 0, 22, 0, 0, 0, 242, 0, 0, 0, 10, 0, 0, 0, 252, 0, 0, 0, 22, 0, 0, 1, 18, 0, 0, 0, 12, 0, 0, 1, 30, 0, 0, 0, 14, 0, 0, 1, 44, 0, 0, 0, 6, 0, 0, 1, 50, 0, 0, 0, 40, 0, 0, 1, 90, 0, 0, 0, 8, 0, 0, 1, 98, 0, 0, 0, 28, 0, 0, 1, 126, 0, 0, 0, 18, 0, 68, 0, 65, 0, 84, 0, 65, 0, 95, 0, 115, 0, 111, 0, 117, 0, 114, 0, 99, 0, 101, 0, 115, 0, 116, 0, 97, 0, 110, 0, 100, 0, 97, 0, 114, 0, 100, 0, 67, 0, 77, 0, 70, 0, 95, 0, 98, 0, 105, 0, 110, 0, 97, 0, 114, 0, 121, 0, 99, 0, 100, 0, 45, 0, 99, 0, 114, 0, 101, 0, 97, 0, 116, 0, 101, 0, 45, 0, 112, 0, 114, 0, 111, 0, 102, 0, 105, 0, 108, 0, 101, 0, 67, 0, 77, 0, 70, 0, 95, 0, 118, 0, 101, 0, 114, 0, 115, 0, 105, 0, 111, 0, 110, 0, 49, 0, 46, 0, 52, 0, 46, 0, 52, 0, 67, 0, 77, 0, 70, 0, 95, 0, 112, 0, 114, 0, 111, 0, 100, 0, 117, 0, 99, 0, 116, 0, 99, 0, 111, 0, 108, 0, 111, 0, 114, 0, 100, 0, 76, 0, 105, 0, 99, 0, 101, 0, 110, 0, 115, 0, 101, 0, 67, 0, 67, 0, 48, 0, 71, 0, 65, 0, 77, 0, 85, 0, 84, 0, 95, 0, 99, 0, 111, 0, 118, 0, 101, 0, 114, 0, 97, 0, 103, 0, 101, 0, 40, 0, 115, 0, 114, 0, 103, 0, 98, 0, 41, 0, 49, 0, 46, 0, 55, 0, 57, 0, 83, 0, 84, 0, 65, 0, 78, 0, 68, 0, 65, 0, 82, 0, 68, 0, 95, 0, 115, 0, 112, 0, 97, 0, 99, 0, 101, 0, 97, 0, 100, 0, 111, 0, 98, 0, 101, 0, 45, 0, 114, 0, 103, 0, 98, 109, 108, 117, 99, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 101, 110, 85, 83, 0, 0, 1, 246, 0, 0, 0, 28, 0, 10, 0, 32, 0, 32, 0, 84, 0, 104, 0, 105, 0, 115, 0, 32, 0, 101, 0, 100, 0, 105, 0, 116, 0, 105, 0, 110, 0, 103, 0, 32, 0, 115, 0, 112, 0, 97, 0, 99, 0, 101, 0, 32, 0, 119, 0, 97, 0, 115, 0, 32, 0, 100, 0, 101, 0, 115, 0, 105, 0, 103, 0, 110, 0, 101, 0, 100, 0, 32, 0, 97, 0, 115, 0, 32, 0, 83, 0, 77, 0, 80, 0, 84, 0, 69, 0, 45, 0, 50, 0, 52, 0, 48, 0, 77, 0, 32, 0, 97, 0, 110, 0, 100, 0, 32, 0, 101, 0, 110, 0, 99, 0, 111, 0, 109, 0, 112, 0, 97, 0, 115, 0, 115, 0, 101, 0, 115, 0, 32, 0, 109, 0, 111, 0, 115, 0, 116, 0, 32, 0, 111, 0, 102, 0, 32, 0, 116, 0, 104, 0, 101, 0, 10, 0, 32, 0, 32, 0, 112, 0, 111, 0, 115, 0, 115, 0, 105, 0, 98, 0, 108, 0, 101, 0, 32, 0, 99, 0, 111, 0, 108, 0, 111, 0, 114, 0, 115, 0, 32, 0, 97, 0, 118, 0, 97, 0, 105, 0, 108, 0, 97, 0, 98, 0, 108, 0, 101, 0, 32, 0, 111, 0, 110, 0, 32, 0, 97, 0, 32, 0, 67, 0, 77, 0, 89, 0, 75, 0, 32, 0, 99, 0, 111, 0, 108, 0, 111, 0, 114, 0, 32, 0, 112, 0, 114, 0, 105, 0, 110, 0, 116, 0, 101, 0, 114, 0, 46, 0, 10, 0, 32, 0, 32, 0, 84, 0, 104, 0, 105, 0, 115, 0, 32, 0, 105, 0, 115, 0, 32, 0, 97, 0, 32, 0, 112, 0, 111, 0, 112, 0, 117, 0, 108, 0, 97, 0, 114, 0, 32, 0, 99, 0, 104, 0, 111, 0, 105, 0, 99, 0, 101, 0, 32, 0, 102, 0, 111, 0, 114, 0, 32, 0, 101, 0, 100, 0, 105, 0, 116, 0, 105, 0, 110, 0, 103, 0, 32, 0, 112, 0, 104, 0, 111, 0, 116, 0, 111, 0, 103, 0, 114, 0, 97, 0, 112, 0, 104, 0, 115, 0, 32, 0, 97, 0, 110, 0, 100, 0, 32, 0, 102, 0, 111, 0, 114, 0, 32, 0, 117, 0, 115, 0, 101, 0, 32, 0, 105, 0, 110, 0, 32, 0, 112, 0, 114, 0, 105, 0, 110, 0, 116, 0, 105, 0, 110, 0, 103, 0, 44, 0, 10, 0, 32, 0, 32, 0, 97, 0, 115, 0, 32, 0, 97, 0, 108, 0, 108, 0, 32, 0, 116, 0, 104, 0, 101, 0, 32, 0, 83, 0, 87, 0, 79, 0, 80, 0, 32, 0, 99, 0, 111, 0, 108, 0, 111, 0, 114, 0, 115, 0, 32, 0, 99, 0, 97, 0, 110, 0, 32, 0, 98, 0, 101, 0, 32, 0, 114, 0, 101, 0, 112, 0, 114, 0, 111, 0, 100, 0, 117, 0, 99, 0, 101, 0, 100, 0, 46, 0, 10, 0, 32, 0, 0
    49	2022-06-01T23:18:07+05:00
    50	XFDESKTOP_IMAGE_FILE_0(STRING) = "/usr/share/xfce4/backdrops/warty-final-ubuntu.png"
    51	2022-06-01T23:18:07+05:00
    52	_XROOTPMAP_ID(PIXMAP): pixmap id # 0x162
    53	2022-06-01T23:18:07+05:00
    54	_NET_CLIENT_LIST(WINDOW): window id # 0xe00006, 0xe00012, 0xe00018, 0xe0001e, 0x2e000a6
    55	2022-06-01T23:18:07+05:00
    56	_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x2e000a6, 0xe0001e, 0xe00018, 0xe00006, 0xe00012
    57	2022-06-01T23:18:11+05:00
    58	_NET_DESKTOP_NAMES(UTF8_STRING) = "Workspace 1", ""
    59	2022-06-01T23:18:15+05:00
    60	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x2e000a6, 0x0
    61	2022-06-01T23:18:15+05:00
    62	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x2e000a6, 0x0
    63	2022-06-01T23:18:16+05:00
    64	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x0, 0x0
    65	2022-06-01T23:18:16+05:00
    66	2022-06-01T23:18:16+05:00
    67	_NET_CLIENT_LIST(WINDOW): window id # 0xe00006, 0xe00012, 0xe00018, 0xe0001e, 0x2e000a6, 0x2800003
    68	2022-06-01T23:18:16+05:00
    69	_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x2e000a6, 0xe0001e, 0xe00018, 0xe00006, 0xe00012, 0x2800003
    70	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x2800003, 0x0
    71	2022-06-01T23:18:16+05:00
    72	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x0, 0x0
    73	2022-06-01T23:18:16+05:00
    74	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x2800003, 0x0
    75	2022-06-01T23:19:26+05:00
    76	2022-06-01T23:19:26+05:00
    77	_NET_CLIENT_LIST(WINDOW): window id # 0xe00006, 0xe00012, 0xe00018, 0xe0001e, 0x2e000a6, 0x2800003, 0x2600027
    78	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x0, 0x0
    79	2022-06-01T23:19:26+05:00
    80	2022-06-01T23:19:26+05:00
    81	_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x2e000a6, 0xe0001e, 0xe00018, 0x2600027, 0xe00006, 0xe00012, 0x2800003
    82	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x2600027, 0x0
    83	2022-06-01T23:19:26+05:00
    84	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x2600027, 0x0
    85	2022-06-01T23:19:26+05:00
    86	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x2600027, 0x0
    87	2022-06-01T23:19:26+05:00
    88	_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x2e000a6, 0xe0001e, 0xe00018, 0xe00006, 0xe00012, 0x2800003, 0x2600027
    89	2022-06-01T23:19:30+05:00
    90	_NET_CLIENT_LIST(WINDOW): window id # 0xe00006, 0xe00012, 0xe00018, 0xe0001e, 0x2e000a6, 0x2800003
    91	2022-06-01T23:19:30+05:00
    92	_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x2e000a6, 0xe0001e, 0xe00018, 0xe00006, 0xe00012, 0x2800003
    93	2022-06-01T23:19:30+05:00
    94	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x2800003, 0x0
    95	2022-06-01T23:19:30+05:00
    96	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x2800003, 0x0
    97	2022-06-01T23:19:33+05:00

The relevant part is lines 59 to 60 when I clicked on the desktop once. First six lines also suggest that these two particular calls in xfce4-desktop.c:

    gdk_property_change(groot,
            gdk_atom_intern("XFCE_DESKTOP_WINDOW", FALSE),
            gdk_atom_intern("WINDOW", FALSE), 32,
            GDK_PROP_MODE_REPLACE, (guchar *)&xid, 1);

    gdk_property_change(groot,
            gdk_atom_intern("NAUTILUS_DESKTOP_WINDOW_ID", FALSE),
            gdk_atom_intern("WINDOW", FALSE), 32,
            GDK_PROP_MODE_REPLACE, (guchar *)&xid, 1);

are successful.

Running xfdesktop through gdb seems daunting. Is there something obvious to be found here? It probably has to do with one of the focus calls to GtkWindow.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#2 2022-06-01 19:57:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: xfdesktop's window fails to grab focus on session start-up

KBar wrote:

Screensaver won't ever activate

I can't replicate this on my system. Fresh startup and login, didn't touch the system, and the screensaver kicked in.

I set up a script to catch property changes of the root window

Can you share the script and I'll run it on my system to see what I get?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2022-06-01 20:46:45

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: xfdesktop's window fails to grab focus on session start-up

This is Xubuntu 20.04:

xfdesktop -V
This is xfdesktop version 4.14.2, running on Xfce 4.14.
Built with GTK+ 3.24.13, linked with GTK+ 3.24.20.
Build options:
    Desktop Menu:        enabled
    Desktop Icons:       enabled
    Desktop File Icons:  enabled
ToZ wrote:

Can you share the script and I'll run it on my system to see what I get?

Of course! Here it is:

#!/bin/sh
exec > "$(mktemp)" 2>&1

active_window() {
  xprop -spy -root _NET_ACTIVE_WINDOW \
  | while read line
    do
      date -Is; echo "${line}"
    done
}

desktop_window() {
  xprop -spy -root \
  | while read line
    do
      date -Is; echo "${line}"
    done
}

active_window & desktop_window

Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#4 2022-06-01 22:14:26

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: xfdesktop's window fails to grab focus on session start-up

3    2022-06-01T23:18:06+05:00
4    NAUTILUS_DESKTOP_WINDOW_ID(WINDOW): window id # 0x2e000a6
5    2022-06-01T23:18:06+05:00
6    XFCE_DESKTOP_WINDOW(WINDOW): window id # 0x2e000a6

Tested your script in a 20.04 VM and noticed this difference. A few others as well, but this is the major one.
Looks like you have nautilus managing your desktop and then xfdesktop taking over.
I believe nautilus has a "--no-desktop" parameter you can pass to it to prevent it from doing that.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2022-06-02 07:14:48

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: xfdesktop's window fails to grab focus on session start-up

ToZ wrote:

Looks like you have nautilus managing your desktop and then xfdesktop taking over.

Nope. I don't have Nautilus at all. The code snippet that I shared earlier suggests this is an intended behavior. I think the NAUTILUS_DESKTOP_WINDOW_ID property is needed for XfdesktopIconView.

Regardless, the problem is with xfdesktop not grabbing the focus on session start-up until mouse is clicked. Try calling the active_window function alone in the script and let the loop run for a while, then click on the desktop and check the timestamps in the temp file. It will look like this:

     1	2022-06-02T11:48:02+05:00
     2	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x0, 0x0
     3	2022-06-02T11:54:46+05:00
     4	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x30000a6, 0x0
     5	2022-06-02T11:54:50+05:00
     6	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x0, 0x0
     7	2022-06-02T11:54:50+05:00
     8	_NET_ACTIVE_WINDOW(WINDOW): window id # 0x2000003, 0x0

I killed the process after 5 minutes because my screensaver is set to activate when computer has been idle for that many minutes:

/lock/embedded-keyboard/enabled  false
/lock/enabled                    false
/lock/saver-activation/delay     0
/lock/saver-activation/enabled   true
/lock/status-messages/enabled    false
/lock/user-switching/enabled     false
/saver/enabled                   true
/saver/fullscreen-inhibit        false
/saver/idle-activation/delay     5
/saver/idle-activation/enabled   true
/saver/mode                      2
/saver/themes/list               <<UNSUPPORTED>>

This and then the fact that arrow keys don't work until xfdesktop's window finally gets the focus. Should be easy to reproduce: boot up, don't click and don't press any buttons. Try the arrow keys. XfdesktonIconView ignores them. Wait N minutes for the supposed screensaver activation time: it won't show up.

Either autograbbing focus wasn't included in the code, or there is something wrong with the code's flow/logic (at least in this specific version). I will try this in 22.04 and see if it was fixed some time in-between the two releases.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 628.09 KiB (Peak: 645.37 KiB) ]