Skip to content

Commit

Permalink
merged BUFIX for #1 into gnome 3.2 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mathematicalcoffee committed Aug 20, 2012
2 parents bd1b3b9 + cc19607 commit 2cd1600
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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))
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions window_buttons@biox.github.com/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2cd1600

Please sign in to comment.