Merge lp:~gala-dev/gala/workspace-edge-moving into lp:gala
- workspace-edge-moving
- Merge into trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~gala-dev/gala/workspace-edge-moving |
Merge into: | lp:gala |
Diff against target: |
110 lines (+93/-0) 1 file modified
src/Plugin.vala (+93/-0) |
To merge this branch: | bzr merge lp:~gala-dev/gala/workspace-edge-moving |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gala developers | Pending | ||
Review via email: mp+116117@code.launchpad.net |
Commit message
Description of the change
- 153. By Tom Beckmann
-
Move window group one pixel down to allow transparent border
- 154. By Tom Beckmann
-
Improve multimonitor behavior for workspaceview placement
- 155. By Tom Beckmann
-
Remove turning part from map animation to improve the look on large displays
- 156. By Tom Beckmann
-
Disable minimize-to-icon until the problems in libmutter (or wnck?) are solved
- 157. By Tom Beckmann
-
Fix workspaceview sliding down from top on first startup
- 158. By Tom Beckmann
-
Remove unnecessary AppIcon onclick handler
Cody Garver (codygarver) wrote : | # |
I would like to hear from the design team. I think something more appealing than just black could be implemented, but I'm not sure what.
- 159. By Rico Tzschichholz
-
Fix commenting in css
- 160. By Tom Beckmann
-
Fix window switcher not working anymore after using it on workspace with only one window
- 161. By Tom Beckmann
-
Remove window repositioning to avoid jumps on map
- 162. By Rico Tzschichholz
-
Clean up
Move Plugin class in its own file
Sort filenames in CMakeLists.txt
Some code clean up mostly Plugin.switch_ workspace - 163. By Rico Tzschichholz
-
Fix fallout of r162
- 164. By Rico Tzschichholz
-
Add missing file :\
- 165. By Tom Beckmann
-
Dont animate first window in when alt-tabbing
- 166. By Tom Beckmann
-
Dont close the first workspace when it's emptied and it's the last used one to avoid confusing workspace movement
- 167. By Tom Beckmann
-
Improve workspace switch easing mode
- 168. By Tom Beckmann
-
Add key for overlay key action
- 169. By Tom Beckmann
-
Dont activate a window after switching workspace if it's not on the active workspace
- 170. By Tom Beckmann
-
Fix flashing from maximized state problem
- 171. By Tom Beckmann
-
Fix problem with rev170
- 172. By Tom Beckmann
-
Place hot corner on primary monitor
- 173. By Tom Beckmann
-
Add action system to prepare for hot corner configuration
- 174. By Tom Beckmann
-
add none to action list
- 175. By Tom Beckmann
-
Add support for configurable hotcorners
- 176. By Tom Beckmann
-
Revert hot corner changes for now
- 177. By Tom Beckmann
-
Raise active window to top when alt-tabbing
- 178. By Tom Beckmann
-
Fix weird un/maximize behavior for new windows
- 179. By Rico Tzschichholz
-
Don't use deprecated clutter api
- 180. By Tom Beckmann
-
Merged with lp:~gala-dev/gala/hotcorners
- 181. By Tom Beckmann
-
Add DBus interface
- 182. By Rico Tzschichholz
-
Minor cleanup
- 183. By Tom Beckmann
-
Show the switching windows while alt-tabbing in a fake plank-like dock
- 184. By Tom Beckmann
-
Add a nudge over animation when trying to switch to a non existent workspace
- 185. By Tom Beckmann
-
Simplify the check for not having moved workspace
- 186. By Tom Beckmann
-
Add delay when holding down arrow keys while switching workspaces
- 187. By Tom Beckmann
-
Fix a crash when opening and closing the same window quite quickly
- 188. By Tom Beckmann
-
Remove some calls to deprecated methods
- 189. By Tom Beckmann
-
Fix problem where the window group would stay at x!=0 when having released super to early while switching
- 190. By Tom Beckmann
-
Only minimize NORMAL windows by action
- 191. By Tom Beckmann
-
Only maximize NORMAL windows by action
- 192. By Tom Beckmann
-
Fix style applying in workspacethumb
- 193. By Rico Tzschichholz
-
vapi: rebuild bindings
- 194. By Rico Tzschichholz
-
vapi: update to mutter 3.5.90
- 195. By Rico Tzschichholz
-
vapi: sync bamf bindings with plank
Rename to libbamf3.vapi to follow upstream
- 196. By Tom Beckmann
-
Fix window icon repositioning after DnD
- 197. By Tom Beckmann
-
Possibly fixed update manager crash
- 198. By Tom Beckmann
-
Cleaned up rev197
- 199. By Tom Beckmann
-
Update to newest granite API for get_close_pixbuf
- 200. By Tom Beckmann
-
Animate windows back in after alt tabbing
- 201. By Rico Tzschichholz
-
Add window-overview feature to expose windows of the current workspace
There are two placements algorithms available (grid, natural) to choose
from. - 202. By Tom Beckmann
-
Assign color used as background color as the stage's background color
- 203. By Tom Beckmann
-
Merge with lp:~gala-dev/gala/zooming to provide shortcuts for zooming
- 204. By Rico Tzschichholz
-
Demand some credit ;-)
- 205. By Tom Beckmann
-
Most probably fix all our worries with minimizing by adding the window actor to the minimizing list (where it was always supposed to be)
- 206. By Tom Beckmann
-
Allow switching to a workspace in workspace view with numbers
- 207. By Rico Tzschichholz
-
build: require valac 0.16.1
- 208. By Tom Beckmann
-
Handle window added and removed while being in window overview
- 209. By Tom Beckmann
-
Move window close button in windowoverview above the windows close button
- 210. By Tom Beckmann
-
Fix workspaces nudging all the time
- 211. By Tom Beckmann
-
Fix scrollbar in workspaceview
- 212. By Tom Beckmann
-
Play a snapback animation when alt-tab is used with only one window
- 213. By Tom Beckmann
-
Fix crash on closing the last window in window overview
- 214. By Tom Beckmann
-
Add some null checks to WorkspaceThumb.
update_ windows to possibly solve a crash - 215. By Tom Beckmann
-
Add null check for window in Plugin.
end_switch_ workspace - 216. By Tom Beckmann
-
Increase workspaceview's timeout for summoning it by holding super to 2s
- 217. By Rico Tzschichholz
-
vapi: Fix return type of Compositor.
get_window_ actors - 218. By Rico Tzschichholz
-
vapi: Meta.Rectangle is just a struct, so remove GBoxed related bindings
- 219. By Tom Beckmann
-
Fix problem with disappearing windows in workspaceview
- 220. By Tom Beckmann
-
Dont block expose after having used it on an empty workspace
- 221. By Tom Beckmann
-
Close window overview when all windows have been closed
- 222. By Tom Beckmann
-
Reconfigure hot corners on monitor changes
- 223. By Rico Tzschichholz
-
vapi: update mutter bindings
- 224. By Tom Beckmann
-
Merge with lp:~gala-dev/gala/window-overview-shadows to provide window shadows in window overview
- 225. By Tom Beckmann
-
Use super+w instead of e to invoke window overview by default
- 226. By Tom Beckmann
-
Allow closing the workspaceview with super+s
- 227. By Tom Beckmann
-
Add Super+0 to switch to the last workspace
- 228. By Rico Tzschichholz
-
vapi: add libmutter.deps
- 229. By Rico Tzschichholz
-
add .bzrignore
- 230. By Rico Tzschichholz
-
build: add simple "make dist" target
- 231. By Rico Tzschichholz
-
Keep references to dummy StyleContext-
widgets - 232. By Rico Tzschichholz
-
workspaceview: clean up scroll_event
- 233. By Rico Tzschichholz
-
workspaceview: clean up initial_
configuration - 234. By Rico Tzschichholz
-
workspaceview: clean up key-release/pressed methods and minor fixes
- 235. By Rico Tzschichholz
-
workspaceview: don't auto-hide if cursor is still hovering overview
- 236. By Tom Beckmann
-
window overview: close with w, not e, to match the default shortcut
- 237. By Tom Beckmann
-
workspaceview: do a check for null on the last workspace in intial_
configuration as there was a crash - 238. By Tom Beckmann
-
plugin: add a menu-duration key to the animation settings
- 239. By Tom Beckmann
-
plugin: interpret 0 animation duration as disabled
- 240. By Tom Beckmann
-
workspaceview: draw a shadow below the workspace thumbs
- 241. By Tom Beckmann
-
windowoverview: close windows with middle click
- 242. By Rico Tzschichholz
-
build: versioned dependency of clutter-1.0 >= 1.9.16, libmutter >= 3.4
- 243. By Rico Tzschichholz
-
utils: add get_icon_
for_application () for convenience - 244. By Rico Tzschichholz
-
vapi: update mutter bindings
- 245. By Rico Tzschichholz
-
windowswitcher: Make sure to destroy Clutter.Clone reference properly
This suppose to prevent the ClutterClone to point to a broken MetaActor
reference on closing a MetaWindow. - 246. By Rico Tzschichholz
-
vapi: use the correct defined variable :\
- 248. By Rico Tzschichholz
-
Refactor and clean up a bit
Unmerged revisions
- 248. By Rico Tzschichholz
-
Refactor and clean up a bit
- 247. By Tom Beckmann
-
Added change-
windows' s-workspace- over-edge- switching
Preview Diff
1 | === modified file 'src/Plugin.vala' |
2 | --- src/Plugin.vala 2012-10-06 12:47:48 +0000 |
3 | +++ src/Plugin.vala 2012-10-15 18:57:18 +0000 |
4 | @@ -66,6 +66,7 @@ |
5 | public override void start () |
6 | { |
7 | var screen = get_screen (); |
8 | + var display = screen.get_display (); |
9 | |
10 | DBus.init (this); |
11 | |
12 | @@ -157,6 +158,98 @@ |
13 | screen.monitors_changed.connect (configure_hotcorners); |
14 | |
15 | BehaviorSettings.get_default ().schema.changed.connect ((key) => update_input_area ()); |
16 | + |
17 | + display.grab_op_begin.connect (handle_display_grap_op_begin); |
18 | + display.grab_op_end.connect (handle_display_grap_op_end); |
19 | + } |
20 | + |
21 | + |
22 | + void handle_display_grap_op_begin (Screen screen, Window window, GrabOp mode) |
23 | + { |
24 | + if (mode != GrabOp.MOVING) |
25 | + return; |
26 | + |
27 | + if (window.get_window_type () != WindowType.NORMAL) |
28 | + return; |
29 | + |
30 | + // If edge-tiling is enabled don't interfere with it |
31 | + if (Prefs.get_edge_tiling ()) |
32 | + return; |
33 | + |
34 | + var actor = window.get_compositor_private () as WindowActor; |
35 | + actor.position_changed.connect (window_position_changed); |
36 | + |
37 | + int x; |
38 | + Gdk.Display.get_default ().get_device_manager ().get_client_pointer ().get_position (null, out x, null); |
39 | + mouse_off_x = (int) (x - actor.x); |
40 | + } |
41 | + |
42 | + |
43 | + void handle_display_grap_op_end (Screen screen, Window window, GrabOp mode) |
44 | + { |
45 | + if (mode != GrabOp.MOVING) |
46 | + return; |
47 | + |
48 | + if (window.get_window_type () != WindowType.NORMAL) |
49 | + return; |
50 | + |
51 | + // If edge-tiling is enabled don't interfere with it |
52 | + if (Prefs.get_edge_tiling ()) |
53 | + return; |
54 | + |
55 | + var actor = window.get_compositor_private () as WindowActor; |
56 | + actor.position_changed.disconnect (window_position_changed); |
57 | + |
58 | + if (move_direction != MotionDirection.UP) { |
59 | + move_window (window, move_direction); |
60 | + |
61 | + //place the window at a nice spot |
62 | + if (move_direction == MotionDirection.LEFT) { |
63 | + window.move (true, 20, (int) actor.y); |
64 | + } else { |
65 | + int swidth, sheight; |
66 | + screen.get_size (out swidth, out sheight); |
67 | + |
68 | + window.move (true, (int) (swidth - actor.width - 20), (int) actor.y); |
69 | + } |
70 | + |
71 | + move_direction = MotionDirection.UP; |
72 | + } |
73 | + |
74 | + Compositor.get_window_group_for_screen (screen).x = 0.0f; |
75 | + } |
76 | + |
77 | + //current direction of window move, UP acts as none |
78 | + MotionDirection move_direction = MotionDirection.UP; |
79 | + //the offset of the mouse to the window, for calculating the mouse's position from window coords |
80 | + int mouse_off_x; |
81 | + //track the window position in a grab op for edge workspace switching |
82 | + void window_position_changed (Meta.WindowActor actor) |
83 | + { |
84 | + var screen = actor.get_meta_window().get_screen (); |
85 | + var active = screen.get_active_workspace (); |
86 | + |
87 | + var mouse_x = mouse_off_x + actor.x; |
88 | + int width, height; |
89 | + screen.get_size (out width, out height); |
90 | + |
91 | + if (mouse_x > width - 100) { |
92 | + if (move_direction != MotionDirection.RIGHT && |
93 | + !(active.n_windows == 1 && active.index () + 1 == screen.n_workspaces - 1)) { |
94 | + Compositor.get_window_group_for_screen (screen).animate (Clutter.AnimationMode.LINEAR, 100, x:-100.0f); |
95 | + move_direction = MotionDirection.RIGHT; |
96 | + } |
97 | + } else if (mouse_x < 100) { |
98 | + if (move_direction != MotionDirection.LEFT && active.index () != 0) { |
99 | + Compositor.get_window_group_for_screen (screen).animate (Clutter.AnimationMode.LINEAR, 100, x:100.0f); |
100 | + move_direction = MotionDirection.LEFT; |
101 | + } |
102 | + } else { |
103 | + if (move_direction != MotionDirection.UP) { |
104 | + Compositor.get_window_group_for_screen (screen).animate (Clutter.AnimationMode.LINEAR, 100, x:0.0f); |
105 | + move_direction = MotionDirection.UP; |
106 | + } |
107 | + } |
108 | } |
109 | |
110 | void configure_hotcorners () |
Here's a short video demonstrating it: www.youtube. com/watch? v=1PCy6n9ZxpA