timbertson / shellshape

tiling window manager extension for gnome-shell
http://gfxmonk.net/shellshape/
Other
396 stars 38 forks source link

Current master is broken for Gnome 3.10.4 (Ubuntu 14.04.2) #156

Closed duffolonious closed 9 years ago

duffolonious commented 9 years ago

get_frame_rect() does not exist in Gnome 3.10: //start snip (gnome-shell:11152): Gjs-WARNING **: JS ERROR: TypeError: this.meta_window.get_frame_rect is not a function Window.prototype.rect@/home/duff0097/.local/share/gnome-shell/extensions/shellshape@gfxmonk.net/extension.js:1853 //end snip

This pactch fixes the problem: //start snip

$ git diff src/gjs/mutter_window.ts
diff --git a/src/gjs/mutter_window.ts b/src/gjs/mutter_window.ts
index 64cf1f1..531c9c4 100644
--- a/src/gjs/mutter_window.ts
+++ b/src/gjs/mutter_window.ts
@@ -203,7 +203,7 @@ module MutterWindow {

                // dimensions
                rect():Tiling.Rect {
-                       var r:any = this.meta_window.get_frame_rect();
+                       var r:any = this.meta_window.get_outer_rect();
                        return {
                                pos:  { x: r.x, y:r.y },
                                size: { x: r.width, y:r.height }

//end snip

Dunno if there is a right way to deal with this - perhaps check gnome version? or just test to see if the function is defined? Nonetheless, without this change nothing appears to work.

timbertson commented 9 years ago

Thanks for the report. This code was changed (in the opposite direction) for 3.16 compatibility, because get_outer_rect has been removed.

So it sounds like the best fix is to just orphan gnome 3.10 on the commit 55423e1b45c2903e6db0a6f74ddc278e36758edd. I'll make a branch for this, and drop 3.10 compatibility from the master branch.