Bug 153446

Summary: Tabbed UI - Hidden button don't work when displayed then used
Product: LibreOffice Reporter: jul <granjonj>
Component: ImpressAssignee: Justin L <jluth>
Status: RESOLVED FIXED    
Severity: normal CC: granjonj, jluth, nnamani.ezinne
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard: target:24.2.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107237, 113209    
Attachments: hidden button don't work when activated

Description jul 2023-02-07 16:29:44 UTC
Description:
On a pptx file, I want to add a rectangle.
As Impress is not in full screen mode, I don't see the button, so I clic the "expand" arrow" to display the hidden options.
I select "Rectangle" and then I clic the slide to add the rectangle on.
Problem : no rectangle is add and the mouse is back in "select" mode.
NB : everything works fine when Impress is full screen and the "rectangle" button displayed.

Steps to Reproduce:
1. Reduce the window of impress 
2. clic the arrow button allowing you to see the hidden buttons
3. clic the button allowing you to draw rectangles
4. clic the slide where you want to add the rectangle

Actual Results:
No rectangle.
The cursor is back to "select mode"

Expected Results:
Being able to draw a rectangle


Reproducible: Always


User Profile Reset: No

Additional Info:
see the enclosed gif to see the process
Comment 1 jul 2023-02-07 16:30:46 UTC
Created attachment 185182 [details]
hidden button don't work when activated
Comment 2 Ezinne 2023-02-24 04:50:19 UTC
Reproduible in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4a0d671706306661c4a5072ce4769dc47bc65f71
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 3 Justin L 2023-07-04 19:23:01 UTC
repro 24.2+
The problem is that the floating pop-up has the focus, and not the application. Clicking in the slides panel, or in an empty part of the menu area, or in the sidebar resets the focus OK, and then it works. But clicking in the slide area where you want to draw the shape also ends up being simply a "get focus" event and then the mouse-click is cancelled.
Comment 4 Justin L 2023-07-05 01:51:49 UTC
More specifically, rMEvt.IsLeft(), but !mpView->IsCreateObj().
The problem can be avoided by not calling  mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON)

It switches to select mode for FuConstruct::MouseButtonUp and FuConstructCustomShape::MouseButtonUp.
However, I'm not seeing any way that seems legitimate to skip FuConstruct.


MouseButtonDown is lost early, in winproc.cxx ImplHandleMouseEvent
    if ( !pChild && !bMouseLeave )
        return false;
Comment 5 Justin L 2023-07-05 17:31:24 UTC
Will ask for input on https://gerrit.libreoffice.org/c/core/+/154069
Comment 6 Commit Notification 2023-07-12 18:50:48 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/634e13e9d6d9bbe2d051978538c02926f764e51b

tdf#153446 sd fuconstruct: handle mouse-up without mouse-down

It will be available in 24.2.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 7 Commit Notification 2023-07-13 21:21:14 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0c421a9aa3210d3bafdc8bb5e0d79cc1b58b4b33

tdf#153446 sd FuText: handle mouse-up without mouse-down

It will be available in 24.2.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.