Menu

#104 Turn Report Steals Focus (CentOS 5.5)

None
closed
nobody
None
5
2015-08-14
2010-09-05
Phil Grant
No

If FreeCol is running in the background; that is, if I have another program running in the foreground while the AI players move, the turn report steals the focus from the foreground program. The sad part is: FreeCol does not come to the foreground when this happens; FreeCol remains in the background while the foreground program becomes non-responsive (keystrokes are sent to FreeCol). While bad in any case, it is especially annoying when FreeCol is completely hidden by foreground windows. Even worse, I say turn report above; because, while this behavior is consistent for the turn report, it is inconsistent for other dialogs. Sometimes it happens for messages like atrocities and give us food, and other times it doesn't. (I admit that I haven't been paying enough attention to determine if there is any correlation between the actual message in the dialog and the behavior. I will in the future, and will update this report if I spot one. UPDATE: During the course of typing up this report, I received 6 atrocities messages: 5 stole the focus, and 1 did not!.

Ideally, FreeCol should put up some kind of non-modal dialog - similar to the downloads complete message that FoxPro displays. Alternatively, FreeCol could light up it's taskbar icon (or do both). The AI takes so long to make its moves that it is only natural to do something else while waiting. The situation is even worse when playing against another human.

Discussion

  • Mike Pope

    Mike Pope - 2010-09-06

    Surely focus stealing is something that is handled at the window manager level? Suffice it to say there is nothing special in the code for turn reports or atrocities messages that says: `Grab the focus'. AFAICT that is out of our control.
    Similarly for taskbar icons--- FreeCol itself does not contain code to implement taskbar icons. Your desktop is doing that.

     
  • Phil Grant

    Phil Grant - 2010-09-08

    Okay.

    I did some research and determined that opening a New Window - the turn report - gives FreeCol the focus. Why the window gains the focus while opening in the background is still a mystery, and still annoying.

    Something else I noticed. The turn report does not open while FreeCol is minimized. It opens milliseconds after FreeCol is restored.

    I kinda/sorta discovered a work around. Gnome implements a feature of CentOS called Workspaces. If I put FreeCol in its own workspace, then it can't steal the focus from an application in a different workspace. That means that I can type messages like this one unimpeded. The only problem is, now I can't tell when it's my turn. EXCEPT....

    If the turn report includes a message like "Havana has complete building Stables.", that message is accompanied by a sound effect that I can hear even if I am in another workspace. If FreeCol could be configured so that EVERY Turn Report, attrocity dialog, etc. included a sound, then my problem would be solved.

    I guess this needs to be moved from bug to feature request.

     
  • Mike Pope

    Mike Pope - 2010-09-14

    I can not comment on gnome, as I run KDE, but (characteristically:-) KDE has the ability to configure the level of focus stealing prevention: at one end I can reproduce your problem, and at the other it does not occur. So, as you suggest I will move this to the Feature Requests--- perhaps someone will have something better and FreeCol specific to suggest.

     
  • Mike Pope

    Mike Pope - 2010-09-14
    • labels: 385144 -->
     
  • Michael Vehrs

    Michael Vehrs - 2010-09-15

    It would be interesting to find out whether this is really limited to the turn report. What about the founding father dialog, for example? Does it also steal the focus?

     
  • Janet Hunt

    Janet Hunt - 2011-02-20
    • labels: --> 517855
     
  • Mike Pope

    Mike Pope - 2012-10-16
    • labels: 517855 -->
     
  • Mike Pope

    Mike Pope - 2015-08-01

    As stated above the core problem here is with the window manager. The conflation with sounds is interesting, but we have IR#s open requesting more sounds. Closing as duplicate.

     
  • Mike Pope

    Mike Pope - 2015-08-01
    • status: open --> closed
    • Group: --> Duplicate
     

Log in to post a comment.