Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions maximus-two-wilfinitlike.gmail.com/app_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ function updateAppMenu() {
}

LOG('Override title ' + title);
appMenu._label.setText(title);
if (appMenu._label.set_text) {
// Gnome Shell 3.16
appMenu._label.set_text(title);
} else if (appMenu._label.setText){
appMenu._label.setText(title);
}
tooltip.text = title;

return false;
Expand Down Expand Up @@ -70,8 +75,10 @@ function changeActiveWindow(win) {
* Focus change
*/
function onFocusChange() {
if (!Shell.WindowTracker.get_default().focus_app &&
global.stage_input_mode == Shell.StageInputMode.FOCUSED) {
let input_mode_check = (global.stage_input_mode === undefined)
? true
: global.stage_input_mode == Shell.StageInputMode.FOCUSED;
if (!Shell.WindowTracker.get_default().focus_app && input_mode_check) {
// If the app has just lost focus to the panel, pretend
// nothing happened; otherwise you can't keynav to the
// app menu.
Expand Down Expand Up @@ -109,9 +116,9 @@ function onHover(actor) {
if (!showTooltip) {
WARN('showTooltip is false and delay callback ran.');
}
let label = appMenu._label._label;


// In Shell 3.16 it's appMenu._label
let label = appMenu._label._label || appMenu._label;
if(!label.get_clutter_text().get_layout().is_ellipsized()) {
// Do not need to hide.
tooltipDelayCallbackID = 0;
Expand Down
21 changes: 20 additions & 1 deletion maximus-two-wilfinitlike.gmail.com/decoration.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,26 @@ function setHideTitlebar(win, hide, stopAdding) {
cmd[2] = win.get_title();
}
LOG(cmd.join(' '));
Util.spawn(cmd);

// Run xprop
[success, pid] = GLib.spawn_async(null, cmd, null,
GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD,
null);

// After xprop completes, unmaximize and remaximize any window
// that is already maximized. It seems that setting the xprop on
// a window that is already maximized doesn't actually take
// effect immediately but it needs a focuse change or other
// action to force a relayout. Doing unmaximize and maximize
// here seems to be an uninvasive way to handle this. This needs
// to happen _after_ xprop completes.
GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, function () {
let flags = win.get_maximized();
if (flags == Meta.MaximizeFlags.BOTH) {
win.unmaximize(flags);
win.maximize(flags);
}
});
}

/**** Callbacks ****/
Expand Down
2 changes: 1 addition & 1 deletion maximus-two-wilfinitlike.gmail.com/metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"shell-version": ["3.8", "3.10", "3.12", "3.14"],"uuid": "maximus-two@wilfinitlike.gmail.com", "name": "Maximus Two", "description": "Removes the title bar on maximised windows.\n Based on Pixel Saver (use Window Buttons to get the buttons (you can configure them then)\n You should be albe to use the original Maximus extension if you have 3.4 or 3.6", "url": "https://github.com/wilfm/GnomeExtensionMaximusTwo", "version": 2}
{"shell-version": ["3.8", "3.10", "3.12", "3.14", "3.16"],"uuid": "maximus-two@wilfinitlike.gmail.com", "name": "Maximus Two", "description": "Removes the title bar on maximised windows.\n Based on Pixel Saver (use Window Buttons to get the buttons (you can configure them then)\n You should be albe to use the original Maximus extension if you have 3.4 or 3.6", "url": "https://github.com/wilfm/GnomeExtensionMaximusTwo", "version": 2}