Bug 352889 - When an alarm is currently displayed, can't type into a new alarm dialog
Summary: When an alarm is currently displayed, can't type into a new alarm dialog
Status: CLOSED FIXED
Alias: None
Product: kalarm
Classification: Applications
Component: general (show other bugs)
Version: 2.10.10-ak
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-18 20:10 UTC by David Jarvie
Modified: 2020-08-17 23:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 15.08.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Jarvie 2015-09-18 20:10:20 UTC
Ubuntu 14.04. When an alarm window is currently displayed, bring up a New Alarm dialog (for any type of alarm). Typing in any text field doesn't work - keyboard input is ignored.

This does not happen in Debian Jessie (KAlarm version 2.10.11-ak).

Reproducible: Always
Comment 1 David Jarvie 2015-09-19 22:18:13 UTC
When the fault happens, keyboard input is directed to the alarm window instead of the dialog. This can be seen by typing Alt-C for example, which is the key combination to close the alarm window but which should only work when the alarm window has focus.
Comment 2 David Jarvie 2015-09-19 23:02:46 UTC
When the fault happens, QApplication::focusWidget() (which returns the application widget which has keyboard focus) returns the QTextEdit widget, as expected. However, QApplication::activeWindow() (which returns the application top-level window which has keyboard focus) returns MessageWin, i.e. the alarm window. The dialog or main window should be the active window.
Comment 3 David Jarvie 2015-09-24 17:55:17 UTC
The Unity desktop doesn't handle the transfer of keyboard focus between an application's top-level windows correctly, which was the reason for this bug. KAlarm now detects if it's running on Unity, and if so takes special measures to set keyboard focus in the appropriate window (New Alarm dialog or alarm message window). Note that there was no obvious way to make it function exactly like the normal window manager focus transfer, but it works adequately for the purpose.

Fixed in 4.14 branch (commit 08e5d90f74a01434e23259c01ec3fae38a30f4bf).
Comment 4 David Jarvie 2015-09-24 19:56:42 UTC
Fixed also in 15.08 branch (commit 8e3b57e2d5c78c56a62ad9fc0c459d10e9141019).