|Anonymous | Login | Signup for a new account||2021-05-11 20:24 UTC|
|My View | View Issues | Change Log | Roadmap | Doomseeker Issue Support Ranking | Rules | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003771||Doomseeker||[All Projects] Bug||public||2020-03-22 08:57||2020-06-09 13:14|
|Platform||OS||Debian GNU/Linux||OS Version||bullseye/sid|
|Target Version||Fixed in Version|
|Summary||0003771: "Put populated servers on top" has regressed to require UI interaction for focus on startup|
|Description||As far as I remember, Doomseeker has always had this quirky behavior where the "put populated servers on top" option for server filtering requires focus on the UI window (server browser) to refresh the server browser view (to sort by populated servers). This is most noticeable if Doomseeker is allowed to update the servers in background, while another window (e.g. a game) is in focus.|
The behavior described earlier isn't an issue and is considerably normal behavior, because mouse cursor focus on the window would immediately put populated servers on top.
A regression somewhere has caused to require UI interaction on startup, e.g. a mouse cursor click, to update the server browser view and put populate servers on top. But only under obscure conditions, such as starting Doomseeker from dmenu instead of a shell/terminal emulator. Mouse wheel scrolling in the server browser doesn't count as focus. This "require UI focus on startup" didn't use to be reproducible this way few months ago on my system.
This is reproducible with a new configuration, so it seems not an issue with my configuration.
|Steps To Reproduce|
Repeat from a shell/terminal emulator and the issue can't be reproduced.
The "filtering enabled" option in server filter does not need to be checked, it's unrelated and has no effect on reproduction. (It filters by "max. ping" alright on startup, without need for focus, while filtering is enabled.)
|Additional Information||Qt 5.12.5.|
|Attached Files||issue-3771.png [^] (662,654 bytes) 2020-03-22 09:27|
edited on: 2020-03-22 09:28
issue-3771.png is a screenshot from startup, without gaining focus.
To get this screenshot, I had to use delay:
maim -u --delay=30 | xclip -selection clipboard -t image/png
I then cropped the image in an image editor.
edited on: 2020-03-22 09:34
issue-3771.png also happens with "put populated servers on top" disabled, because of issue 0003772 they are treated as enabled, so as I said in the steps to reproduce, it shouldn't matter.
edited on: 2020-06-08 15:06
Server sorting is turned off when Qt tells us that the main window is not active. We check this property:https://doc.qt.io/qt-5/qwidget.html#isActiveWindow-prop [^]
So far in all cases when the program was launched, the OS would give it the focus and this property would return true. dmenu launch doesn't seem to give focus to Doomseeker's main window and this causes the described problem. This effect can also be triggered manually: simply launch Doomseeker through "normal" means and then quickly click away so that the window loses focus.
I'm not certain if this is something we should attempt at fixing. If this is the way dmenu launches the app, it may be either a dmenu bug or an intended dmenu behavior.
As a workaround, it would technically be possible to forcibly steal the focus in MainWindow::postInitAppStartup(), but this actually interferes with the OS behavior and may cause some difficult to predict side-effects that may not be desireable.
Alternatively, we could remove this isActiveWindow() check and always sort the servers, but this is risky as the check was added for "performance cooperation" purpose. Sorting the server list is an expensive task and on 2010 PCs if you played the game and Doomseeker refreshed the servers in the background, you could actually feel the FPS drop. It's 10 years later now and with all the Ryzens around we could reconsider if this performance drop is still an issue, but I can say upfront that my stance here is cautious and that this behavior should not be changed.
Perhaps you could add a quick debug line to MainWindow::postInitAppStartup() and check what it says?
If it says "false", then the sorting is disabled as intended and something is simply causing the window to not receive focus upon being launched.
edited on: 2020-06-09 10:13
Quote from Zalewa
It says "false" at every opportunity, even if it works as intended.
Something with i3 window manager is weird. If I have a window already opened in a workspace, opening Doomseeker (either from a terminal or dmenu) will gain focus. If there's no window open, Doomseeker won't get focus and then sorting won't happen without a click.
Because of above conditions, testing this makes it difficult too to get stdout/stderr output. I tried sleep 2; ./doomseeker but looks like switching workspaces to a workspace with no windows (to reproduce the issue of workspaces with no windows not gaining focus) in that time period also gives focus to Doomseeker.
Quote from "Wub"
That's also possible. The window may be "inactive" at the moment of the check and then becomes active some time later.
|Only registered users can voice their support. Click here to register, or here to log in.|
|Supporters:||No one explicitly supports this issue yet.|
|Opponents:||No one explicitly opposes this issue yet.|
|2020-03-22 08:57||WubTheCaptain||New Issue|
|2020-03-22 09:27||WubTheCaptain||File Added: issue-3771.png|
|2020-03-22 09:27||WubTheCaptain||Note Added: 0021228|
|2020-03-22 09:28||WubTheCaptain||Note Edited: 0021228||View Revisions|
|2020-03-22 09:33||WubTheCaptain||Note Added: 0021229|
|2020-03-22 09:34||WubTheCaptain||Note Edited: 0021229||View Revisions|
|2020-06-08 12:11||Zalewa||Note Added: 0021430|
|2020-06-08 12:13||Zalewa||Note Edited: 0021430||View Revisions|
|2020-06-08 13:56||WubTheCaptain||Status||new => feedback|
|2020-06-08 13:58||Zalewa||Note Edited: 0021430||View Revisions|
|2020-06-08 15:06||Zalewa||Note Edited: 0021430||View Revisions|
|2020-06-09 10:11||WubTheCaptain||Note Added: 0021455|
|2020-06-09 10:11||WubTheCaptain||Status||feedback => new|
|2020-06-09 10:11||WubTheCaptain||Note Edited: 0021455||View Revisions|
|2020-06-09 10:13||WubTheCaptain||Note Edited: 0021455||View Revisions|
|2020-06-09 13:14||Zalewa||Note Added: 0021457|
Questions or other issues? Contact Us.
|Copyright © 2000 - 2021 MantisBT Team|