Bug Hunting Session
Bug 121723 - Menus don't disappear on focus loss
Summary: Menus don't disappear on focus loss
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.3.0 target:6.2.0.1
Keywords:
: 113362 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-11-26 16:16 UTC by Miklos Vajna
Modified: 2019-07-17 23:46 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
How it looks like currently. (163.93 KB, image/png)
2018-11-26 16:16 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miklos Vajna 2018-11-26 16:16:14 UTC
Created attachment 147053 [details]
How it looks like currently.

See attached screenshot; when LibreOffice is embedded in a Java application as a widget and the user causes LibreOffice to loose focus (e.g. switch between the tabs of the Java app), the menu or context menu of LibreOffice is still there.

The leftover menu is definitely problematic for the embedded case, but it seems other applications (just just e.g. Notepad) close menus on focus loss as well, so doing this in the non-embedded case seems to improve consistency as well.
Comment 1 Miklos Vajna 2018-11-26 16:19:00 UTC
Tested this on Windows only, I seem to recall there are additional issues around menus on X e.g.
Comment 2 Commit Notification 2018-11-26 23:58:25 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/f21d2b48bd68424a96aa6cd5572e368208378291%5E%21

tdf#121723 vcl: leave popup mode on focus loss of toplevel windows

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Mike Kaganski 2018-11-27 06:17:39 UTC
*** Bug 113362 has been marked as a duplicate of this bug. ***
Comment 4 Mike Kaganski 2018-11-27 06:25:26 UTC
This also fixes the problem described in Bug 113362:

> 1. On Windows, open Writer and Impress side-by-side.
> 2. In Impress, click on File menu.
> 3. Click on Writer's title bar (note that menu in Impress is still open, and cursor is blinking in Writer).
> 4. Type single character "i".
> 
> Expected: "i" in Writer.
> Actual result: Properties dialog from Impress is shown, nothing is typed in Writer. The "Properties" subitem of "File" menu that was open in Impress, has "i" as accelerator.
Comment 5 Xisco Faulí 2018-11-27 12:15:19 UTC
Hi Miklos,
Since your commit fixes bug 113362 as well, should it be backported to 6.2 branch at least ?
Comment 6 Miklos Vajna 2018-11-27 13:31:44 UTC
Yes, I'll push a backport in a moment.
Comment 7 Commit Notification 2018-11-28 08:08:24 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/c5000631d3570af93a66d7aa12f78979a14344a5%5E%21

tdf#121723 vcl: leave popup mode on focus loss of toplevel windows

It will be available in 6.2.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.