While it can make it easier to dismiss (if it grabs focus through the
activateWindow call), it also means if you are typing and a reminder
comes in it will both get those keystrokes and a space or return will
dismiss the reminder before you have a chance to ever see what the
reminder was about, which assumes you are even looking at your screen
to see the reminder box flash up, if you are typing in a paper you
might not even know.
Details
Setup two notifications in korganizer one minute apart.
I the dock window menu test once with "Reminder grabs focus" enabled and once with it disabled.
Give focus to some other program before the first alarm and second alarm, don't dismiss the reminder box between alarms.
With "Reminder grabs focus" checked, the Reminders window should get focus on the second reminder, (this is also the behavior before this change).
With "Reminder grabs focus" unchecked, the Reminders window should not get focus on the second reminder.
Note I'm writing this up for two reminders to avoid the case of window managers which automatically give focus on every new window that pops up. That's a policy choice on the user/window manager and if this did something to not get focus in that case, this would be going against that policy.
Diff Detail
- Repository
- R210 KOrganizer
- Lint
Lint Skipped - Unit
Unit Tests Skipped
korgac/alarmdockwindow.cpp | ||
---|---|---|
47 | const, grabFocus | |
96 | Maybe add a tooltip with explanation what this really means - "Reminder grabs focus" is quite technical | |
98 | Use the new connect method (via method pointers) | |
156 | Remove this. Or add some more context - in release builds the method name is not known, so this just prints "<uknown>" to the log | |
159 | No need to explicitly sync |
const bool grabfocus
different menu label, added tooltip, enabled tooltips
used newer connect style
removed qCDebug, config.sync();
korgac/alarmdockwindow.cpp | ||
---|---|---|
96 | How does this sound? tooltip: "Enable when you want the reminder dialog to request keyboard focus when a notification appears." menus disable tooltips by default, adding: I'd be glad to redo this patch to not include the menu option and not grab focus. That would simplify things. I just figured as something went out of their way to add activateWindow, that wouldn't to over, so I made it optional. |
Let's just improve the wording a little, rest of the code looks OK now.
Oh and rename the grabfocus variable to grabFocus, please.
korgac/alarmdockwindow.cpp | ||
---|---|---|
96 | Usually, the wording of tooltips is what happens when you use/enable it, rather than "use/enable it to achieve something", so "When this option is enabled the reminder dialog will automatically receive keyboard focus when it opens." is better IMHO. I haven't realized this is a menu action, not a checkbox somewhere in a settings dialog, but I think the tooltip does make sense in this case and is OK. Having this as an option is perfectly OK. We like having options :-) |