diff options
| author | Jason Smith <jason@hakimaki> | 2010-06-21 17:44:09 -0400 |
|---|---|---|
| committer | Jason Smith <jason@hakimaki> | 2010-06-21 17:44:09 -0400 |
| commit | f475eef3c2b73588a959c9301a21772f15fa8714 (patch) | |
| tree | 9ae8f3d3f080f62556245adae085edef2a5031be /targets | |
| parent | f787a65df773ddc44084a8dc3d52eba014d4663a (diff) | |
improve interaction with 2 spaces
(bzr r336.3.10)
Diffstat (limited to 'targets')
| -rw-r--r-- | targets/mutter/spaces-manager.vala | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/targets/mutter/spaces-manager.vala b/targets/mutter/spaces-manager.vala index e97137c4b..56e2f9282 100644 --- a/targets/mutter/spaces-manager.vala +++ b/targets/mutter/spaces-manager.vala @@ -36,6 +36,7 @@ namespace Unity { public SpacesManager (Plugin plugin) { this.plugin = plugin; + this.plugin.workspace_switch_event.connect (this.workspace_switched); } construct @@ -44,6 +45,14 @@ namespace Unity { spacing = 15; } + private void workspace_switched (Plugin plugin, + List<Mutter.Window> windows, + int from, + int to, + int direction) { + this.plugin.plugin.effect_completed (windows.nth_data (0), Mutter.PLUGIN_SWITCH_WORKSPACE); + } + public void set_padding (uint top, uint right, uint left, uint bottom) { top_padding = top; right_padding = right; @@ -149,7 +158,7 @@ namespace Unity { int index = y * width + x; int xoffset = (x - (focus % width)) * rect.width; - int yoffset = (y - (focus / height)) * rect.height; + int yoffset = (y - (focus / width)) * rect.height; warning ("%i %i", xoffset, yoffset); @@ -190,7 +199,7 @@ namespace Unity { int active = Mutter.MetaScreen.get_active_workspace_index (screen); int xoffset = -(active % width) * rect.width; - int yoffset = -(active / height) * rect.height; + int yoffset = -(active / width) * rect.height; uint item_width = (rect.width - left_padding - right_padding - (width - 1) * spacing) / width; float item_scale = (float) item_width / (float) rect.width; |
