On request of GNOME Classic users, we add GNOME2-like workspace previews
when using a horizontal workspace layout. The previews scale a lot worse
than the menu though, with the risk that they take up all the available
width in extreme cases.
Address this by also taking the number of workspaces into account, and
switch to the menu when we have more than six.
This is particularly important now that we switched to a horizontal
layout by default.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/165>
On request of GNOME Classic users, we add GNOME2-like workspace previews
when using a horizontal workspace layout. The previews scale a lot worse
than the menu though, with the risk that they take up all the available
width in extreme cases.
Address this by also taking the number of workspaces into account, and
switch to the menu when we have more than six.
This is particularly important now that we switched to a horizontal
layout by default.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/165>
More unsurprising breakage:
- the workspace layout/strategy relation has been cleaned up
- window previews now include an icon that influences the
title position
- window previews scale up on hover, which again influences
the title position
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/164>
Visibility changes are now handled internally, without an easy way
for us to hook into. We can resort to a hack though, as the gesture
action to bring up the keyboard is only enabled while the keyboard
is hidden.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/160>
This fixes a particular case of mutter#992.
Although gnome-shell will also be softened to not crash in future, it's
also a good idea for the extension to explicitly decide how it wants to
handle windows that are already on all workspaces.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/157>
GTK4 removes the generic GtkWidget API for accessing an inserted
action group, so we need an alternative for tracking the currently
selected theme.
Using the underlying GSettings object looks like the easiest option,
so do that.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
We follow the rule of not putting generated files under version
control, but that means drawing in additional build-time dependencies.
We can reduce those when building from a released tarball by
generating the stylesheets at dist time though, so do that.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/150>
I messed up and released 40.alpha at the same time as 3.38.2, when it's
supposed to be in January. In order to re-align with the schedule, change
the upcoming version to 40.alpha2 so we don't have to skip a release and
will be back on track in time of 40.beta.
If a user is in the middle of a drag in the window list and the
window list associated with the drag gets destroyed, the drag
monitor gets leaked.
Later when the drag motion is processed, spew goes to the log:
clutter_actor_contains: assertion 'CLUTTER_IS_ACTOR (self)' failed
Examples of triggers for this bug:
- The monitor topology changes
- The screen gets locked during the drag
This commit fixes the spew and the leak by ensuring any pending
drag monitoring is disabled when the window lists are destroyed.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/145>
only/except keywords where deperecated in favor of rules.
Since we started using GNOME/gnome-shell!1492 it introduced
a second pipeline being run for each commit.
Detached pipelines are the only way to access CI_MERGE_REQUEST_*
variables, and if we disable normal pipelines you will need to
create wip/spam MRs in order to run the tests.
This reworked rules makes it so, the normal pipeline needs manual
interaction to be started, and the detached/MR pipleines is always
run.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/144>
We modify gnome-shell's workspace tracker to only remove empty
workspaces from the end. However we currently don't take into
account that sticky windows appear on all workspaces, so those
are preventing any workspace from getting removed at the moment.
Exclude them when determining whether a workspace is empty to
get the expected behavior.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/135
The current code positions window previews explicitly using a fixed
layout manager. For that it relies on a valid parent allocation,
which is error-prone and frequently results in warnings.
Address this by moving the positioning code into a custom layout
manager, and only update the visibility from the window preview.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/260
The current code positions window previews explicitly using a fixed
layout manager. For that it relies on a valid parent allocation,
which is error-prone and frequently results in warnings.
Address this by moving the positioning code into a custom layout
manager, and only update the visibility from the window preview.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/260
Although window-list checks the 'skip-taskbar' property when a
window is added to the desktop to decide wether it should be
shown in the bar or not, it doesn't honor that when the property
is changed after a window has already been added. Since the new
WaylandClient API allows to change this property for already
mapped windows, supporting this is a good idea.
This patch fixes this.
Fix https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/130
Originally the classic session replaced `gnome-shell.desktop` with
`gnome-shell-classic.desktop` (to add the --mode=classic parameter)
and added `nautilus-classic.desktop` (to force on desktop icons).
Neither is the case anymore (and hasn't been for years): Nowadays the
only expected difference is the GNOME_SHELL_SESSION_MODE variable and
the DesktopNames field, which are both set from the session .desktop
file rather than the gnome-session session definition.
Any difference in the latter - like not starting the USBProtection
plugin and missing systemd user session support - are bugs. The
easiest way to avoid those in the future is by removing the obsolete
duplication that enables them, so do just that.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/126
Since PanelMenu.Button started to inherit from St.Widget, the custom
_allocate() function isn't called anymore.
Simply changing the function to vfunc_allocate() doesn't work as other
changes happened in the meantime, so for now just remove it altogether.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/124
The current widget uses UI patterns that are reminiscent of GNOME 2.
It doesn't take a lot to make it look more modern: Simply giving the
radio group a distinct background and border allows us to move the
whole UI to the center, making the dialog more balanced and visually
pleasing.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/121
While we don't endorse or support 3rd party theming, the extension
exists and is actively used. However right now the most convenient
way of setting it up is by installing Tweak Tool; give users an
alternative by providing a simple settings dialog ourselves.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/117
The buttons currently appear more as an attachment to the label
than as distinct controls. Address that by:
- applying .button styling
- increasing spacing between label and button
- aligning buttons at the end
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/223
eslint requires a file/directory, and will fail when the parameter
is not specified. Unfortunately it only indicates the failure by
printing its help output, but not via its return value, so our test
still completes successfully.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/105
While window titles really really shouldn't contain newline characters,
they are under application control and therefore may very well do.
Force the corresponding labels to be single line, to prevent offending
applications from messing up the whole window list layout.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/202
When cycling through window sizes, we should skip any sizes that are
bigger than the available area. We do that, but the current code
assumes that the possible sizes are sorted, which is no longer the
case since the addition of "phone" sizes in commit 5b43d4733c.
As a result, we may now skip sizes that would fit perfectly fine.
Address this by filtering out invalid sizes beforehand instead of
assuming a certain order (wich no longer work due to the addition
of a portrait format).
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/97
While nautilus removed its desktop support a while ago in favor of an
extension, it's still possible that some external X11 desktop icon app
is used. As DESKTOP windows cannot be moved between workspaces or stacked,
and aren't perceived as regular windows, it doesn't make sense to show
them as previews in the workspace switcher.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/93
While nautilus removed its desktop support a while ago in favor of an
extension, it's still possible that some external X11 desktop icon app
is used. As DESKTOP windows cannot be moved between workspaces or stacked,
and aren't perceived as regular windows, it doesn't make sense to show
them as previews in the workspace switcher.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/93
Filtering errors by changed lines in a merge request means some
errors can slip through, for example when an import becomes unused
but isn't removed.
That's more common than rules changing behind our back, so revert
to running eslint directly again.
This reverts commit 119da3291b.
We mostly use the regular == and != comparison operators over their
type-safe === and !== counterparts. This is about to change, but there
are some places where we don't care whether a value is null, undefined
or 0; just check for falsiness there instead of using operators, so
we can start to consistently use the type-safe operators everywhere
else in a follow-up commit.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
As arrow functions have an implicit return value, an assignment of
this.foo = bar could have been intended as a this.foo === bar
comparison. To catch those errors, we will disallow these kinds
of assignments unless they are marked explicitly by an extra pair
of parentheses.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
Array destructuring has been supported by gjs/mozjs for quite some time,
so we are already using it heavily where it makes sense.
However one place still sneaked through where using destructuring makes
sense, as the element's position has semantic meaning (instead of just
making it the first, second, ... element).
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
ES6 allows to omit property names where they match the name of the
assigned variable, which makes code less redundant and thus cleaner.
We will soon enforce that in our eslint rules, so make sure we use
the shorthand wherever possible.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
eslint has a rule to prohibit unnecessary parentheses. While this is
generally a good idea stylistically, the parentheses in a calculation
of (a / b) * c add more clarity, as a / b * c lacks the unambiguity of
proper math notation:
a a
--- * c vs -------
b b * c
We can still follow the style rule by rearranging to the unambiguous
c * a / b.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
Invoking functions via Function.prototype.apply() and .call() is
less performant than a regular function call, and makes code harder
to read.
Before ES6 there was no other way of writing a function with variadic
arguments, but since we now have the spread operator, we can use that
as the better alternative.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
This code has been commented out since it was added, presumably due to
difficulty in avoiding a cycle of reloading rows on settings changes
and writing settings on row changes.
Considering that the setting changing while the preference dialog is
up is extremely unlikely, don't bother with making it work and just
remove the dead code.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
Since we dropped the legacy configuration, we run eslint directly
instead of via a script. However gnome-shell's variant of the script
also has special treatment of merge requests to only consider errors
in changed lines.
While we strive for zero errors, new errors can appear when we update
eslint or change the configuration. Not blocking merge requests due
to unrelated eslint errors is a good thing, run eslint through a
modified version of the gnome-shell script.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/90
Since version 1.50.0, gjs defines GObject.NotImplementedError for throwing
errors when a virtual method that requires a subclass implementation is not
defined.
So use this instead of a generic JS Error in such cases.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/84
Vertical workspaces are another defining characteristics of GNOME 3,
and thus rather un-classic. That switch was driven by the overall
layout of the overview, and now that we disable the overview in
GNOME Classic, we can just return to the traditional workspace
layout as well.
Add a small extension that does just that.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/72
Currently the new horizontal workspace switcher only shows a series of
buttons, with no indication of the workspaces' contents. Go full GNOME 2
and add tiny draggable preview rectangles that represent the windows
on a particular workspace.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/77
We are about to support a separate representation if horizontal
workspaces are used. To prepare for that, rename the handlers to
something more generic and split out menu-specific bits into a
dedicated helper function.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/71
Currently the new horizontal workspace switcher only shows a series of
buttons, with no indication of the workspaces' contents. Go full GNOME 2
and add tiny draggable preview rectangles that represent the windows
on a particular workspace.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/74
It makes some sense to allow using the workspace indicator for moving
windows between workspaces as well as for workspace switching. This
applies particularly in GNOME classic after we disabled the overview
there, so that there is again a non-shortcut way of moving windows
between workspaces.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/74
Unlike in GNOME 2, the workspace indicator we display in the window list
isn't a workspace switcher, but a menu button that allows switching
workspaces via its menu. The reason for that is that a horizontal
in-place switcher would be at odds with the vertical workspace layout
used in GNOME 3.
However that reasoning doesn't apply when the layout is changed to a
horizontal one, so replace the button with a traditional workspace
switcher in that case.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/70
We are about to support a separate representation if horizontal
workspaces are used. To prepare for that, rename the handlers to
something more generic and split out menu-specific bits into a
dedicated helper function.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/70
We have an option to put a window list on each monitor, so we may have
more than one window picker toggle. We don't want each of those try to
toggle the window picker simultanuously, so move handling of the super
key directly into the picker.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/80
The overview is one of the defining features of GNOME 3, and thus
almost by definition at odds with the classic session, which
emulates a traditional GNOME 2 desktop.
Even with the less prominent placement inside the application menu
it never quite fit in - it doesn't help that besides the different
UI paradigma, the overview keeps its "normal" styling which differs
greatly with classic's normal mode.
So besides removing the "Activities" button via the session mode
definition, now that the apps-menu extension doesn't replace it anymore,
disable the overview completely in the classic session.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/69
Now that we no longer hide the overview when the menu is opened,
it is possible to activate menu entries from the overview. Start
hiding the overview in that case, which is consistent with app
launching elsewhere.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/69
We don't want the "Activities" button in GNOME Classic, but the current
way of handling it is confusing:
- the button is hidden, but the corresponding hot corner
sometimes works (when the application menu isn't open)
- the button is effectively moved inside the menu, although
it's clearly not an app or category
- the apps-menu can be used independent from classic mode, in
which case removing the "Activities" button may not be wanted
Address those points by removing any handling of the activities button
from the apps-menu extension. We will remove it again from the classic
session via a session mode tweak.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/69
The extension currently assumes that we have the "Activities" button
at the left of the top bar. This is currently true, not only in the
regular session, but also in GNOME classic where the button is hidden
(but still present).
However this is about to change: We will stop taking over the button
from the apps-menu extension, and instead disable "Activities" from
the session mode definition.
Prepare for this by adding the places menu before the application menu
instead of assuming a hardcoded position.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/69
PanelMenu.Button is a bit weird in that it also "contains" its parent
actor. That container is supposed to be destroyed with the button, but
as we currently don't chain up to the parent class' _onDestroy(), we
leave behind an empty container every time the extension is disabled.
Fix this by adding the missing chain-up.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/75
PopupMenuManager's grabHelper starting from gnome-shell@7bb84da must be
an actor, so pass it explicitly instead of expecting the shell to do it
for us.
This fixes an error during pushModal that was causing a grab not to be
released.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/68
gnome-shell moved to ES6 classes, which means the constructor is
no longer a regular method that we can swap out with an injected
version.
Instead, do our modifications in subclasses and use them to replace
the original classes.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/143
The coding style of using double quotes for translatable strings
and single quotes otherwise is unnecessarily complex and cannot
be enforced with an eslint rule.
Simply use single quotes consistently for all strings.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/57
Instead of keeping the first property on the same line as the opening
brace and aligning the properties, use a four-space indent. This brings
us closer to gjs' coding style, and as a bonus helps keeping lines in
the soft 80 character limit.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/57
Braces are optional for single-line arrow functions, but there's a
subtle difference:
Without braces, the expression is implicitly used as return value; with
braces, the function returns nothing unless there's an explicit return.
We currently reflect that in our style by only omitting braces when the
function is expected to have a return value, but that's not very obvious,
not an important differentiation to make, and not easy to express in an
automatic rule.
So just omit braces consistently as mandated by gjs' coding style.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/57
We picked those up from Polari, which had those for
- object arrays:
let foo = [
{ bar: 42,
quz: true },
{ bar: 23,
quz: false }
];
- "enums":
let Options = {
ONE: 0,
TWO: 1,
THREE: 2
};
We don't have either of those, so drop the rules to minimise divergence
with gjs.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/57
Commit messages should include the full URL to an issue or merge
request to keep associated information easily available in future
log digging.
Jonas came up with a script to enforce that policy for mutter and
gnome-shell. It's an excellent idea, so adopt it here as well.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/52
It doesn't make too much sense to declare parts of the existing style
"legacy", but then enforce it via CI. To allow for a gradual switch,
generate a report with all issues that eslint considers errors in both
configurations.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
More testing is always good, and the static analysis that eslint
provides goes well beyond what js60 offers, so run it as part of
the CI.
This will also ensure that new contributions comply with the style
rules we have set up.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
Unused variables or arguments can indicate bugs, but they can also
help document the code, in particular in case of signal handlers
and destructuring.
Account for this by keeping the error, but set up patterns that allow
us to opt out of if for individual variables/arguments. For arguments
we pick a '_' prefix, while for variables we go with a suffix instead,
to not accidentally exempt private module-scope variables.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
Regarding coding style, gjs is moving in a direction that departs quite
significantly from the established style, in particular when indenting
multi-line array/object literals or method arguments:
Currently we are keeping those elements aligned, while the gjs rules now
expect them to use the regular 4-space indentation.
There are certainly good arguments that can be made for that move - it's
much less prone to leading to overly-long lines, and matches popluar JS
styles elsewhere. But switching coding style implies large diffs which
interfere with git-blame and friends, so in order to allow for a more
gradual change, add a separate set of "legacy" rules that match more
closely the style we would expect up to now.
It also disables the rules for quotes and template strings - the former
because we cannot match the current style to use double-quotes for
translatable strings and single-quotes otherwise, the latter because
template strings are still relatively new, so we haven't adopted them
yet.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
That function will eventually be replaced with decorators, and we don't
want to re-indent all GObject classes when that happens, so allow class
declarations with no indent:
GObject.registerClass(
class Foo extends GObject.Object {
});
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
I simply cannot deal with multi-line trinary expressions where the
two "branches" don't align, so add an exception for them.
And while the strict 4-line indent for objects is growing on me for
"regular" objects:
let foo = new Foo({
bar: 42,
baz: 'bam'
});
I do prefer the current style of compact braces and aligned properties
for object lists:
let entries = [
{ name: 'foo',
visible: true },
{ name: 'bar',
halign: Gtk.Align.START }
];
So allow the latter style as well, at least for the time being.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
When using arrow functions, we only omit the braces when we are using
the return value:
this.get_children().filter(w => w.visible);
When braces are used, eslint by default enforces line breaks, but
there are cases where the expression is hardly less concise than
the above:
this.get_children().forEach(w => { w.destroy(); });
So change the default to allow this.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
All variables should be in camelCase, so configure the corresponding
rule to enforce this. Exempt properties for now, to accommodate the
existing practice of using C-style underscore names for construct
properties of introspected objects.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
gjs started to run eslint during its CI a while ago, so there is an
existing rules set we can use as a starting point for our own setup.
As we will adapt those rules to our code base, we don't want those
changes to make it harder to synchronize the copy with future gjs
changes, so include the rules from a separate file rather than using
the configuration directly.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
When destructuring multiple return values, we often use trailing commas
to indicate that there are additional elements that we are ignoring.
There isn't anything inherently wrong with that, but it's a style that's
too confusing for eslint - on the one hand we require a space after a
comma, on the other hand we require no space before closing brackets.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49
String concatenation is considered bad style after ES6 added
template strings. The latter is the replacement we generally
want, except where the aforementioned xgettext bug would trip
over the backtick/slash combination.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49
While we have some style inconsistencies - mostly regarding split lines,
i.e. aligning to the first arguments vs. a four-space indent - there are
a couple of places where the spacing is simply wrong. Fix those.
Spotted by eslint.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49
We currently use a consistent style of not adding spaces in catch
clauses, however that's inconsistent with the style we use for any
other statement. There's not really a good reason to stick with it,
so switch to the style gjs/eslint default to.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49
Since template strings were added in ES6, string concatenation is
considered bad style. There's a catch though: xgettext currently
has a nasty bug concerning the combination of backticks and slashes.
Avoid that issue by building filenames with the corresponding GLib
helper function.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49
Now that PanelMenu.Button was made an StWidget subclass, the destroy()
method actually maps to the ClutterActor method, and overriding it
results in warnings when the extension is disabled. So instead, use
the existing ::destroy handler.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/113
Now that PanelMenu.Button was made an StWidget subclass, the destroy()
method actually maps to the ClutterActor method, and overriding it
results in warnings when the extension is disabled. So instead, use
the existing ::destroy handler.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/113
Now that PanelMenu.Button was made an StWidget subclass, the destroy()
method actually maps to the ClutterActor method, and overriding it
results in warnings when the extension is disabled. So instead, use
the existing ::destroy handler.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/113
Now that PanelMenu.Button was made an StWidget subclass, the destroy()
method actually maps to the ClutterActor method, and overriding it
results in warnings when the extension is disabled. So instead, use
the existing ::destroy handler.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/113
There are plenty of extension examples out there, no need to include
a sample extension that doesn't show-case any useful functionality
but puts additional burden on distributors to exclude it from packaged
extensions.
Ever since GNOME 3.8 when gnome-shell started to provide the window
switcher functionality itself, the extension has only existed to
change the default behavior of the alt-tab shortcut in the classic
session. Now that we achieve this behavior with a per-desktop override,
there's no longer a need for the extension, so remove it altogether.
Users who prefer the window switcher over the default app switcher
can use the regular keyboard settings to assign a shortcut to the
"Switch windows" action.
https://bugzilla.gnome.org/show_bug.cgi?id=786496
Window lists are per-monitor, so workspaces are implemented by
simply hiding all buttons that correspond to windows/apps on
other workspaces. That means we need to take the visibility
into account when handling scroll-events to switch through the
list, or else we'll end up switching "randomly" between workspaces.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/78
Per-desktop overrides aren't limited to keys in org.gnome.mutter, so
we can use them instead of the alternate-tab extension to default to
the window switcher in the classic session.
https://bugzilla.gnome.org/show_bug.cgi?id=786496
GSettings now recognizes per-desktop overrides that can be used
to change schemas' default values for classic mode, so use that
instead of the separate override schema we currently use with
mutter's custom override mechanism.
https://bugzilla.gnome.org/show_bug.cgi?id=786496
As of the libmutter API version 3 MetaScreen does no longer exist.
Functionality that previously depended on MetaScreen has been moved
elsewhere (e.g. MetaDisplay or MetaWorkspaceManager etc).
https://bugzilla.gnome.org/show_bug.cgi?id=759538
This is a relatively recent addition to the standard we can use where we
don't care about the actual position of an element inside the array.
(Array.includes() and Array.indexOf() do behave differently in edge cases,
for example in the handling of NaN, but those don't matter to us)
We can only know about override settings that are provided by the
upstream GNOME or GNOME Classic sessions, but not any custom sessions
created by admins, users or distributions. Handle that case by falling
back to the original settings.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/62
All we are really interested in is mozjs' js52 utility for running
syntax checks - gjs has significantly more dependencies, so cut
down on time and bandwidth spent on downloading and installing
unneeded packages.
This cuts down the number of packages we install from 202 to 13,
and the download size from 133M to 17M.
Meson has a strict separation of source- and build directory, and
expects anything generated in the latter. That means that in order
to maintain our current setup - shipping the generated CSS in the
repo while also optionally updating it automatically when sassc is
found - we have to fight the build system to some extent, which makes
it less reliable than we would like.
Since we switched to sassc which is a more acceptable build-time
dependency than the original ruby-based tool, just drop the CSS
from the repo and unconditionally generate it from SASS if classic
mode is enabled.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/28
Most buttons appear in modal dialogs which keep their normal
appearance in the classic theme, except for the calendar's
"Clear All" which needs a dark text color to be readable on
the light background.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/26
We currently track window creation to decide whether the new window
should be moved or not. In order for this to work, the window must
already have been matched to the correct application, which is only
the case when the properties used for app matching were supplied
during window creation.
This is usually the case on X11, but never on wayland. To avoid this
issue altogether, stop listening for raw window creations, and instead
track when a window is added to an application we are interested in.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/33
While reading the configuration, processing it and iterating over the
configured apps to find a match isn't terribly expensive, but caching
the configuration in a map does save a bit of work, and makes for much
cleaner code in findAndMove().
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/33
When overriding an upstream method, copying the original method code
should always be a last resort, as the two code bases tend to get
out of sync and it often becomes hard to spot the modifications done
by the override. Both those issues can be avoided when figuring out
a way to split out the modifications and call the unmodified upstream
method - we are in luck with our checkWorkspaces() override, as we
can trick the upstream method into not removing workspaces we want
to keep instead of copying the method altogether.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/33
Trying to dispose a proxy object before it has been properly
initialized triggers an "uncatchable exception", which gjs
treats as a fatal error since commit c7bdcaab4. We only have
anything to clean up once the proxy is initialized anyway, so
don't force dispose() before that.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/44
On wayland, the properties that are used for application matching
are generally set after the window has been created, so it is
normal that buttons start with the fallback icon. While we already
track the properties that are relevant for app matching, our signal
handler may run before the window is matched to its app.
Make sure the WindowTracker gets to process those signals first by
using connect_after() for our own handlers.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/10.
The description of the `enable_extensions` was wrong since it
changed to the `array` type, because the extension separator
is now a comma instead of space.
meson 0.44 features a new option type called `array` that allows
more than one string to be passed.
This feature fits perfectly the `enable_extensions` option needs,
so it has been changed to be an `array` type. the option has not
been limited to a set of choices to avoid duplication.
After replacing Lang.Class with ES6 classes and adopting arrow notation
for anonymous callbacks, we only use the Lang module to bind `this` to
named callbacks. However since ES5, this functionality is already provided
by Function.prototype.bind() - in fact, Lang.bind() itself uses it when
no extra arguments are specified.
So just use the built-in function directly instead of the wrapper.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/30
ES6 finally adds standard class syntax to the language, so we can
replace our custom Lang.Class framework with the new syntax. Any
classes that inherit from GObject will need special treatment,
so limit the port to regular javascript classes for now.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/30
Arrow notation is great, but as we only started using it recently,
we currently have a wild mix of Lang.bind(), function() and () => {}.
To make the style consistent again, change all anonymous functions
to arrow notation.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/30
Continuous integration is good, in particular when used before
merging a change to master as allowed by gitlab. And now that
we enabled some basic syntax checking of source files, we even
have something useful to test for ...
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/32
As a pure javascript project, building is really just a glorified
copy operation, so success doesn't even indicate that sources are
syntactically correct (a.k.a. "compile-tested"). We can at least
get some minimal testing by performing some basic syntax checking
when SpilderMonkey's JS shell is available.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/32
The steps for adding a new extension are clearly different in meson,
so update the instructions accordingly. Don't bother with keeping
the existing autotools steps - supporting both build systems in
parallel is just temporary, autotools is on its way out.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/31
We currently do have some Makefile magic to export zip files suitable
for uploading to extensions.gnome.org. As this is not easily replicated
in meson, add a small non-magic script for the same purpose.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/31
Over the years the list of extensions has become seriously outdated - a
number of extensions has long been removed, while others have been added.
With the switch to gitlab, the README is displayed prominently, so make
sure the list is accurate again.
"for each ... in" has been deprecated for a long time and won't be
supported in upcoming SpiderMonkey versions, so replace it with
"for ... of" instead.
Instead of copying a long function for a single changed line, wrap the
layout algorithm in a LayoutStrategy so the workspace code picks it
up without modifications.
https://bugzilla.gnome.org/show_bug.cgi?id=787934
Currently the injection to move title captions to the top depends on
the value of the setting at the time the extension is enabled.
Instead, do the injections unconditionally and query the setting
inside the function to pick up settings changes.
https://bugzilla.gnome.org/show_bug.cgi?id=787934
title._spacing is no longer defined, so we end up with bogus positions
when window-captions-on-top is set to true. Adjust the positioning to
do without that for now, though the whole extension could use a rewrite
to not copy everything-and-the-kitching-sink, or be killed off as yet
another extension from the original random collection that turned out
too expensive to keep dragging along ...
https://bugzilla.gnome.org/show_bug.cgi?id=787604
In short, gjs complains that octal escape sequences are deprecated
and advises to use the "0o" prefix for octal literals. Do that to
fix the warning.
https://bugzilla.gnome.org/show_bug.cgi?id=787294
The REVERSES flag was removed from Meta.KeyBindingFlags a while ago, as
gnome-control-center doesn't recognize it and the corresponding "magic"
shift handling. That is, nowadays reversible keybindings need to
provide an explicit reversed binding.
https://bugzilla.gnome.org/show_bug.cgi?id=784079
The window context menu contains minimize, maximize and close items
that are currently enabled unconditionally, regardless of whether
the window indicates support. Respect those hints by updating the
items' sensitivity every time the popup is shown.
https://bugzilla.gnome.org/show_bug.cgi?id=783601
The top bar now uses a translucent style when no windows are in its
proximity. As translucency looks odd in some situations (in particular
with maximized windows), we don't want to pick it up unconditionally.
If someone fancies to integrate with the top bar's proximity tracking,
they are welcome to have a go, but for now we just restore the former
solid style unconditionally.
When we try to launch an application for an uri where the enclosing
mount is not yet mounted we might need information from the user
such as passwwords. Using a MountOperation makes this possible.
https://bugzilla.gnome.org/show_bug.cgi?id=781788
GTK+ switched from ruby-based sass to c-based sassc for performance
reasons. It makes sense to follow suit, if not to not require two
tools for the same job ...
https://bugzilla.gnome.org/show_bug.cgi?id=783210
When launching an application for an uri we detect the case that
the volume is not mounted and try to mount it. If this fails we
don't report any error, so there is no feedback for the user.
Use the async version of Gio.AppInfo.launch_default_for_uri so
we don't hang or block if the uri we are trying to launch the
application for is on slow or dead network connections.
https://bugzilla.gnome.org/show_bug.cgi?id=781831
The application can already be launched from the menu without further
confirmation from the user, so there is no security gain in asking the
user to trust it when launched from the desktop - just set the appropriate
attributes of the newly copied file to mark it as trusted to nautilus.
https://bugzilla.gnome.org/show_bug.cgi?id=781596
Someone mixed up add() and add_actor() - this has been present since the
the big rewrite based on the AxeMenu extension in commit 9211fa4409, so
there's little point in coming up with a replacement for something that
never had any effect to begin with ...
It's not very useful to allow dragging when there's no drop target,
so tie the functionality added in the previous commit to the presence
of a DESKTOP window.
https://bugzilla.gnome.org/show_bug.cgi?id=780371
Back in the olden days, it used to be possible to drag items from
the application menu to the desktop to create a launcher shortcut.
Reimplement that "classic" functionality in the apps menu extension.
https://bugzilla.gnome.org/show_bug.cgi?id=780371
The use of Array to keep track of inserted items is extremely
confusing, as no elements are ever added to the array. What
the code actually does is monkey-patching properties into an
empty object (that happens to be of type "Array"). While the
direct idiomatic replacement would be {}, update the code to
use a proper map instead.
https://bugzilla.gnome.org/show_bug.cgi?id=780371
There's no need to show the workspace indicator at the right
corner of the window-list if there's just a single workspace
AND the workspace creation is static. This saves us a bit more
of space.
https://bugzilla.gnome.org/show_bug.cgi?id=777504
The original extension author really hated the app switcher with a
passion and took over all its uses, but there's really no reason
to replace the 'switch-group' shortcuts - not least because the
window switcher doesn't implement switching between windows of
a single application. So just keep the extension to making the
'switch-application' shortcuts behave as 'switch-windows' for the
"classic" session (and all users who rather install an extension
than change shortcut settings).
https://bugzilla.gnome.org/show_bug.cgi?id=771531
We currently assume that the application associated with a particular
window is fixed. While this holds true for almost every application,
there are some cases of multi-app-packages like LibreOffice where
windows may change the properties used for application matching at
runtime. Catch those cases to make sure we display the correct icon
when the window shifts applications.
https://bugzilla.gnome.org/show_bug.cgi?id=771731
.desktop files in non-standard locations are not handled by GIO,
so looking up apps for entries for such locations (e.g. a
directory added via the AppsDir directive) will fail. We can
still handle this case in the menu by creating the app directly
from the entry's AppInfo.
https://bugzilla.gnome.org/show_bug.cgi?id=762206
The code de-duplication in commit bf8d30603e57b broke the extension,
fix by duplicating the code here now :-(
(It's not really that bad though ...)
https://bugzilla.gnome.org/show_bug.cgi?id=767077
The new logical dimensions are reported in the overlay, rather than the
pixel dimensions. That is: if scaleFactor is 2, a window might be
resized to 2400×1350 device pixels, which will be reported as 1200×675
in the overlay.
This is consistent with (for example) the DevTools in Chrome, which
reports the logical size of the viewport when you resize the window,
rather than the physical pixel size.
Tested with a freely-resizable window and with a constrained-geometry
window (GNOME Terminal), on a hidpi display.
https://bugzilla.gnome.org/show_bug.cgi?id=754607
GMenu's TreeEntries return an AppInfo that is created from the
.desktop filename, not from a desktop ID as expected by the
AppSystem. As a result, g_app_info_get_id() will simply return
the file's basename, which only matches the desktop ID if no
prefix-to-subdirectory mapping as described in the menu spec
is involved.
Fix this by basing the app lookup on the entry's desktop ID instead
of the AppInfo.
https://bugzilla.gnome.org/show_bug.cgi?id=759004
Category items grab the pointer to implement "triangle navigation", which
interferes with automatic hover tracking in other widgets. While this is
the correct behavior while we hold the grab (i.e. when crossing other
category items without switching), it can interfere with user expectation
when the grab is dropped, as the motion event that causes us to do so
doesn't necessarily occur before the "target"'s enter event - address this
by syncing up the hover state manually after dropping the grab.
https://bugzilla.gnome.org/show_bug.cgi?id=754959
Independent from the grouping mode, the window-list currently shows
up as a series of "push buttons" in screen readers, which is obviously
not useful, so point to the correct labels.
https://bugzilla.gnome.org/show_bug.cgi?id=755223
The user explicitly enabling desktop icons is a pretty good hint
that she intends to use the Desktop folder, so be consistent with
GTK+ and nautilus and include it when the corresponding setting
is true.
https://bugzilla.gnome.org/show_bug.cgi?id=754578
The indicator numbers workspaces starting from 1, while newly added
workspace names in the preference dialog start counting at 0.
Change the latter to be consistent with the indicator.
https://bugzilla.gnome.org/show_bug.cgi?id=753105
It is odd to consider windows that are not shown in the window list
for app sorting, in particular when switching between grouped and
ungrouped mode, and when a long-lived window like the DESKTOP is
present.
https://bugzilla.gnome.org/show_bug.cgi?id=753055
Just like the top bar, the window list should scale according to
the font scaling factor, so convert the existing pixel sizes into
font-relative ones.
https://bugzilla.gnome.org/show_bug.cgi?id=703585
The window list position depends on both the monitor geometry and the
list height, however changes to the latter are currently ignored. For
the time being this doesn't matter due to the list's fixed height, but
we are about to scale the list with the text, so reposition the list
on height changes.
https://bugzilla.gnome.org/show_bug.cgi?id=703585
The window-list's fixed height currently allows us to get away without
expanding buttons, however this won't be the case anymore once we start
adapting the list with the text scaling. So fix up the code to do what
was always the intention anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=703585
The function never had a timestamp parameter, the parameter that was
added at some point is a workspace index. Ouch, this has gone unspotted
since the original AxeMenu extension was adapted for the apps-menu ...
For a while now, gnome-shell has initialized extensions before
setting up its own keybinding handling. As a result, our taking
over of the panel-main-menu shortcut will be overwritten when
the extension is enabled at startup - work around this by setting
up the keybinding again on LayoutManager::startup-complete.
https://bugzilla.gnome.org/show_bug.cgi?id=746639
Setting up signal handlers inside a class and rely on outside code
to disconnect them via global variables is utterly weird. Just
disconnect everything inside the class when the corresponding actor
is destroyed.
https://bugzilla.gnome.org/show_bug.cgi?id=746639
By default, PanelMenu.Button creates a popup menu with arrow side TOP
which is wrong in our case and can mess up BoxPointer's positioning.
We can work around that easily by creating the menu ourselves with the
correct arrow side.
https://bugzilla.gnome.org/show_bug.cgi?id=746365
Menus in the top bar have some margin at the bottom, to prevent
menus to extend all the way to the bottom edge as the expand; we
obviously don't want the same behavior in the window-list at the
bottom, so stop pretending to be a top bar menu.
https://bugzilla.gnome.org/show_bug.cgi?id=745952
The systemMonitor extension extends the message tray with its UI, which
obviously broke when the bottom tray was removed. It has also been the
source for various performance/memory issues in the past and is part of
the semi-random collection that pre-dates the extension.gnome.org site
rather than the set of classic-mode/endorsed extensions, so just remove
it from the module.
Hopefully this will motivate someone who actually cares about it to pick
it up ...
https://bugzilla.gnome.org/show_bug.cgi?id=745195
Commit 2667b9f3e5 updated the extension for a shell change that
renamed _onActivate() to _activate, but forgot to also rename the
declaration of the variable that stores the original function.
Fix this to stop a warning about assignment to an undefined variable.
https://bugzilla.gnome.org/show_bug.cgi?id=745470
The point of that code is to keep the window-list underneath
modals' lightboxes if possible (i.e. unless the OSK is shown).
The trayBox was a natural pick back in the day, but the panel
will do just as well ...
https://bugzilla.gnome.org/show_bug.cgi?id=745304
MetaWindow.title might be NULL, particularly for Wayland clients where
setting the title is a request separate from window creation. We
shouldn't try to set StLabel's text prop in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=745064
While rare, it is possible to have a window not associated with any app
(not even a fake window-based one). We currently throw an error when
trying to set the icon for such a window, so handle this case and
use a fallback icon instead of the app icon.
https://bugzilla.gnome.org/show_bug.cgi?id=743401
Notification banners are now displayed at the top, and the summary
moved into the date and time drop down - the bottom is ours now,
no more special sauce needed to interact with it gracefully.
The sass sources now live in a project in GNOME, so they can
be used in multiple projects like gnome-shell-extensions.
Because of that, add gnome-shell-sass as a submodule and import the sass
sources from it.
Currently the window-list will be stacked above system modal dialogs,
which means it is not dimmed like the rest of the desktop and remains
accessible to interaction. We cannot do any better when showing the
on-screen keyboard, as we need to keep ourselves above to not end up
covered by the OSK, and the keyboard itself is stacked above modal
dialogs to allow its use for input. However we can at least fix the
case when not using the OSK.
https://bugzilla.gnome.org/show_bug.cgi?id=740722
Classic mode uses a different overrides schema, so make sure we use the
correct setting instead of hardcoding the usual org.gnome.shell.overrides
schema.
https://bugzilla.gnome.org/show_bug.cgi?id=737486
A new setting "show-on-all-monitors" (false by default) is available to
show window lists on all connected monitors.
The Extension object monitors conditions that require the list of
windows to be rebuilt. The WindowList and Button classes have a new
"perMonitor" property that indicates they should handle windows on
their own monitor only.
https://bugzilla.gnome.org/show_bug.cgi?id=737486
BaseButton is a new class that shares the common logic of WindowButton
and AppButton. AppButton is passed to AppContextMenu so that it can reuse
code from the now public getWindowList() method.
https://bugzilla.gnome.org/show_bug.cgi?id=737486
The classic style is decidedly lower contrast than the default
style, so the high-contrast variant could prove really useful
here. However for now, just override the default icon style as
in the default session.
https://bugzilla.gnome.org/show_bug.cgi?id=740447
setThemeStylesheet() stopped accepting %null to revert to the default
stylesheet. The issue is fixed in gnome-shell master, but work around
it for 3.15.2 to not ship broken (again).
Move messageTray patching form the Extension object to the WindowList
class. Moreover, only do the patching if the window list is on the bottom
monitor. This refactoring will make it easier to have several instances
of WindowList (one on each monitor).
https://bugzilla.gnome.org/show_bug.cgi?id=737486
Currently when using auto-grouping, the list is ungrouped each
time a window is closed, and then possibly re-grouped on the next
allocation - as a result, there is a brief "ungroup flash" if the
list is supposed to remain grouped.
Avoid this by computing the width the ungrouped list would have
rather than by actually ungrouping it.
https://bugzilla.gnome.org/show_bug.cgi?id=738286
Since commit 191c7ccc24, we check whether we already have a window
in the list before re-adding it on MetaWorkspace::window-added.
We can do something similar on MetaWorkspace::window-removed to
avoid some extra work when a window is moved between workspaces
rather than destroyed.
The list returned may contain windows that are being destroyed.
The ShellGlobal method filters those out, so use that instead; we
should eventually stop looking at window actors when we want windows,
but for now this is the easy and safe thing to do.
Rather than re-implementing the function (and risk missing improvements
like the launch animation), call the original one as if the user had
middle-clicked the launcher.
We do need to inject our own handler to treat application-switch
actions the same way as the corresponding window-switch ones;
we can actually express exactly this without re-implementing the
entire function, by calling the original handler with a tweaked
action parameter - the resulting code is not only more concise,
but should also be a bit more robust against changes in core.
https://bugzilla.gnome.org/show_bug.cgi?id=737457
Since shell commit dd85670f8b25, the handler got a return value to
determine whether Escape should be handled automatically; we do
want this for the window switcher, so add an appropriate return
value to restore the expected behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=737457
When a window's on-all-workspaces property changes to true, the
workspaces the window was not located on will emit the ::window-added
signal for the window; however we don't want multiple buttons for
the same window, so filter out the extra calls.
https://bugzilla.gnome.org/show_bug.cgi?id=736398
The workspace button used to extend to the bottom edge, which of
course is A Good Thing (tm) - commit ec8f269107 broke this when
it added an additional container to the hierarchy, expand the
button again to bring back the old mouse-friendly behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=708247
The defaults have been shifted around so that the normal session
uses the regular schema and classic mode overrides it, so the
key is no longer present in 'org.gnome.shell.overrides'.
- make tree view scrollable when list grows large
- add some borders
- use symbolic icons instead of (deprecated) stock items
- adjust spacing/alignment
- disable remove button when no item is selected
https://bugzilla.gnome.org/show_bug.cgi?id=730843
- make tree view scrollable when list grows large
- add some borders
- use symbolic icons instead of (deprecated) stock items
- adjust spacing/alignment
- disable remove button when no item is selected
https://bugzilla.gnome.org/show_bug.cgi?id=730843
The default in gsettings-desktop-schemas has changed to not include
minimize and maximize to match the default of client-side decorations
in GTK+, so start overriding the setting to bring them back in classic
mode.
Currently the initial set of buttons is in stack/MRU order. To
avoid shuffling around the list each time it is disabled/re-enabled
(lock screen) or the group-mode settings changes, sort it by the
stable sequence.
https://bugzilla.gnome.org/show_bug.cgi?id=719933
The 'launching' signal and this._onActivateOverride callback were
removed from gnome-shell in 7ecb5af587af7ed892c6cfc5af0858a2acb04905
and 7ecb5af587af7ed892c6cfc5af0858a2acb04905 respectively.
https://bugzilla.gnome.org/show_bug.cgi?id=721864
MetaWindowActor.get_workspace() was removed, however the now used
MetaWindow.get_workspace() returns a MetaWorkspace rather than an
index, so can't be used directly.
https://bugzilla.gnome.org/show_bug.cgi?id=728820
The message tray is moved to the bottom-most monitor when there are
monitors below the primary monitor; in that case, we need to leave
the tray alone.
https://bugzilla.gnome.org/show_bug.cgi?id=728288
This is something that gnome-panel supported, and apparently
some users would like to have it back, so restore this feature
on our window list too.
https://bugzilla.gnome.org/show_bug.cgi?id=723693
PopupBaseMenu provides a destroy() method that will destroy the menu
actor and make sure that the menu will be removed from the corresponding
PopupMenuManager (if any). We miss the latter when we destroy the menu
actor directly, so use the menu method instead.
https://bugzilla.gnome.org/show_bug.cgi?id=724688
Depending on the number of windows, AppButtons use different right-click
menus ("Minimize" vs. "Minimize all").
As the menu for the multiple-windows case remains the same, it is created
and added just once. However this means that in the single-window case,
the corresponding PopupMenuManager will track two menus for the same
source actor, resulting in various misbehaviors.
Fix these issues by adding and removing the app context menu appropriately,
so that the PopupMenuManager tracks a single menu at any time.
https://bugzilla.gnome.org/show_bug.cgi?id=724688
StButton takes the hover state into account to decide whether a
series of events should be considered a click. So when dismissing
a menu by clicking on a different window/app button, its menu
cannot be triggered before leaving and re-entering the button
(and thus syncing the hover state).
Fix this by always syncing the hover state after a grab is dropped.
https://bugzilla.gnome.org/show_bug.cgi?id=724688
Applications now track all their windows, not just the ones that are
expected to show up in the window list. So to restore the previous
behavior, we now have to filter out windows with the skip-taskbar
hint ourselves.
https://bugzilla.gnome.org/show_bug.cgi?id=724134
While the list of windows in the left-click menu is filtered by
workspace, the minimize/maximize/close actions in the right-click
menu apply to all application windows on all workspaces.
This is fairly confusing, so restrict the actions to only apply
to windows that do appear in the left-click list.
https://bugzilla.gnome.org/show_bug.cgi?id=724134
Animate showing and hiding the window list when toggling the
overview (with a translation on and off the screen). Don't actually
change the visible status of the actor, because we don't want
to change struts.
In case of shadowed mounts, mounts can become uninteresting
after they are added, according to whether our handler or gvfs
runs first, so we need to watch for changes. The easiest way
is to create an item for all mounts, and only show the interesting
ones.
Default _ is gettext from gnome-shell domain, which doesn't have
the strings we need.
We could use mutter's, but translators already did their job
on pretty much all supported languages, so...
Currently, we start gnome-shell in classic mode by passing
--mode=classic to the gnome-shell command line. This --mode=classic
gets stripped away when the session is saved, which breaks classic
mode on subsequent login attempts.
This commit changes the session file to set the
GNOME_SHELL_SESSION_MODE environment variable instead.
https://bugzilla.gnome.org/show_bug.cgi?id=720894
Shadow mounts are created by the GVolume infrastructure to wrap
daemon mounts managed by volume monitors, and are an implementation
detail that should not be exposed to the user.
gnome-panel's window list had context menus on buttons, that gave
easy access to common operations like close, minimize and maximize.
Add something similar to the window-list.
https://bugzilla.gnome.org/show_bug.cgi?id=699251
addActor() gone from PopupBaseMenuItem, arrows in menus,
SystemStatusButton gone.
The auto-move-windows cleanup is probably older, weird noone
noticed before.
Anyway, I need a pitch fork.
This can't work without a significant rework (because we can't
use GnomeRR in the mutter process, now that's DBus API implemented
by mutter itself, and the monitor config API is private to mutter
for now), and I doubt it's really useful to anyone.
Also, we have an orientation lock button, which kind of serves
a similar purpose
As part of the new unified status menu, the old status menu
was reworked considerably in 3.9.5, and the extension as it
was written does not make sense.
If hibernation is needed, it should be added (through another
extension) in the shutdown dialog.
This reverts commit e71d48853d.
The Assamese PO file does not exist in the repository. It should be
committed before modifying the LINGUAS file, to avoid breaking the
build.
Just like we look in XDG_DATA_DIRS, we should honor XDG_DATA_HOME
as well.
For compatibility reasons, we look in ~/.themes first, then ~/.local/share,
then /usr/share.
* remove unnecessary chromeHeight that breaks the system
* copy original _updateWindowPositions from 3.9
* use nativeWindowPlacement in update function
* tidy up NaturalWindowPlacement function
https://bugzilla.gnome.org/show_bug.cgi?id=699054
* use original realPositionWindows() and map _computeAllWindowSlots() to our function (_calculateWindowTransformationsNatural()).
* adapted _calculateWindowTransformationsNatural() to _computeAllWindowSlots()' behaviour
https://bugzilla.gnome.org/show_bug.cgi?id=699054
Some default values differ between classic and normal sessions. We
used to implement this by overriding the shell's default values in
mini-extensions (or more precisely: reversing the shell's overrides).
Use a mode-specific overridesSchema instead, which has the advantage
that settings defaults will not change unexpectedly when extensions
are disabled/enabled (for instance during screen locks).
https://bugzilla.gnome.org/show_bug.cgi?id=701717
When the number of workspaces changes, we clear the existing menu
and recreate it based on the screen::n-workspaces property, so it
is slightly more correct to track changes to the property directly
instead of using the workspace-added/workspace-removed signals.
This change also fixes a corner case, where changes to the property
before workspaces are initialized are missed and we end up with the
wrong number of workspaces.
https://bugzilla.gnome.org/show_bug.cgi?id=699350
In addition to "always" and "never", gnome-panel supported an "auto"
grouping mode, which only started to group items when running out of
available space. It makes sense for us to support the same option in
the window-list extension, so implement it.
https://bugzilla.gnome.org/show_bug.cgi?id=697157
-st-natural-width is useful to request a larger-than-usual width,
add back the max-width removed in commit 702cf52cfc to also request
a smaller-than-usual width as necessary.
Items in the window list should take up a fixed amount of space
unless the list is full and items need to shrink. To achieve this,
replace the max-width with the newly added -st-natural-width.
https://bugzilla.gnome.org/show_bug.cgi?id=695392
This is the most basic version of a workspace switcher, taken from
Frippery Bottom Panel and adapted. It handles clicks and scrolls,
and does not show window thumbnails or shapes.
Note that, differently from the frippery version, it won't change
the workspace layout, and actually assume a linear vertical layout,
which is then shown horizontally. This is to keep compatibility
with the overview, which uses a vertical layout.
https://bugzilla.gnome.org/show_bug.cgi?id=694914
PanelMenu.Button listens to key-press-events on the corresponding
menu to move focus to neighboring buttons on left/right arrow. In
order to allow keynav from the category list on the left to the
application list on the right and vice-versa, we may need to suppress
the parent behavior depending on the currently focused actor, so
overwrite the signal handler accordingly.
https://bugzilla.gnome.org/show_bug.cgi?id=693074
When setting GtkRadioButton's group property, its active property is
also set as a by-product. This means that setting these properties
isn't commutative which arguably is a bug in gtk+ but one that we can
easily work around by just switching the order here.
https://bugzilla.gnome.org/show_bug.cgi?id=697495
When grouping is enabled, items that are only have a single window
associated are still expected to behave like ungrouped items.
This includes activating windows by DND, which uses the metaWindow
property on the hovered actor's _delegate, so make sure it is set
on AppButtons in single-window mode as well.
https://bugzilla.gnome.org/show_bug.cgi?id=693561
Implement a keep-up triangle to keep submenus from changing if the
pointer strays a bit when mousing towards the application list on the
right. The keep-up triangle is only used if the mouse movement is more
horizontal than vertical.
This is similar to the behaviour of GtkMenu, but much more simple
because we are only dealing one specific kind of menu, and hence don't
need to be as generic.
https://bugzilla.gnome.org/show_bug.cgi?id=692913
LayoutManager will take care of our visibility, but we need to
adjust the message tray anchor point manually. Also, we must not
show ourselves when coming out of the overview if we're in fullscreen.
https://bugzilla.gnome.org/show_bug.cgi?id=696929
After recent overview changes, we may end up with the message tray
showing partially in the overview when the window-list extension
is enabled. Adjusting the anchor explicitly when entering/leaving
the overview fixes the issue, requiring less code.
https://bugzilla.gnome.org/show_bug.cgi?id=695390
We switched from using the window icon to using the associated
application's icon; however when we create the window list item
from a handler to the 'window-added' signal, the association of
window and application might not exist yet, as WindowTracker uses
the same signal to create the association. Use connect_after()
for creating the window list item to make sure that WindowTracker's
signal handler has run already.
https://bugzilla.gnome.org/show_bug.cgi?id=695389
Directories that are not immediate children of the root should be merged
in the parent, to preserve the flat structure and to be consistent with
the Activities overview.
https://bugzilla.gnome.org/show_bug.cgi?id=693241
We currently use the application icon for items that are grouped
by application and the window icon otherwise. However with the
icon property being unused anywhere else in GNOME3, applications
have started to not set any window icon at all.
Rather than complaining to application authors, switch to using
the app icon everywhere, which improves consistency with the rest
of GNOME3 anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=694850
We use a logind inhibitor now, so we don't need to lock the screen before
calling logind. Also, the UPower path was removed, and suspension is not
available for ConsoleKit.
Sorry, Ubuntu users!
PopupMenu.PopupBaseMenuItem uses the natural width of its children to
set its own minimum and natural widths. We don't want that because
some of our children can be too wide. So, we override it.
We also set the span and expand parameters of the label to -1 and true
respectively. Otherwise we won't get to see the "...".
https://bugzilla.gnome.org/show_bug.cgi?id=693282
Currently we ended up ignore 'network' volumes that did not have a
mount associated with it. Instead we should behave like Nautilus and
still show them.
https://bugzilla.gnome.org/show_bug.cgi?id=693437
The empty array is created and inserted into the hashtable before
every call to _loadCategory. No need to check for it and create it
again inside the function.
Don't mix up negated if conditions with continue while skipping stuff
that should not be displayed. Follow one style for consistency.
https://bugzilla.gnome.org/show_bug.cgi?id=693346
Classic mode should be visually distinct from the normal session,
so provide a mode-specific stylesheet which looks closer to the
familiar GNOME2 default theme.
https://bugzilla.gnome.org/show_bug.cgi?id=693169
Update to the new way to layout window overlays, which requires
setting a slot on the clone, and update to the new padding setting
for the window picker, including a custom style to avoid placing titles
outside the clip area.
This is a severely toned down version of the original AxeMenu:
- the column on the left has been removed, because it duplicates
functionality provided by the places-menu and the user menu
- the application search functionality has been removed because it
is already provided by vanilla gnome-shell
- the "All" category ended up being too crowded and has been replaced
by "Favorites", so there is no separate page for it any more
https://bugzilla.gnome.org/show_bug.cgi?id=692527
After review from the design team, the following changes were requested:
- use a "Places" label instead of a symbolic icon in the top bar
(as in GNOME 2)
- move places icons in front of the name (as in Nautilus)
- use menu separators between sections instead of section titles
https://bugzilla.gnome.org/show_bug.cgi?id=692027
With new items being added on the left, the top bar gets a little
crowded with the dateMenu at the center, so move it to its "classic"
position on the right.
https://bugzilla.gnome.org/show_bug.cgi?id=692016
gnome-shell now provides its own traditional window switcher using
a dedicated keybinding, so update the extension to just take over
the default application-based switchers as well.
https://bugzilla.gnome.org/show_bug.cgi?id=689724
The Makefile had two rules by which it could possibly have generated the
intermediate .in file (on the way from .in.in to .session) and it picked
the one that didn't contain the substitution for @libexecdir@.
Consolidate the rules into one that does all the needed substitutions.
https://bugzilla.gnome.org/show_bug.cgi?id=689756
Adds minimize and maximize buttons to the titlebar by default. It
restores org.gnome.desktop.wm.preferences as the schema to be used for
the button-layout key.
It is included in classic-mode.
https://bugzilla.gnome.org/show_bug.cgi?id=689275
As part of removing fallback mode, GNOME wants to support a subset of
gnome-shell-extensions that restore part of the GNOME 2 experience.
This commit introduces that distinction, and allows to build only the
supported "classic-mode" extensions.
Many people complained that they can't make hibernate visible. Given
that using gsettings with extensions is not easy (you need --schemadir etc.),
just flip the default, and tell people that don't want it to change it
(or just core shell)
Recently WindowsNavigator would just crash the shell upon entering
the overview. I'm not sure where the bug was, probably it was due to
the new window layout code.
Different GIO backends can fail in different ways trying to query
file infos. If that's the case, fail back to safe get_basename()
instead of crashing.
3.7 is brought some big changes in the window layout code, but I'm not
going to take advantage of them (as the assume some sort of row based layout).
Instead, just work around them in a way that makes the extension work
without major issues.
Under broken configurations, it is possible that a special directory
is configured but does not exist. In that case, just skip the menu item
altogheter.
Code was still refererring to the external screensaver instead of
activating the screenshield.
I feel like a genius for writing both modules and not noticing this
until after 3.6.0.
If apps-menu is enabled at the same time as places-menu, the right order
is activities, apps-menu, places-menu, app-menu. Previously we used the
extension activation order to obtain this, but it's not reliable enough,
so make it explicit in code.
Let's go GNOME 3 style, and make a places menu that looks like the sidebar
in Files, with for subsections corresponding to default places, devices,
bookmarks and network mounts.
Among other things, this should fix the duplicate home or duplicate desktop
bookmark problem (as now we don't bookmarks that are same as the default
locations), and it makes us future proof for the removal of PlacesManager
in core shell.
The panel changed the way it builds the buttons outside the system
status area.
- Update alternative-status-menu to the new way of accessing panel
contents.
- Update apps-menu to the new way of adding items to the panel.
- Move places-menu to the left now that it is possible without hacks.
Someone left this poor extension in the last century.
Port to GDBus, port to Lang.Class, port to addSettingsAction, port to new
symbolic icon handling.
The workspace management done by auto-move-windows is semi-dynamic,
in that it collects empty workspaces at the end, and ensures there
is always one free.
This is undesirable when the user explicitly choose static
workspaces in the tweak tool or in dconf-editor.
A dialog for which the parent application is closed may end up without
an app. In that case, show only the thumbnail, or if showing icons only,
show a missing icon.
Kill the mode switch distinction, and kill the old and unmaintained
Workspace&Icons mode.
Introduce instead configurability for the All&Thumbnails code, which
now independently allows choosing if only all windows or only those
from current workspace should be shown, and in which way (thumbnail,
icon, both).
All configuration settings changed, so the extension must be configured
again (although hopefully I chose reasonable defaults)
"description":"Add a gnome 2.x style menu for applications",
"description":"Add a category-based menu for applications.\nThis extension is part of Classic Mode and is officially supported by GNOME. Please do not report bugs using the form below, use GNOME's GitLab instance instead.",
"description":"Always launch a new instance when clicking in the dash or the application view.\nThis extension is part of Classic Mode and is officially supported by GNOME. Please do not report bugs using the form below, use GNOME's GitLab instance instead.",
// testing settings for natural window placement strategy:
constWINDOW_PLACEMENT_NATURAL_FILLGAPS=true;// enlarge windows at the end to fill gaps // not implemented yet
constWINDOW_PLACEMENT_NATURAL_GRID_FALLBACK=true;// fallback to grid mode if all windows have the same size and positions. // not implemented yet
constWINDOW_PLACEMENT_NATURAL_ACCURACY=20;// accuracy of window translate moves (KDE-default: 20)
constWINDOW_PLACEMENT_NATURAL_GAPS=5;// half of the minimum gap between windows
constWINDOW_PLACEMENT_NATURAL_MAX_TRANSLATIONS=5000;// safety limit for preventing endless loop if something is wrong in the algorithm
constPLACE_WINDOW_CAPTIONS_ON_TOP=true;// place window titles in overview on top of windows with overlap parameter
constWORKSPACE_BORDER_GAP=10;// minimum gap between the workspace area and the workspace selector
constWINDOW_AREA_TOP_GAP=20;// minimum gap between the workspace area and the top border. This keeps window captions and close buttons visible. 13px (26/2) should currently be enough.
* Returns clones with matching target coordinates and scales to arrange windows in a natural way that no overlap exists and relative window size is preserved.
* This function is almost a 1:1 copy of the function
* PresentWindowsEffect::calculateWindowTransformationsNatural() from KDE, see:
"description":"Add a systems status menu for quickly navigating places in the system",
"description":"Add a menu for quickly navigating places in the system.\nThis extension is part of Classic Mode and is officially supported by GNOME. Please do not report bugs using the form below, use GNOME's GitLab instance instead.",
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.