diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ef70cd3 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +#============================================================================= +UUID=window_buttons@biox.github.com +FILES=metadata.json *.js stylesheet.css schemas themes +#============================================================================= +default_target: all +.PHONY: clean all zip + +clean: + @rm -f $(UUID).zip $(UUID)/schemas/gschemas.compiled + +# compile the schemas +all: clean + @if [ -d $(UUID)/schemas ]; then \ + glib-compile-schemas $(UUID)/schemas; \ + fi + +# to put on the Downloads page +zip: all + zip -rq $(UUID).zip $(FILES:%=$(UUID)/%) + +# to upload to e.g.o +dev-zip: all + (cd $(UUID); \ + zip -rq ../$(UUID).zip $(FILES)) diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..c42ff09 Binary files /dev/null and b/icon.png differ diff --git a/window_buttons@biox.github.com/extension.js b/window_buttons@biox.github.com/extension.js index 0ad51db..df433d2 100644 --- a/window_buttons@biox.github.com/extension.js +++ b/window_buttons@biox.github.com/extension.js @@ -384,7 +384,8 @@ WindowButtons.prototype = { let windows = workspace.list_windows(); let maxwin = false; for (let i = windows.length - 1; i >= 0; --i) { - if (windows[i].get_maximized() && !windows[i].minimized) { + if (windows[i].get_maximized() === Meta.MaximizeFlags.BOTH && + !windows[i].minimized) { maxwin = windows[i]; break; } @@ -401,7 +402,7 @@ WindowButtons.prototype = { uppermost.minimize(); } else { // If the active window is maximized, minimize it - if (activeWindow.get_maximized()) { + if (activeWindow.get_maximized() === Meta.MaximizeFlags.BOTH) { activeWindow.minimize(); // If the active window is not maximized, minimize the uppermost // maximized window if the option to only control maximized windows @@ -433,7 +434,7 @@ WindowButtons.prototype = { uppermost.activate(global.get_current_time()); } else { // If the active window is maximized, unmaximize it - if (activeWindow.get_maximized()) { + if (activeWindow.get_maximized() === Meta.MaximizeFlags.BOTH) { activeWindow.unmaximize(Meta.MaximizeFlags.BOTH); // If the active window is not maximized, unmaximize the uppermost // maximized window if the option to only control maximized windows @@ -462,7 +463,7 @@ WindowButtons.prototype = { uppermost.delete(global.get_current_time()); } else { // If the active window is maximized, close it - if (activeWindow.get_maximized()) { + if (activeWindow.get_maximized() === Meta.MaximizeFlags.BOTH) { activeWindow.delete(global.get_current_time()); // If the active window is not maximized, close the uppermost // maximized window if the option to only control maximized windows