Bug 1396827

Summary: [Wayland] Mouse clicks are handled incorrectly on focus activation of unfocused window
Product: [Fedora] Fedora Reporter: Christian Stadelmann <fedora>
Component: libreofficeAssignee: Caolan McNamara <caolanm>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 25CC: caolanm, dtardon, erack, mstahl, sbergman
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libreoffice-5.2.3.3-8.fc25 libreoffice-5.2.3.3-9.fc25 libreoffice-5.2.3.3-10.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-01 15:56:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1277927    

Description Christian Stadelmann 2016-11-20 16:09:33 UTC
Description of problem:
When a libreoffice window doesn't have focus, the first mouse click (button down) is located incorrectly

Version-Release number of selected component (if applicable):
libreoffice-5.2.3.3-7.fc25.x86_64
gtk3-3.22.2-2.fc25.x86_64
mutter-3.22.1-8.fc25.x86_64
gnome-shell-3.22.1-2.fc25.x86_64

How reproducible:
Always when running in a GNOME (wayland) session.
Never when running in a GNOME (X11) session or with GDK_BACKEND=x11 specified to environment.



Steps to Reproduce:
1. open Calc, side by side with another window
2. un-focus window by clicking into the other window
3. click into any cell in Calc window

Actual results:
Calc selects multiple cells

Expected results:
Calc should not select multiple cells when I didn't move the mouse.



Steps to Reproduce:
1. open Calc, side by side with another window
2. un-focus window by clicking into the other window
3. click into any toolbar button in Calc window

Actual results:
The mouse click isn't handled on the button I clicked. Sometimes it looks like it isn't handled at all (especially if the toolbar is at window bottom). Sometimes it is handled as if I was clicking inside the text pane or a different button/toolbar.

Expected results:
Calc should handle mouse events correctly.



Steps to Reproduce:
1. open Writer, side by side with another window
2. fill in some random text with multiple lines or open a document
3. un-focus window by clicking into the other window
4. click into the text

Actual results:
Writer selects some lines of text

Expected results:
Writer should not select text when I didn't move the mouse.



Additional info:
I guess the cause for this bug is that mouse button down events are using a different coordinate system on focus activation.
It seems like mouse button up events are not affected, neither are any following button down events while the window has focus.

Comment 1 Caolan McNamara 2016-11-21 10:29:03 UTC
sigh, wayland delights in being a complete pain and time sink. There's a bodge on signalMotion which I think can solve this by repeating in signalButton. Seems to work for me anyway.

Comment 2 Fedora Update System 2016-11-22 09:02:23 UTC
libreoffice-5.2.3.3-8.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-155d5e411f

Comment 3 Fedora Update System 2016-11-23 11:23:00 UTC
libreoffice-5.2.3.3-9.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-04ed64a2ee

Comment 4 Fedora Update System 2016-11-23 23:07:08 UTC
libreoffice-5.2.3.3-8.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-155d5e411f

Comment 5 Fedora Update System 2016-11-25 09:41:36 UTC
libreoffice-5.2.3.3-9.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-04ed64a2ee

Comment 6 Fedora Update System 2016-11-25 13:41:54 UTC
libreoffice-5.2.3.3-10.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-cdfdbdcf02

Comment 7 Christian Stadelmann 2016-11-25 15:29:58 UTC
Works fine now, thank you!

Comment 8 Fedora Update System 2016-11-26 22:53:26 UTC
libreoffice-5.2.3.3-9.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-11-27 22:59:27 UTC
libreoffice-5.2.3.3-10.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-cdfdbdcf02

Comment 10 Fedora Update System 2016-12-01 15:56:39 UTC
libreoffice-5.2.3.3-10.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.