Discussion:
[Gnash-commit] [bug #48066] Qt4 Gnash mistakenly sends `mouseDown` event when user right-clicked on the SWF
Nutchanon Wetchasit
2016-05-31 13:10:16 UTC
Permalink
URL:
<http://savannah.gnu.org/bugs/?48066>

Summary: Qt4 Gnash mistakenly sends `mouseDown` event when
user right-clicked on the SWF
Project: Gnash - The GNU Flash player
Submitted by: nachanon
Submitted on: Tue 31 May 2016 08:10:14 PM ICT
Category: gui
Severity: 3 - Normal
Release: master
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any

_______________________________________________________

Details:

This is a minor issue, though annoying, it does not affect functionality.

While I was writing Qt-based XEmbed example involving `qt4-gnash`
<https://savannah.gnu.org/support/?107543#comment2>, I noticed that
right-clicking on the SWF running under `qt4-gnash` does not only bring up the
context menu, it also send `mouseDown` event to the underlying SWF.

This is undesirable as it would trigger unwanted operations in the SWF when
user's intention was just to bring up player's context menu.

Exact steps to reproduce:
* Run `hovercolorbars.swf` (obtained from file #37302) using `qt4-gnash`.
* Move mouse over the green color bar, you'll see that its color brighten.
* Right-click, you'd see that the green color bar darkens (in response to
`mouseDown` event).

This problem is specific to `qt4-gnash`. Right-click menu on `gtk-gnash` does
not have the problem. `sdl-gnash` and `fb-gnash` are not affected as they
don't have right-click menu.

Gnash: 0.8.11dev (git 5ad81af 16-May-2016)
System: Debian GNU/Linux 7.0 Wheezy i386





_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Nutchanon Wetchasit
2016-05-31 13:17:47 UTC
Permalink
Additional Item Attachment, bug #48066 (project gnash):

File name: hovercolorbars_fp11.2.202.491.png Size:7 KB


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Nutchanon Wetchasit
2016-05-31 13:18:49 UTC
Permalink
Additional Item Attachment, bug #48066 (project gnash):

File name: hovercolorbars_gtk-gnash0.8.11dev-5ad81af.png Size:5 KB


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Nutchanon Wetchasit
2016-05-31 13:19:39 UTC
Permalink
Additional Item Attachment, bug #48066 (project gnash):

File name: hovercolorbars_qt4-gnash0.8.11dev-5ad81af.png Size:4 KB


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Nutchanon Wetchasit
2016-05-31 13:22:28 UTC
Permalink
Follow-up Comment #1, bug #48066 (project gnash):

See attached screenshots for comparison:
* `hovercolorbars_fp11.2.202.491.png` (file #37316): Reference screenshot from
Flash Player; you'd see that green column is bright.
* `hovercolorbars_gtk-gnash0.8.11dev-5ad81af.png` (file #37317): Screenshot
from GTK+ Gnash; you'd see that green column is also bright.
* `hovercolorbars_qt4-gnash0.8.11dev-5ad81af.png` (file #37318): Screenshot
from Qt4 Gnash; *you'd see that green column is dark*.

Gnash: 0.8.11dev (git 5ad81af 16-May-2016)
Flash Player: 11.2.202.491 Standalone
System: Debian GNU/Linux 7.0 Wheezy i386

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Dag Hovland
2016-06-02 10:26:45 UTC
Permalink
Follow-up Comment #2, bug #48066 (project gnash):

This is fixed by adding a check for LeftButton in Qt4Glue.cpp
DrawingWidget::mousePressEvent, e.g. like this:

void
DrawingWidget::mousePressEvent(QMouseEvent* event)
{
if(Qt::LeftButton & event->button())
_gui.notifyMouseClick(true);
}

Patch attached

cheers,

Dag

(file #37351)
_______________________________________________________

Additional Item Attachment:

File name: rightclick.patch Size:0 KB


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Dag Hovland
2016-06-02 10:45:05 UTC
Permalink
Follow-up Comment #3, bug #48066 (project gnash):

I just now saw where to submit patches, so put it there also:
https://savannah.gnu.org/patch/index.php?9015


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Sandro Santilli
2016-06-02 19:23:16 UTC
Permalink
Update of bug #48066 (project gnash):

Status: None => Ready For Test
Assigned to: None => strk

_______________________________________________________

Follow-up Comment #4:


Patch applied, please confirm it works now

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Nutchanon Wetchasit
2016-06-04 16:03:36 UTC
Permalink
Additional Item Attachment, bug #48066 (project gnash):

File name: hovercolorbars_qt4-gnash0.8.11dev-f6a0b38.png Size:4 KB


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Nutchanon Wetchasit
2016-06-04 16:16:06 UTC
Permalink
Follow-up Comment #5, bug #48066 (project gnash):

I have made another test Flash file to test Gnash's mouse click handling (both
left click and right click), attached as `clipmouseupdown.zip`.

Test procedure are as follows:
* Run `clipmouseupdown.swf`.
* Right-click on the blue background (so context menu activates).
* Left-click on other area of blue background (so context menu deactivates).
* Left-click on the blue background again (testing left click).

Debug output from current `gtk-gnash` (verbosity 1 + action error log):

118 SECURITY: Checking security of URL
'file:///mnt/gnashdev/qt4-rightclick-problem/clipmouseupdown/clipmouseupdown.swf'
118 SECURITY: Load of file
/mnt/gnashdev/qt4-rightclick-problem/clipmouseupdown/clipmouseupdown.swf
granted (under local sandbox
/mnt/gnashdev/qt4-rightclick-problem/clipmouseupdown/)
164 SECURITY: Extensions disabled
165 ACTIONSCRIPT ERROR: reference to non-existent variable 'ClipMouseUpDown'
6452 TRACE: stagemouseupdown: button pressed (199,57)
6452 TRACE: stagemouseupdown: pressed on movie (199,57)
6588 TRACE: stagemouseupdown: button released (199,57)
6588 TRACE: stagemouseupdown: released on movie (199,57)


Debug output from current `qt4-gnash` (verbosity 1 + action error log):

956 SECURITY: Checking security of URL
'file:///mnt/gnashdev/qt4-rightclick-problem/clipmouseupdown/clipmouseupdown.swf'
956 SECURITY: Load of file
/mnt/gnashdev/qt4-rightclick-problem/clipmouseupdown/clipmouseupdown.swf
granted (under local sandbox
/mnt/gnashdev/qt4-rightclick-problem/clipmouseupdown/)
1304 ERROR: Can't update stage matrix till VM is initialized
1306 SECURITY: Extensions disabled
1340 ACTIONSCRIPT ERROR: reference to non-existent variable 'ClipMouseUpDown'
8247 TRACE: stagemouseupdown: button pressed (219,69)
8248 TRACE: stagemouseupdown: pressed on movie (219,69)
8335 TRACE: stagemouseupdown: button released (219,69)
8336 TRACE: stagemouseupdown: released on movie (219,69)


Trace output from Flash Player:

Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object
file: No such file or directory
Warning: Reference to undeclared variable, 'ClipMouseUpDown'
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object
file: No such file or directory
stagemouseupdown: right button pressed (148,62)
stagemouseupdown: button pressed (148,62)
stagemouseupdown: pressed on movie (148,62)
stagemouseupdown: button released (100,63)
stagemouseupdown: released on movie (100,63)


I have also re-tested Hover Colorbars demo under current Qt4 Gnash, result is
attached as file #37385. (You'd see that right-clicking on green column does
not cause it to darken)

As `clipmouseupdown.swf` under current Qt4 Gnash gives expected output in this
aspect (one `mouseDown` followed by `mouseUp` at the end), and right-clicking
on `hovercolorbars.swf` gives correct result, this bug could now be considered
as fixed.

The other issue regarding missing context menu/right click event will be filed
as a separate report. Thanks.

Gnash: 0.8.11dev (git f6a0b38 2-Jun-2016)
Flash Player: 11.2.202.491 Standalone
System: Debian GNU/Linux 7.0 Wheezy i386


(file #37386)
_______________________________________________________

Additional Item Attachment:

File name: clipmouseupdown.zip Size:1 KB


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Dag Hovland
2016-07-18 18:07:34 UTC
Permalink
Follow-up Comment #6, bug #48066 (project gnash):

I'm not familiar with the procedure, here: Does "Ready for test" mean I (as
code provider) should test, or is it for the provider of the original bug? (To
me it seems to work fine :))

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Sandro Santilli
2016-07-18 19:49:17 UTC
Permalink
Follow-up Comment #7, bug #48066 (project gnash):

It is for the original reporter to state if he's happy with the current
solution, if it works for him. But your confirmation is also helpful :)

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Nutchanon Wetchasit
2016-07-21 10:27:20 UTC
Permalink
Follow-up Comment #8, bug #48066 (project gnash):

Well, as already said in comment 5
<https://savannah.gnu.org/bugs/?48066#comment5>, I had re-tested and the fix
_does work_; this bug could be marked as fixed.

However, I have also found another unrelated issue in the process, and that
issue (unimplemented context menu event, which affects all flavors of Gnash)
will be posted as a new bug after I gathered enough information about it.

Sorry for causing confusion.


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Sandro Santilli
2016-07-21 12:03:28 UTC
Permalink
Update of bug #48066 (project gnash):

Status: Ready For Test => Fixed
Open/Closed: Open => Closed


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?48066>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/

Loading...