You are not logged in.

#1 2018-11-06 20:38:17

kaifis
Member
Registered: 2016-12-22
Posts: 58

[SOLVED] How to disable focus stealing with KDE notifications

Hi,
I'm trying to get KDE working with i3. It works awesome. There is one problem though. All notifications are stealing focus. Here is the output of `xprop`:

_NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER
_NET_WM_DESKTOP(CARDINAL) = 4294967295
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
I3_FLOATING_WINDOW(CARDINAL) = 1
_NET_WM_USER_TIME(CARDINAL) = 8439657
_KDE_NET_WM_SHADOW(CARDINAL) = 44040281, 44040294, 44040295, 44040296, 44040297, 44040298, 44040299, 44040300, 6, 6, 6, 6
_KDE_NET_WM_BACKGROUND_CONTRAST_REGION(_KDE_NET_WM_BACKGROUND_CONTRAST_REGION) = 0x0, 0x0, 0x1aa, 0x3e, 0x3dfe2535, 0xbc430fb5, 0xbc430fb5, 0x0, 0xbd240cba, 0x3dc480cf, 0xbd240cba, 0x0, 0xbb847cd3, 0xbb847cd3, 0x3e071faf, 0x0, 0x3e23d70b, 0x3e23d70b, 0x3e23d70b, 0x3f800000
_KDE_NET_WM_BLUR_BEHIND_REGION(CARDINAL) = 0, 0, 426, 62
_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "org.kde.plasmashell"
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = 
_NET_WM_NAME(UTF8_STRING) = "Plasma"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x1, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NOTIFICATION
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x2a00011
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: False
                Initial state is Normal State.
_NET_WM_PID(CARDINAL) = 823
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 44040256
WM_CLASS(STRING) = "plasmashell", "plasmashell"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 1480, 2066
                user specified size: 426 by 62
                window gravity: Static

I think that focus stealing is caused by that `WM_TAKE_FOCUS` but I cannot find any way to stop KDE sending this `WM_PROTOCOL`.
Do you have any suggestions what to try?
I've asked few guys on reddit that use i3 with KDE and their notifications do not steal focus by default.
I believe there has to be a simple switch in configs but I just cannot find it.

Last edited by kaifis (2018-11-07 13:11:00)

Offline

#2 2018-11-06 21:14:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,720

Re: [SOLVED] How to disable focus stealing with KDE notifications

You think wrong. This is merely the announcement of a supported protocol.
The WM should never pass the focus to this window, so either there's a (config?) bug in i3wm or the window takes the focus by itself.
A cause for the latter *might* be that the notification daemon starts before i3wm and believes there's no WM because either it ignores the appearance of i3wm or, very common with xinitrc, because there's a race condition between parallel starts (ie. you're forking commands in xinitrc)

Offline

#3 2018-11-07 13:10:41

kaifis
Member
Registered: 2016-12-22
Posts: 58

Re: [SOLVED] How to disable focus stealing with KDE notifications

I've found i3 command no_focus which solved my problem. https://i3wm.org/docs/userguide.html#no_focus

Offline

#4 2018-11-07 15:31:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,720

Re: [SOLVED] How to disable focus stealing with KDE notifications

In this case it's a i3wm bug, the window says that it doesn't want the focus. i3wm should never pass it there itfp.

Offline

Board footer

Powered by FluxBB