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 750455 - xvimagesink, ximagesink: set WM_CLASS for the window
xvimagesink, ximagesink: set WM_CLASS for the window
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-05 15:10 UTC by Luis de Bethencourt
Modified: 2015-06-08 19:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix for xvimagesink (1.15 KB, patch)
2015-06-05 15:10 UTC, Luis de Bethencourt
committed Details | Review
fix for ximagesink (1.20 KB, patch)
2015-06-05 15:10 UTC, Luis de Bethencourt
committed Details | Review

Description Luis de Bethencourt 2015-06-05 15:10:08 UTC
Created attachment 304655 [details] [review]
fix for xvimagesink

Most customizable window managers use the WM_CLASS property of the window to decide what rules to apply to it. xvimagesink and ximagesink don't set this property making them impossible to customize.

Fix this by setting the XClassHint property.

For example in i3, after setting the property, you can set the following rule to have a player's window float instead of tile.

for_window [class="GStreamer"]    floating enable

res_name should match the window title, for this case it is 'gst-launch-1.0'. I'm not 100% sure if 'GStreamer' is the best class name, I'm open to proposals.
Comment 1 Luis de Bethencourt 2015-06-05 15:10:33 UTC
Created attachment 304656 [details] [review]
fix for ximagesink
Comment 2 Luis de Bethencourt 2015-06-08 16:09:39 UTC
Review of attachment 304655 [details] [review]:

Merged:

commit c3a19f7851c9e0c5d28a87bbdfb1369e841d43a5
Author: Luis de Bethencourt <luis.bg@samsung.com>
Date:   Fri Jun 5 15:58:39 2015 +0100

    xvimagesink: set WM_CLASS of window

    Set WM_CLASS of the xvimagesink window so window managers can apply rules
    based on xprop filtering.
Comment 3 Luis de Bethencourt 2015-06-08 16:10:38 UTC
Review of attachment 304656 [details] [review]:

Merged:

commit fc01b3f13f2c9308009b3843e9496c29ca9b64d3
Author: Luis de Bethencourt <luis.bg@samsung.com>
Date:   Fri Jun 5 16:01:05 2015 +0100

    ximagesink: set WM_CLASS of window

    Set WM_CLASS of the ximagesink window so window managers can apply rules
    based on xprop filtering.
Comment 4 Tim-Philipp Müller 2015-06-08 19:26:11 UTC
commit 6221c95d482e6111ffe8fffdde1b832192c00d8c
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Mon Jun 8 20:17:07 2015 +0100

    ximagesink, xvimagesink: fix string leaks when setting class hint
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750455