Menu

#296 focusLastWindow - allow to override in apps file

closed
nobody
None
5
2011-03-22
2011-03-22
No

There is an option in init file to focus opened window (focusNewWindow). I think that most of people use it, because if we open new window, we want them to be focused, so we may interact with their content. But in some really rare cases, user don't want some certain windows to be focused on opening.

For example, I have a script that makes a screenshot of desktop and displays notification about it (with zenity). From that notification, I have button to remove created screenshot. That window disappears automatically after few seconds (zenity --timeout). But for these few seconds, it gains focus, which - most of times - isn't something that I want.

Of course I could set focusNewWindow: false, BUT most of times I want new windows to start focused. I just don't want focus for some certain windows.

I think that the best way to provide this feature, would be option in apps file. This could be something like
[FocusIfNew] {true|false}
The idea is, that option in apps file overrides any other options. If it's set to true, window will always get focus on opening. If it's set to false, window will never get focus on opening (but it still may be focused with keystroke or mouse pointer). If option isn't present in apps file, it falls back to behavior defined in init file.

The closest thing I have found is Feature Request #1603440[0], but that's not exactly what I think of (and I don't see it working anyway, despite it's supposed to be implemented).

I would only like to add that with notify-send you can create window that doesn't get focus, but you cannot put any buttons in there for user to interact, so it cannot be considered replacement for zenity in my case.

Cheers,
Mirosław Zalewski

[0] http://sourceforge.net/tracker/?func=detail&aid=1603440&group_id=35398&atid=413963

Discussion

  • Mirosław Zalewski

    • status: open --> closed
     
  • Mirosław Zalewski

    It works like a charm. Exactly what I needed :) .

    Sorry for posting that one. I checked only Fluxbox Wiki and haven't found anything related. I should have checked man page for fluxbox-apps, which describes it.

     
  • Mathias Gumz

    Mathias Gumz - 2011-03-23

    another happy customer :)

     

Log in to post a comment.