[mate-window-manager] add mate-window-manager_window-snapping-top-screen.patch

Wolfgang Ulbrich raveit65 at fedoraproject.org
Wed Nov 13 18:13:09 UTC 2013


commit 4c3c824607e260e7114e795d5cfb2230159e3d15
Author: raveit65 <chat-to-me at raveit.de>
Date:   Wed Nov 13 19:13:22 2013 +0100

    add mate-window-manager_window-snapping-top-screen.patch

 ...window-manager_window-snapping-top-screen.patch |   46 ++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/mate-window-manager_window-snapping-top-screen.patch b/mate-window-manager_window-snapping-top-screen.patch
new file mode 100644
index 0000000..335dadf
--- /dev/null
+++ b/mate-window-manager_window-snapping-top-screen.patch
@@ -0,0 +1,46 @@
+diff --git a/src/core/window-private.h b/src/core/window-private.h
+index 02c518e..f88f8a4 100644
+--- a/src/core/window-private.h
++++ b/src/core/window-private.h
+@@ -86,7 +86,8 @@ typedef gboolean (*MetaWindowForeachFunc) (MetaWindow *window,
+ typedef enum {
+   META_TILE_NONE,
+   META_TILE_LEFT,
+-  META_TILE_RIGHT
++  META_TILE_RIGHT,
++  META_TILE_MAXIMIZE
+ } MetaTileMode;
+ 
+ struct _MetaWindow
+diff --git a/src/core/window.c b/src/core/window.c
+index 7a7f6be..cd54e5b 100644
+--- a/src/core/window.c
++++ b/src/core/window.c
+@@ -6966,7 +6966,7 @@ static void meta_window_apply_session_info (MetaWindow                  *window,
+    * because it's about the right size
+    */
+ 
+-#define DRAG_THRESHOLD_TO_SHAKE_THRESHOLD_FACTOR 6
++#define DRAG_THRESHOLD_TO_SHAKE_THRESHOLD_FACTOR 2
+   shake_threshold = meta_ui_get_drag_threshold (window->screen->ui) *
+     DRAG_THRESHOLD_TO_SHAKE_THRESHOLD_FACTOR;
+ 
+@@ -6995,6 +6995,8 @@ static void meta_window_apply_session_info (MetaWindow                  *window,
+           else if (x >= work_area.x + work_area.width - shake_threshold &&
+                    x < (monitor->rect.x + monitor->rect.width))
+             window->tile_mode = META_TILE_RIGHT;
++          else if ((y >= monitor->rect.y) && (y < work_area.y + shake_threshold))
++            window->tile_mode = META_TILE_MAXIMIZE;
+           else
+             window->tile_mode = META_TILE_NONE;
+         }
+@@ -7527,6 +7529,8 @@ static void meta_window_apply_session_info (MetaWindow                  *window,
+             {
+               if (window->tile_mode != META_TILE_NONE)
+                 meta_window_tile (window);
++              else if (window->tile_mode == META_TILE_MAXIMIZE)
++                meta_window_maximize (window, META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
+               else if (event->xbutton.root == window->screen->xroot)
+                 update_move (window, event->xbutton.state & ShiftMask,
+                              event->xbutton.x_root, event->xbutton.y_root);
+


More information about the scm-commits mailing list