diff --git a/marco_1.10-windows-keybindings.patch b/marco_1.10-windows-keybindings.patch new file mode 100644 index 0000000..f1f8ab7 --- /dev/null +++ b/marco_1.10-windows-keybindings.patch @@ -0,0 +1,91 @@ +Index: marco-1.8.3+dfsg1/src/core/prefs.c +=================================================================== +--- marco-1.8.3+dfsg1.orig/src/core/prefs.c ++++ marco-1.8.3+dfsg1/src/core/prefs.c +@@ -160,7 +160,9 @@ static void button_layout_handler (MetaP + static gboolean update_binding (MetaKeyPref *binding, + gchar *value); + +-static void init_bindings (void); ++static void init_bindings (GSettings *); ++static void init_screen_bindings (void); ++static void init_window_bindings (void); + static void init_commands (void); + static void init_workspace_names (void); + +@@ -907,7 +909,8 @@ meta_prefs_init (void) + handle_preference_init_string (); + handle_preference_init_int (); + +- init_bindings (); ++ init_screen_bindings (); ++ init_window_bindings (); + init_commands (); + init_workspace_names (); + } +@@ -1584,32 +1587,32 @@ static MetaKeyPref key_bindings[] = { + #undef keybind + + static void +-init_bindings (void) ++init_bindings (GSettings *settings) + { +- const char *prefix[] = { +- KEY_WINDOW_BINDINGS_SCHEMA, +- KEY_SCREEN_BINDINGS_SCHEMA, +- NULL +- }; +- int i; + gchar **list = NULL; + gchar *str_val = NULL; +- GSettings *bindings_settings = NULL; + +- for (i = 0; prefix[i]; i++) ++ list = g_settings_list_keys (settings); ++ while (*list != NULL) + { +- bindings_settings = g_settings_new (prefix [i]); +- list = g_settings_list_keys (bindings_settings); +- while (*list != NULL) +- { +- str_val = g_settings_get_string (bindings_settings, *list); +- update_key_binding (*list, str_val); +- list++; +- } ++ str_val = g_settings_get_string (settings, *list); ++ update_key_binding (*list, str_val); ++ list++; + } ++ + g_free (str_val); +- g_object_unref (bindings_settings); ++} + ++static void ++init_screen_bindings (void) ++{ ++ init_bindings (settings_screen_bindings); ++} ++ ++static void ++init_window_bindings (void) ++{ ++ init_bindings (settings_window_bindings); + } + + static void +@@ -1625,6 +1628,7 @@ init_commands (void) + update_command (*list, str_val); + list++; + } ++ + g_free (str_val); + } + +@@ -1641,6 +1645,7 @@ init_workspace_names (void) + update_workspace_name (*list, str_val); + list++; + } ++ + g_free (str_val); + } diff --git a/marco_1.10-workspaces-keybindings.patch b/marco_1.10-workspaces-keybindings.patch new file mode 100644 index 0000000..72df676 --- /dev/null +++ b/marco_1.10-workspaces-keybindings.patch @@ -0,0 +1,14 @@ +diff --git a/src/core/prefs.c b/src/core/prefs.c +index 0943172..d5a3a15 100644 +--- a/src/core/prefs.c ++++ b/src/core/prefs.c +@@ -972,7 +972,7 @@ change_notify (GSettings *settings, + + g_free(str); + } +- else if (g_strcmp0 (schema_name, KEY_WORKSPACE_NAME_SCHEMA)) ++ else if (g_strcmp0 (schema_name, KEY_WORKSPACE_NAME_SCHEMA) == 0) + { + gchar *str; + str = g_settings_get_string (settings, key); + diff --git a/marco_add-tile-keybinds-1.patch b/marco_add-tile-keybinds-1.patch new file mode 100644 index 0000000..66dbb36 --- /dev/null +++ b/marco_add-tile-keybinds-1.patch @@ -0,0 +1,70 @@ +diff --git a/src/50-marco-window-key.xml.in b/src/50-marco-window-key.xml.in +index 2dcfabc..0b3ecef 100644 +--- a/src/50-marco-window-key.xml.in ++++ b/src/50-marco-window-key.xml.in +@@ -70,6 +70,14 @@ + _description="Maximize window horizontally" /> + + ++ ++ ++ ++ + +diff --git a/src/include/all-keybindings.h b/src/include/all-keybindings.h +index 5b03028..a14777e 100644 +--- a/src/include/all-keybindings.h ++++ b/src/include/all-keybindings.h +@@ -252,6 +252,11 @@ keybind (maximize-vertically, handle_maximize_vertically, 0, + keybind (maximize-horizontally, handle_maximize_horizontally, 0, + BINDING_PER_WINDOW) + ++keybind (tile-to-side-e, handle_toggle_tiled, META_TILE_RIGHT, ++ BINDING_PER_WINDOW) ++keybind (tile-to-side-w, handle_toggle_tiled, META_TILE_LEFT, ++ BINDING_PER_WINDOW) ++ + keybind (move-to-corner-nw, handle_move_to_corner_nw, 0, + BINDING_PER_WINDOW) + keybind (move-to-corner-ne, handle_move_to_corner_ne, 0, +diff --git a/src/marco.convert b/src/marco.convert +index eb1f623..21c8799 100644 +--- a/src/marco.convert ++++ b/src/marco.convert +@@ -142,6 +142,8 @@ raise = /apps/marco/window_keybindings/raise + lower = /apps/marco/window_keybindings/lower + maximize-vertically = /apps/marco/window_keybindings/maximize_vertically + maximize-horizontally = /apps/marco/window_keybindings/maximize_horizontally ++tile-to-side-e = /apps/marco/window_keybindings/tile_to_side_e ++tile-to-side-w = /apps/marco/window_keybindings/tile_to_side_w + move-to-corner-nw = /apps/marco/window_keybindings/move_to_corner_nw + move-to-corner-ne = /apps/marco/window_keybindings/move_to_corner_ne + move-to-corner-sw = /apps/marco/window_keybindings/move_to_corner_sw +diff --git a/src/org.mate.marco.gschema.xml b/src/org.mate.marco.gschema.xml +index a072538..4108355 100644 +--- a/src/org.mate.marco.gschema.xml ++++ b/src/org.mate.marco.gschema.xml +@@ -838,6 +838,16 @@ + Maximize window horizontally + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + ++ ++ 'disabled' ++ Tile window to east (right) side of screen ++ The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. ++ ++ ++ 'disabled' ++ Tile window to west (left) side of screen ++ The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. ++ + + 'disabled' + Move window to north-west (top left) corner + diff --git a/marco_add-tile-keybinds-2.patch b/marco_add-tile-keybinds-2.patch new file mode 100644 index 0000000..2491d52 --- /dev/null +++ b/marco_add-tile-keybinds-2.patch @@ -0,0 +1,54 @@ +diff --git a/src/core/keybindings.c b/src/core/keybindings.c +index 041d96f..c52fe3b 100644 +--- a/src/core/keybindings.c ++++ b/src/core/keybindings.c +@@ -3050,7 +3050,6 @@ handle_toggle_above (MetaDisplay *display, + meta_window_make_above (window); + } + +-/* TODO: actually use this keybinding, without messing up the existing keybinding schema */ + static void + handle_toggle_tiled (MetaDisplay *display, + MetaScreen *screen, +@@ -3063,14 +3062,20 @@ handle_toggle_tiled (MetaDisplay *display, + if ((META_WINDOW_TILED_LEFT (window) && mode == META_TILE_LEFT) || + (META_WINDOW_TILED_RIGHT (window) && mode == META_TILE_RIGHT)) + { +- window->tile_mode = META_TILE_NONE; +- + if (window->saved_maximize) +- meta_window_maximize (window, META_MAXIMIZE_VERTICAL | +- META_MAXIMIZE_HORIZONTAL); +- else +- meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL | ++ { ++ window->tile_mode = META_TILE_MAXIMIZED; ++ window->tile_monitor_number = meta_screen_get_xinerama_for_window (window->screen, window)->number; ++ meta_window_maximize (window, META_MAXIMIZE_VERTICAL | + META_MAXIMIZE_HORIZONTAL); ++ } ++ else ++ { ++ window->tile_mode = META_TILE_NONE; ++ window->tile_monitor_number = -1; ++ meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL | ++ META_MAXIMIZE_HORIZONTAL); ++ } + } + else if (meta_window_can_tile (window)) + { +@@ -3082,6 +3087,13 @@ handle_toggle_tiled (MetaDisplay *display, + * we just set the flag and rely on meta_window_tile() syncing it to + * save an additional roundtrip. + */ ++ ++ /* If we skip meta_window_unmaximize we have to manually reset the ++ * window->saved_maximize flag. ++ */ ++ if (!META_WINDOW_MAXIMIZED (window)) ++ window->saved_maximize = FALSE; ++ + window->maximized_horizontally = FALSE; + meta_window_tile (window); + } + diff --git a/marco_add-tile-keybinds-3.patch b/marco_add-tile-keybinds-3.patch new file mode 100644 index 0000000..d7b1fde --- /dev/null +++ b/marco_add-tile-keybinds-3.patch @@ -0,0 +1,37 @@ +diff --git a/src/core/window.c b/src/core/window.c +index 95d4988..e820a26 100644 +--- a/src/core/window.c ++++ b/src/core/window.c +@@ -2670,14 +2670,9 @@ meta_window_maximize (MetaWindow *window, + if (window->tile_mode != META_TILE_NONE) + { + saved_rect = &window->saved_rect; +- window->maximized_vertically = FALSE; +- } +- +- if (window->tile_mode != META_TILE_NONE) +- { +- saved_rect = &window->saved_rect; + + window->maximized_vertically = FALSE; ++ window->tile_mode = META_TILE_NONE; + } + + meta_window_maximize_internal (window, +@@ -2780,15 +2775,6 @@ meta_window_unmaximize (MetaWindow *window, + /* At least one of the two directions ought to be set */ + gboolean unmaximize_horizontally, unmaximize_vertically; + +- /* Restore tiling if necessary */ +- if (window->tile_mode == META_TILE_LEFT || +- window->tile_mode == META_TILE_RIGHT) +- { +- window->maximized_horizontally = FALSE; +- meta_window_tile (window); +- return; +- } +- + unmaximize_horizontally = directions & META_MAXIMIZE_HORIZONTAL; + unmaximize_vertically = directions & META_MAXIMIZE_VERTICAL; + g_assert (unmaximize_horizontally || unmaximize_vertically); + diff --git a/marco_add-tile-keybinds-4.patch b/marco_add-tile-keybinds-4.patch new file mode 100644 index 0000000..6244e90 --- /dev/null +++ b/marco_add-tile-keybinds-4.patch @@ -0,0 +1,14 @@ +diff --git a/src/core/window.c b/src/core/window.c +index e820a26..6f5a5fe 100644 +--- a/src/core/window.c ++++ b/src/core/window.c +@@ -2746,7 +2746,7 @@ meta_window_can_tile (MetaWindow *window) + MetaRectangle tile_area; + + /*if (!META_WINDOW_ALLOWS_RESIZE (window))*/ +- if (!META_WINDOW_ALLOWS_RESIZE (window)) ++ if (!meta_window_can_tile_maximized (window) || window->shaded) + return FALSE; + + monitor = meta_screen_get_current_xinerama (window->screen); + diff --git a/marco_ignore-adding-a-window-if-already-present.patch b/marco_ignore-adding-a-window-if-already-present.patch deleted file mode 100644 index 035d571..0000000 --- a/marco_ignore-adding-a-window-if-already-present.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c -index 805002e..6294e9d 100644 ---- a/src/compositor/compositor-xrender.c -+++ b/src/compositor/compositor-xrender.c -@@ -1821,6 +1821,10 @@ add_win (MetaScreen *screen, - - if (xwindow == info->output) - return; -+ -+ /* If already added, ignore */ -+ if (find_window_for_screen (screen, xwindow) != NULL) -+ return; - - cw = g_new0 (MetaCompWindow, 1); - cw->screen = screen; - diff --git a/marco_rendering-with-gtk3.14.patch b/marco_rendering-with-gtk3.14.patch deleted file mode 100644 index bc3c4e0..0000000 --- a/marco_rendering-with-gtk3.14.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c -index dbd7bd9..9bf9d8d 100644 ---- a/src/compositor/compositor-xrender.c -+++ b/src/compositor/compositor-xrender.c -@@ -911,6 +911,12 @@ window_has_shadow (MetaCompWindow *cw) - } - } - -+ /* Do not add shadows to ARGB windows */ -+ if (cw->mode == WINDOW_ARGB) { -+ meta_verbose ("Window has no shadow as it is ARGB\n"); -+ return FALSE; -+ } -+ - /* Never put a shadow around shaped windows */ - if (cw->shaped) { - meta_verbose ("Window has no shadow as it is shaped\n"); diff --git a/marco_tile-preview-invalidate-window-before-showing.patch b/marco_tile-preview-invalidate-window-before-showing.patch new file mode 100644 index 0000000..fa78b61 --- /dev/null +++ b/marco_tile-preview-invalidate-window-before-showing.patch @@ -0,0 +1,22 @@ +diff --git a/src/ui/tile-preview.c b/src/ui/tile-preview.c +index 71b2e29..e85d2e6 100644 +--- a/src/ui/tile-preview.c ++++ b/src/ui/tile-preview.c +@@ -271,7 +271,6 @@ meta_tile_preview_show (MetaTilePreview *preview, + && preview->tile_rect.height == tile_rect->height) + return; /* nothing to do */ + +- gtk_widget_show (preview->preview_window); + window = gtk_widget_get_window (preview->preview_window); + #if GTK_CHECK_VERSION (3, 0, 0) + meta_core_lower_beneath_focus_window (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), +@@ -287,6 +286,8 @@ meta_tile_preview_show (MetaTilePreview *preview, + + gdk_window_invalidate_rect (window, &old_rect, FALSE); + ++ gtk_widget_show (preview->preview_window); ++ + preview->tile_rect = *tile_rect; + + gdk_window_move_resize (window, +