After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733682 - waylandsink: allow catching input events
waylandsink: allow catching input events
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.4.0
Other Linux
: Normal enhancement
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-24 14:59 UTC by Tifaine Inguère
Modified: 2014-11-08 14:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
waylandsink: allow catching input events (1.23 KB, patch)
2014-07-24 14:59 UTC, Tifaine Inguère
accepted-commit_now Details | Review

Description Tifaine Inguère 2014-07-24 14:59:28 UTC
Created attachment 281604 [details] [review]
waylandsink: allow catching input events

In case that waylandsink is used in "stand-alone" mode (i.e. not in an application), it should catch the input events.

A basic test is to be able to move the window when using 
gst-launch videotestsrc ! waylandsink
Comment 1 Benjamin Gaignard 2014-09-10 13:27:02 UTC
Hello, do you have comments on this patch ?
Comment 2 George Kiagiadakis 2014-09-10 13:45:27 UTC
Hello,

I am fine with that patch, given that you have tested it and works ok. I am not confident yet with the input event handling in general, because I haven't studied that part enough yet and I have seen problems in strange interactions with the embedder toolkit, but for the standalone mode it should be fine.

I only have one comment regarding the code of the patch, I would prefer it if you used gst_wl_window_is_toplevel() in the if() check instead of using window->display->own_display. At the moment both checks have the same effect, but I'd rather maintain the state of the window inside the window class instead of looking at the internals of the display class.
Comment 3 Benjamin Gaignard 2014-09-10 14:35:31 UTC
I just test with gst_wl_window_is_toplevel() but it doesn't work.

I don't catch the link between using waylandsink in "stand-alone" and check if the window is on top.
Comment 4 George Kiagiadakis 2014-09-11 14:46:03 UTC
(In reply to comment #3)
> I just test with gst_wl_window_is_toplevel() but it doesn't work.

Ah, I guess this function is being called too early, when the shell_surface is still NULL. I have a pending commit around which modifies this logic a bit...

> I don't catch the link between using waylandsink in "stand-alone" and check if
> the window is on top.

This is the definition for me. "stand-alone" means not embedded inside another window (therefore, it's a top-level window), no?

You can commit it as it is and I will adjust it as soon as I push my pending changes... Possibly next week.

Thanks.
Comment 5 Sebastian Dröge (slomo) 2014-09-12 13:21:26 UTC
Comment on attachment 281604 [details] [review]
waylandsink: allow catching input events

George, can you just merge that into your pending changes and push it with them?
Comment 6 George Kiagiadakis 2014-10-11 15:22:51 UTC
commit 4395c02b9634b353d57a630db69b188394bb148b
Author: Tifaine Inguere <tifaine.inguere@st.com>
Date:   Thu Jul 24 16:53:53 2014 +0200

    waylandsink : Allow surface to catch input events

    If waylandsink is the owner of the display then it is in charge
    of catching input events on the surface.

    https://bugzilla.gnome.org/show_bug.cgi?id=733682

    Signed-off-by: Tifaine Inguere <tifaine.inguere@st.com>
    Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>