summaryrefslogtreecommitdiff
diff options
-rw-r--r--targets/mutter/spaces-manager.vala76
-rw-r--r--unity-private/launcher/scroller-controller.vala5
-rw-r--r--unity-private/places/places-place-entry-scroller-child.vala16
-rw-r--r--unity-private/places/places-trash-controller.vala2
-rw-r--r--unity-private/places/places-volume-child-controller.vala10
5 files changed, 55 insertions, 54 deletions
diff --git a/targets/mutter/spaces-manager.vala b/targets/mutter/spaces-manager.vala
index f5908f3c4..be7d98b29 100644
--- a/targets/mutter/spaces-manager.vala
+++ b/targets/mutter/spaces-manager.vala
@@ -69,50 +69,50 @@ namespace Unity {
public override bool can_drag ()
{
- return true;
+ return false;
}
}
-
+
public class WorkspaceClone : Clutter.Group
{
bool gridded;
Unity.Plugin plugin;
public unowned Mutter.MetaWorkspace workspace { get; private set; }
-
+
public WorkspaceClone (Mutter.MetaWorkspace wsp, Unity.Plugin plugin)
{
workspace = wsp;
this.plugin = plugin;
-
+
actor_added.connect (() => {
if (gridded)
grid ();
});
-
+
actor_removed.connect (() => {
if (gridded)
grid ();
});
}
-
+
private List<Clutter.Actor> toplevel_windows ()
{
List<Clutter.Actor> windows = new List<Clutter.Actor> ();
-
+
foreach (Clutter.Actor actor in get_children ())
if (actor is ExposeClone && (actor as ExposeClone).source is Mutter.Window)
windows.prepend (actor);
-
+
return windows;
}
-
+
public void grid ()
{
gridded = true;
plugin.expose_manager.position_windows_on_grid (toplevel_windows (), 50, 50, 50, 50);
}
-
+
public void ungrid ()
{
gridded = false;
@@ -193,13 +193,13 @@ namespace Unity {
if (background is Clutter.Actor)
background.destroy ();
-
+
if (selector_group is Clutter.Actor)
selector_group.destroy ();
background = new Clutter.Rectangle.with_color ({0, 0, 0, 255});
selector_group = new Clutter.Group ();
-
+
unowned Mutter.MetaScreen screen = plugin.plugin.get_screen ();
unowned GLib.List<Mutter.MetaWorkspace> workspaces = Mutter.MetaScreen.get_workspaces (screen);
unowned Clutter.Container window_group = plugin.plugin.get_normal_window_group() as Clutter.Container;
@@ -222,28 +222,28 @@ namespace Unity {
clone.raise_top ();
clone.show ();
clone.opacity = 200;
-
+
unowned Mutter.MetaWorkspace cpy = workspace;
- clone.button_release_event.connect (() => {
+ clone.button_release_event.connect (() => {
select_workspace (cpy);
- return true;
+ return true;
});
-
- clone.enter_event.connect (() => {
+
+ clone.enter_event.connect (() => {
clone.opacity = 255;
clone.raise_top ();
- return true;
+ return true;
});
-
- clone.leave_event.connect (() => {
- clone.opacity = 200;
- return true;
+
+ clone.leave_event.connect (() => {
+ clone.opacity = 200;
+ return true;
});
}
window_group.add_actor (selector_group);
selector_group.raise_top ();
-
+
layout_workspaces (clones, screen);
unowned GLib.List<Mutter.Window> windows = plugin.plugin.get_windows ();
@@ -272,7 +272,7 @@ namespace Unity {
return false;
}
-
+
private void select_workspace (Mutter.MetaWorkspace? workspace) {
if (workspace == null)
{
@@ -289,7 +289,7 @@ namespace Unity {
global_shell.get_stage ().captured_event.disconnect (on_stage_capture_event);
}
-
+
private Clutter.Actor workspace_clone (Mutter.MetaWorkspace workspace) {
WorkspaceClone wsp;
unowned GLib.List<Mutter.Window> windows;
@@ -314,10 +314,10 @@ namespace Unity {
clone.reactive = true;
clone.darken = 25;
clone.enable_dnd = true;
-
+
clone.drag_dropped.connect ((t) => {
WorkspaceClone new_parent = clone.pre_drag_parent as WorkspaceClone;
-
+
while (!(t is Clutter.Stage))
{
if (t is WorkspaceClone)
@@ -327,20 +327,20 @@ namespace Unity {
}
t = t.get_parent ();
}
-
+
float x, y;
-
+
clone.move_anchor_point_from_gravity (Clutter.Gravity.CENTER);
new_parent.transform_stage_point (clone.x, clone.y, out x, out y);
-
+
clone.set_scale (clone.pre_drag_scale_x, clone.pre_drag_scale_y);
clone.set_position (x, y);
-
+
clone.move_anchor_point_from_gravity (Clutter.Gravity.NORTH_WEST);
clone.reparent (new_parent);
-
- Mutter.MetaWindow.change_workspace_by_index ((clone.source as Mutter.Window).get_meta_window (),
+
+ Mutter.MetaWindow.change_workspace_by_index ((clone.source as Mutter.Window).get_meta_window (),
Mutter.MetaWorkspace.index (new_parent.workspace),
true,
plugin.get_current_time ());
@@ -350,7 +350,7 @@ namespace Unity {
clone.set_size (window.width, window.height);
clone.set_position (window.x, window.y);
-
+
clone.button_release_event.connect (() => {
uint32 time_;
@@ -360,7 +360,7 @@ namespace Unity {
time_ = Mutter.MetaDisplay.get_current_time (Mutter.MetaWindow.get_display (meta));
Mutter.MetaWorkspace.activate (Mutter.MetaWindow.get_workspace (meta), time_);
Mutter.MetaWindow.activate (meta, time_);
-
+
GLib.Timeout.add (250, () => { Mutter.MetaWindow.activate (meta, time_); return false; });
return false;
@@ -376,9 +376,9 @@ namespace Unity {
wsp.add_actor (background_clone);
background_clone.lower_bottom ();
background_clone.show ();
-
+
wsp.grid ();
-
+
wsp.set_size (background_clone.width, background_clone.height);
return wsp;
@@ -411,7 +411,7 @@ namespace Unity {
"y", (float) yoffset,
"scale-x", 1.0f,
"scale-y", 1.0f);
-
+
(clone as WorkspaceClone).ungrid ();
anim.completed.connect (() => {
diff --git a/unity-private/launcher/scroller-controller.vala b/unity-private/launcher/scroller-controller.vala
index 833338dfa..380d14f87 100644
--- a/unity-private/launcher/scroller-controller.vala
+++ b/unity-private/launcher/scroller-controller.vala
@@ -82,7 +82,7 @@ namespace Unity.Launcher
var childcontroller = get_controller_for_view (model[index]);
if (childcontroller is ScrollerChildController)
- {
+ {
childcontroller.activate ();
}
else
@@ -344,7 +344,6 @@ namespace Unity.Launcher
{
if (retcont is ScrollerChild)
{
-
if (retcont.enable_close_state == true)
{
retcont.enable_close_state = false;
@@ -370,6 +369,8 @@ namespace Unity.Launcher
int model_index = view.get_model_index_at_y_pos_no_anim (y - 24, true);
if (model_index < 0) return;
+ if (model[model_index].group_type != ScrollerChild.GroupType.APPLICATION)
+ return;
//we have to check to see if we would still be over the index
//if it was done animating
diff --git a/unity-private/places/places-place-entry-scroller-child.vala b/unity-private/places/places-place-entry-scroller-child.vala
index 1743be515..a683c6b90 100644
--- a/unity-private/places/places-place-entry-scroller-child.vala
+++ b/unity-private/places/places-place-entry-scroller-child.vala
@@ -16,12 +16,12 @@
* Authored by Neil Jagdish Patel <neil.patel@canonical.com>
*
*/
-
+
using Unity.Launcher;
-
+
namespace Unity.Places
{
-
+
public class PlaceEntryScrollerChildController : ScrollerChildController
{
public PlaceEntry entry { get; construct; }
@@ -49,7 +49,7 @@ namespace Unity.Places
private bool get_sections ()
{
Dee.Model sections;
-
+
/* We do this so the sections model actually populates with something
* before we show it
*/
@@ -59,7 +59,7 @@ namespace Unity.Places
return false;
}
-
+
public override void activate ()
{
clicked (0);
@@ -77,7 +77,7 @@ namespace Unity.Places
Dee.Model sections = entry.sections_model;
unowned Dee.ModelIter iter = sections.get_first_iter ();
-
+
while (iter != null && !sections.is_last (iter))
{
var name = sections.get_string (iter, 0);
@@ -91,7 +91,7 @@ namespace Unity.Places
clicked (item.property_get_int ("section-id"));
});
root.child_append (item);
-
+
iter = sections.next (iter);
}
@@ -100,7 +100,7 @@ namespace Unity.Places
public override bool can_drag ()
{
- return true;
+ return false;
}
}
}
diff --git a/unity-private/places/places-trash-controller.vala b/unity-private/places/places-trash-controller.vala
index 2ab4bd340..50e878880 100644
--- a/unity-private/places/places-trash-controller.vala
+++ b/unity-private/places/places-trash-controller.vala
@@ -191,7 +191,7 @@ namespace Unity.Places
public override bool can_drag ()
{
- return true;
+ return false;
}
}
}
diff --git a/unity-private/places/places-volume-child-controller.vala b/unity-private/places/places-volume-child-controller.vala
index 0e46203d9..66adfdb49 100644
--- a/unity-private/places/places-volume-child-controller.vala
+++ b/unity-private/places/places-volume-child-controller.vala
@@ -16,10 +16,10 @@
* Authored by Neil Jagdish Patel <neil.patel@canonical.com>
*
*/
-
+
using Unity.Launcher;
using Unity.Testing;
-
+
namespace Unity.Places
{
public class VolumeChildController : ScrollerChildController
@@ -48,7 +48,7 @@ namespace Unity.Places
private void on_volume_removed ()
{
ScrollerModel s;
-
+
s = ObjectRegistry.get_default ().lookup ("UnityScrollerModel")[0] as ScrollerModel;
s.remove (this.child);
@@ -116,7 +116,7 @@ namespace Unity.Places
{
Dbusmenu.Menuitem root = new Dbusmenu.Menuitem ();
root.set_root (true);
-
+
Dbusmenu.Menuitem item;
item = new Dbusmenu.Menuitem ();
@@ -151,7 +151,7 @@ namespace Unity.Places
public override bool can_drag ()
{
- return true;
+ return false;
}
}
}