Aug. 12th, 2009

elfs: (Default)

For reasons I won’t go into, I’ve had to re-activate my “professional” login on my laptop.  In order to distinguish it from the Elf user, which uses Enlightenment, I use Gnome when at the office.  And one thing I absolutely loathe about Metacity, the Gnome window manager, is that when you’re flipping between workspaces, you cannot roll from the last workspace to the first, or vice versa.  You must flip all the way back.

This patch, to the file workspace.c, changes that:

--- workspace.c~        2005-07-13 10:06:21.000000000 -0700
+++ workspace.c 2006-01-06 21:11:36.000000000 -0800
@@ -758,13 +758,13 @@
     }

   if (layout.current_col < 0)
-    layout.current_col = 0;
-  if (layout.current_col >= layout.cols)
     layout.current_col = layout.cols - 1;
+  if (layout.current_col >= layout.cols)
+    layout.current_col = 0;
   if (layout.current_row < 0)
-    layout.current_row = 0;
-  if (layout.current_row >= layout.rows)
     layout.current_row = layout.rows - 1;
+  if (layout.current_row >= layout.rows)
+    layout.current_row = 0;

   i = layout.grid[layout.current_row * layout.cols + layout.current_col];

Why this isn’t implemented by default is beyond me. This patch has worked it Metacity 2.x since the beginning, and works great with Metacity 2.24.

This entry was automatically cross-posted from Elf's technical journal, ElfSternberg.com

Profile

elfs: (Default)
Elf Sternberg

May 2025

S M T W T F S
    123
45678910
111213141516 17
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 29th, 2025 05:07 am
Powered by Dreamwidth Studios