Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix two issues with dnd and themes using different background for hovering #1188

Merged
merged 1 commit into from

2 participants

@Cobinja

This fixes two issues with Drag'n'Drop in panel applets in combination with themes that set a different background for hovered items.

1) When trying to drop an item on an applet that doesn't accept it, that applet's actor gets css pseudo class "hover" assigned, even if it's not supposed to get it (neither was track_hover set, nor was checked whether track_hover was set, when syncing the hover states after the drop).

2) When an actor was dropped to its own old position in window-list and panel-launchers, the same hovering problem occured.

This fix sets track_hover = false for both window-list and panel-launchers applet's container actors and makes sure that track_hover is checked when syncing hover states.

@clefebvre clefebvre merged commit b3556ab into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 24, 2012
  1. @Cobinja
This page is out of date. Refresh to see the latest.
View
2  files/usr/share/cinnamon/applets/panel-launchers@cinnamon.org/applet.js
@@ -279,7 +279,7 @@ MyApplet.prototype = {
_init: function(orientation, panel_height) {
Applet.Applet.prototype._init.call(this, orientation, panel_height);
-
+ this.actor.set_track_hover(false);
try {
this.orientation = orientation;
this._dragPlaceholder = null;
View
2  files/usr/share/cinnamon/applets/window-list@cinnamon.org/applet.js
@@ -700,7 +700,7 @@ MyApplet.prototype = {
_init: function(orientation, panel_height) {
Applet.Applet.prototype._init.call(this, orientation, panel_height);
-
+ this.actor.set_track_hover(false);
try {
this.orientation = orientation;
this.dragInProgress = false;
View
10 src/st/st-widget.c
@@ -1904,10 +1904,12 @@ st_widget_sync_hover (StWidget *widget)
pointer = clutter_device_manager_get_core_device (device_manager,
CLUTTER_POINTER_DEVICE);
pointer_actor = clutter_input_device_get_pointer_actor (pointer);
- if (pointer_actor)
- st_widget_set_hover (widget, clutter_actor_contains (CLUTTER_ACTOR (widget), pointer_actor));
- else
- st_widget_set_hover (widget, FALSE);
+ if (widget->priv->track_hover) {
+ if (pointer_actor)
+ st_widget_set_hover (widget, clutter_actor_contains (CLUTTER_ACTOR (widget), pointer_actor));
+ else
+ st_widget_set_hover (widget, FALSE);
+ }
}
/**
Something went wrong with that request. Please try again.