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 614836 - [PATCH] Clickthrough plugin
[PATCH] Clickthrough plugin
Status: RESOLVED OBSOLETE
Product: totem
Classification: Core
Component: Plugins
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
: 605750 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-04-04 21:11 UTC by Mads Chr. Olesen
Modified: 2018-05-24 10:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow-the-controls-visible-setting-to-be-queried.patch (2.21 KB, patch)
2010-04-04 21:11 UTC, Mads Chr. Olesen
rejected Details | Review
Initial-clickthrough-plugin.patch (13.30 KB, patch)
2010-04-04 21:12 UTC, Mads Chr. Olesen
needs-work Details | Review

Description Mads Chr. Olesen 2010-04-04 21:11:01 UTC
These patches add a clickthrough plugin to Totem.
The clickthrough plugin allows the totem window to be translucent and clickthroughable, when playing with the controls hidden - nice for viewing while working.
Comment 1 Mads Chr. Olesen 2010-04-04 21:11:56 UTC
Created attachment 157917 [details] [review]
Allow-the-controls-visible-setting-to-be-queried.patch
Comment 2 Mads Chr. Olesen 2010-04-04 21:12:20 UTC
Created attachment 157918 [details] [review]
Initial-clickthrough-plugin.patch
Comment 3 Bastien Nocera 2010-04-07 18:18:45 UTC
I'll need to test this a bit more thoroughly, but I would think that the plugin should be completely hidden, and enabled by default when compositing is available.
Comment 4 Bastien Nocera 2010-04-08 10:45:11 UTC
*** Bug 605750 has been marked as a duplicate of this bug. ***
Comment 5 Mads Chr. Olesen 2010-04-08 11:00:01 UTC
I've now tested this for a few days, and found that the plugin should also listen for the events show-hide controls and fullscreen toggle, as currently you can get into some weird situations where the window is fullscreen and translucent. I'll try to work on a revised version.

What should the plugin do if compositing is not available? Nothing is my guess, but it could still set the window on top and sticky...
Comment 6 Bastien Nocera 2010-04-08 11:02:58 UTC
(In reply to comment #5)
> I've now tested this for a few days, and found that the plugin should also
> listen for the events show-hide controls and fullscreen toggle, as currently
> you can get into some weird situations where the window is fullscreen and
> translucent. I'll try to work on a revised version.

Cool, and make sure you fix the indentation and FIXMEs while you're at it :)

> What should the plugin do if compositing is not available? Nothing is my guess,
> but it could still set the window on top and sticky...

Nothing, we already have an "Always on Top" plugin that'll only show the player on top when actually playing.
Comment 7 Bastien Nocera 2014-04-11 14:03:12 UTC
Comment on attachment 157917 [details] [review]
Allow-the-controls-visible-setting-to-be-queried.patch

That shouldn't be needed anymore.
Comment 8 Bastien Nocera 2014-04-11 14:19:11 UTC
Review of attachment 157918 [details] [review]:

The UI has changed quite a bit, so this doesn't really apply any more.

I would do pretty much the same thing, but:
- only when playback is on-going
- the player section of the UI is shown
- and leave a hole in the clickthrough for the headerbar, so that the window is made 100% opaque when focused

::: src/plugins/clickthrough/totem-clickthrough.c
@@ +76,3 @@
+
+G_MODULE_EXPORT GType register_totem_plugin	(GTypeModule *module);
+GType totem_clickthrough_plugin_get_type		(void) G_GNUC_CONST;

Try to keep things indented.

@@ +106,3 @@
+	TotemClickthroughPluginPrivate *priv = pi->priv;
+
+	bacon_video_widget_get_metadata (priv->bvw, BVW_INFO_HAS_VIDEO, &has_video);

Checking whether there is a video isn't needed anymore, you can assume we're always playing video now.

@@ +108,3 @@
+	bacon_video_widget_get_metadata (priv->bvw, BVW_INFO_HAS_VIDEO, &has_video);
+
+	gboolean toret = ( totem_is_playing (priv->totem) != FALSE &&

Don't declare variables inside the function, but at the top of the block/functon.

@@ +131,3 @@
+		if (flag) {
+			gtk_window_set_opacity (priv->window, WINDOW_MIN_OPACITY);
+		}

} else {

not:
}
else
{

@@ +163,3 @@
+	}
+
+	if (GTK_WIDGET_REALIZED (window))

reverse the condition and exit early, that will avoid most of the indentation afterwards.

@@ +193,3 @@
+	cairo_t*   cr   = NULL;
+
+	gtk_widget_input_shape_combine_mask (window,

My screen is wide, put all this on the same line.

@@ +197,3 @@
+						 0,
+						 0);
+	if (value)

brace on the same line.

@@ +231,3 @@
+	TotemClickthroughPluginPrivate *priv = pi->priv;
+
+	if ( is_playing_without_controls (pi) ) {

Don't put space after opening parenthesis, or before closing ones, so:
if (is_playing_without_controls (pi)) {

@@ +236,3 @@
+
+		/* poll for mouse-over, to fade */
+		// FIXME: read out current mouse-pointer position every 1/25 second

I'm not sure that's really necessary, at least not at first.

@@ +237,3 @@
+		/* poll for mouse-over, to fade */
+		// FIXME: read out current mouse-pointer position every 1/25 second
+        priv->pointer_update_id = g_timeout_add (1000/FPS,

Indentation.
Comment 9 GNOME Infrastructure Team 2018-05-24 10:37:57 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/totem/issues/40.