I'm using emesene and where it show me a popup of a new message i loose focus on my current window...
(In reply to comment #0) > I'm using emesene and where it show me a popup of a new message i loose focus > on my current window... Then activate focus stealing prevention?
(In reply to comment #1) > (In reply to comment #0) > > I'm using emesene and where it show me a popup of a new message i loose focus > > on my current window... > > Then activate focus stealing prevention? Nothing...the problem is that xfce manage popups like new windows opened by me...
What is checked in WM settings / focus / Automatically give focus to newly created windows?
(In reply to comment #3) > What is checked in WM settings / focus / Automatically give focus to newly > created windows? I have checked this option because *i want* focus in new windows opened by me(e.g. file manager...), but i don't want that every (notification)popups steals my focus...
Actually, the algorithm for focus preventions is simple, it compares the NET_WM_USER_TIME of the two windows, and gives focus to the newly mapped window has a timestamp later than the currrent focused window (there is no special treatment for popup and this the expected behaviour) It's the application that updates its NET_WM_USER_TIME based on user events. That means that if the popup are focused, it's because either the current focused window did not updated its NET_WM_USER_TIME (granted that the user have actually performed an action) or the popup window sets a timestamp that is more current (it is possible to defeat focus stealing prevention by updating the NET_WM_USER_TIME)
I have made some test: the problem is that baloon of emesene are gtk.window and in it there is: self.set_property('can-focus', False) self.set_property('accept-focus', False) So i don't undestand why my current window loose focus... The *problem* of xfce is that loose focus of baloon despite there are those options... With another notify sistem of emesene that use libnotify focus is ok. Now i'm using libnotify...
Thiss is because those popup windows have WM_FLAG_INPUT unset and WM_FLAG_TAKEFOCUS which means that the focus will be taken by the app and not set explicitely by the WM. In that case xfwm4 sets the focus to to an internal window to avoid a race condition with the application that had previously the focus. As a result, your window looses focus. I am not sure how to properly implement this though.
This is not a major issue, changing back to medium/normal
(In reply to comment #7) > Thiss is because those popup windows have WM_FLAG_INPUT unset and > WM_FLAG_TAKEFOCUS which means that the focus will be taken by the app and not > set explicitely by the WM. > > In that case xfwm4 sets the focus to to an internal window to avoid a race > condition with the application that had previously the focus. > > As a result, your window looses focus. I am not sure how to properly implement > this though. So... can i set this 2 variables, or set some other option of gtk.window, to leave the focus to the current window?
No, there is not much you can from the application. This should be fixed in rev. 28924. though.