Vityacv / window-list-mod

7 stars 2 forks source link

Update to Gnome 3.38 (temporary patch inside) #10

Open cpg314 opened 3 years ago

cpg314 commented 3 years ago

The current release of the patches (for Gnome 3.36) doesn't work on Gnome 3.38.

I didn't manage to modify the patches in the repo so that they work on the new version (https://extensions.gnome.org/extension/602/window-list/), but the patch below applied on the 3.36 release of window-list-mod works fine on Gnome 3.38:

--- orig/extension.js   2020-03-10 23:27:07.000000000 +0100
+++ extension.js    2020-10-21 21:49:53.810171000 +0200
@@ -253,13 +253,13 @@

         super._init({
             style_class: 'window-button',
-            x_fill: true,
-            y_fill: true,
+            x_expand: true,
+            y_expand: true,
             can_focus: true,
             button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
         });

-        this.connect('allocation-changed',
+        this.connect('notify::allocation',
             this._updateIconGeometry.bind(this));
         this.connect('clicked', this._onClicked.bind(this));
         this.connect('destroy', this._onDestroy.bind(this));
@@ -524,7 +524,7 @@

         this._singleWindowTitle = new St.Bin({
             x_expand: true,
-            y_fill: true,
+            y_expand: true,
             x_align: St.Align.START,
         });
         stack.add_actor(this._singleWindowTitle);
@@ -733,25 +733,6 @@
             gbox.add_child(panel_items[0])
         }

-//        if (time_indicator === null) {
-//            time_indicator = Main.panel._centerBox.get_children()[0];
-//            Main.panel._centerBox.remove_actor(time_indicator);
-//            gbox.add_child(time_indicator)
-//        }
-//        if (lang_indicator === null) {
-//            lang_indicator = Main.panel._rightBox.get_children()[2];
-//            Main.panel._rightBox.remove_actor(lang_indicator);
-//            gbox.add_child(lang_indicator);
-//        }
-//        if (tools_indicator === null) {
-//            tools_indicator = Main.panel._rightBox.get_children()[3];
-//            var x =tools_indicator.get_child()
-//            tools_indicator.remove_actor(tools_indicator.get_child())
-////            Main.panel._rightBox.remove_actor(tools_indicator);
-//            gbox.add_child(x);
-//        }
-
-
     } else{
         if (center_orig_items !== null) {
             let items = Main.panel._centerBox.get_children();
@@ -773,15 +754,6 @@
                 Main.panel._rightBox.add_child(right_orig_items[i])
             }
         }
-//        if (time_indicator !== null) {
-//            //gbox.remove_child(time_indicator)
-//            //Main.panel._centerBox.set_child(time_indicator);
-//        }
-//        if (lang_indicator !== null) {
-////            gbox.remove_child(lang_indicator)
-////            Main.panel._rightBox.get_children()[2] = lang_indicator;
-//            //Main.panel._rightBox.set_child(lang_indicator);
-//        }

         Main.panel.set_height(panelh);
         Main.panel.set_opacity(panelOpacity);
@@ -1115,10 +1087,7 @@
         let button = new AppButton(app, this._perMonitor, this._monitor.index);
         this._settings.bind('display-all-workspaces',
             button, 'ignore-workspace', Gio.SettingsBindFlags.GET);
-        this._windowList.layout_manager.pack(button,
-            true, true, true,
-            Clutter.BoxAlignment.START,
-            Clutter.BoxAlignment.START);
+        this._windowList.add_child(button);
     }

     _removeApp(app) {
@@ -1145,10 +1114,7 @@
         let button = new WindowButton(win, this._perMonitor, this._monitor.index);
         this._settings.bind('display-all-workspaces',
             button, 'ignore-workspace', Gio.SettingsBindFlags.GET);
-        this._windowList.layout_manager.pack(button,
-            true, true, true,
-            Clutter.BoxAlignment.START,
-            Clutter.BoxAlignment.START);
+        this._windowList.add_child(button);
     }

     _onWindowRemoved(ws, win) {

--- orig/windowPicker.js    2020-03-10 20:10:36.000000000 +0100
+++ windowPicker.js 2020-10-21 21:30:23.306344000 +0200
@@ -56,8 +56,8 @@

     _onWorkAreasChanged() {
         let { primaryIndex } = Main.layoutManager;
-        let workarea = Main.layoutManager.getWorkAreaForMonitor(primaryIndex);
-        this.setWorkspacesFullGeometry(workarea);
+        this._actualGeometry = Main.layoutManager.getWorkAreaForMonitor(primaryIndex);
+        this._syncWorkspacesActualGeometry();
     }

     _updateAdjustment() {
@@ -286,8 +286,8 @@
             style_class: 'window-picker-toggle',
             child: iconBin,
             visible: !Main.sessionMode.hasOverview,
-            x_fill: true,
-            y_fill: true,
+            x_expand: true,
+            y_expand: true,
             toggle_mode: true,
         });

--- orig/workspaceIndicator.js  2020-03-10 20:10:36.000000000 +0100
+++ workspaceIndicator.js   2020-10-21 20:58:06.497007000 +0200
@@ -106,8 +106,8 @@
                 layout_manager: new Clutter.BinLayout(),
                 clip_to_allocation: true,
             }),
-            x_fill: true,
-            y_fill: true,
+            x_expand: true,
+            y_expand: true,
         });

         this.connect('destroy', this._onDestroy.bind(this));