Skip to content

Pull Request for Feature: Hot Corners option to show only current application windows#13799

Open
ewmailing wants to merge 27 commits into
linuxmint:masterfrom
ewmailing:scaleapp-all-mastermerge
Open

Pull Request for Feature: Hot Corners option to show only current application windows#13799
ewmailing wants to merge 27 commits into
linuxmint:masterfrom
ewmailing:scaleapp-all-mastermerge

Conversation

@ewmailing
Copy link
Copy Markdown

Hello, this is my first time trying to contribute. I apologize in advance for any mistakes I make in this process. I am happy to have further discussion or make changes that you request. But I wanted to try to get the process of contributing this patch started before it becomes too stale or abandoned to time.

I implemented the feature that allows "Hot Corners to show only current application windows", which is described in this open feature request:
#10988

This feature is similar to the existing hot corner feature, "Show all windows", also known as "Scale" in the code and also the core applet by the same name. The difference is that this feature only shows the windows of the current active application. I will refer to my feature variation as "ScaleApp" for brevity.

On Apple macOS, the feature is called "Application Windows".
On KDE Plasma, the feature is called "Present Windows - Current Application".

My implementation builds on top of the existing 'Scale' implementation by adding a section that can filter for the windows that belong to the current active application. If the new mode, "scaleapp" is requested, the list of windows to scale runs through this filter. Otherwise, all the original "scale" behavior is run and will preserve all existing behavior.

This has been tested by me and @GalaticSun, who was the original submitter of the aforementioned Feature Request.
#10988
If you want to see the development history details, I encourage you to read through that ticket.

But in summary:

I originally implemented this against Mint 22.2 (Cinnamon 6.4.8).
ewmailing@dc19558

I then merged/updated the implementation for Mint 22.3 (Cinnamon 6.6.7)
ewmailing@3cd1ca0

And finally for this Pull Request, I have merged/updated for master.
ewmailing@d7caf78

To test this feature, there are two different ways to activate it.

  1. Use the Hot Corners applet
  2. Use the new ScaleApp applet, which was derived from the existing Scale applet for completeness and consistency.

Testing Procedure:

  1. Open Hot Corners.

  2. Set one corner to Show application Windows. Set another corner to Show all windows (to verify the classic behavior still works as before).

  3. Open Applets.

  4. Add the Scale applet and the Scale App applet.

  5. Open multiple windows from different applications, e.g. open 2 different windows in Firefox and then open 2 different windows in Terminal.

  6. Move the mouse to the corner with "Show all windows". You should see all your windows presented via "scale". Click on one of the windows to select, or you can move back to the same corner to cancel the scale operation.

  7. Make Terminal your current active application by clicking on a Terminal window. Move the mouse to the corner with "Show application windows". You should see only your 2 Terminal windows presented via "scaleapp". Click on one of the windows to select, or you can move back to the same corner to cancel the operation.

  8. Repeat the same test described in step 6 by clicking on the Scale applet button in your Tray. This will trigger the "scale" mode which shows all your windows. This applet does not have a cancel ability, so click a window to select it and end the mode.

  9. Like step 8, repeat the test in step 7. Make Terminal your current active application. Then click on the ScaleApp applet button in your Tray. This should show only your 2 Terminal windows. Select one of them to leave the mode.

mtwebster and others added 27 commits February 6, 2025 10:49
event list is opened.

The applet relies on evolution-data-server being aware of changes
and keeping up-to-date. Unfortunately, online accounts aren't
polled often unless a real client is launched (like gnome-calendar).

Enable client refreshing in the cinnamon-calendar-server process
and trigger it when the applet is opened. This should refresh the
applet event view with any recent updates, even from remote sources.

Fixes linuxmint#12652.
The monitor index is being passed, but can't be assumed to be
the array index also. Track by key/values instead.

ref: https://bugzilla.redhat.com/show_bug.cgi?id=2341980
…t#12731)

This was missed during the port to the new OSD. Using gestures to change the
volume was also always using the max amplified volume. Fix this to respect the
users setting while we are at it.

Closes: linuxmint#12646
…linuxmint#13464)

There isn't enough consistency between various removable device types
and filesystems to be able to rely on can_eject() here.

ref:
linuxmint#13370
…inuxmint#13492)

Use explicit 'from bin import util' instead of bare 'import util' to
prevent conflicts with local util.py files in the user's working
directory or Python path.

Fixes linuxmint#13490
Since 0344b11, cinnamon-menu-editor crashes at startup
when it imports JsonSettingsWidgets.
selecting 'suspend' or 'hibernate'.

This was preventing the session manager from responding with an
inhibitor list and giving the user the option to ignore them and
'force' the action, as happens correctly with other options. It
was also breaking the lifecycle of this dialog and disable it
from showing again.

Also fix an issue with the inhibitor list not clearing existing
items when receiving an updated list from the session manager.

Fixes linuxmint/cinnamon-session#193.
…mint#10988

This implements a variation based on the 'scale' feature that shows only the current  application windows instead of all the application windows. The new variation is called 'scaleapp'. It shares the 'scale' code and simply filters the list of windows down to the current application if this mode is requested.

The changes are primarily in workspace.js, but also touches hotCorner.js and overview.js.

The changes in cs_hotcorner.py make the feature accessible in the UI. The name used is 'Show application windows', which is derived from the name 'Application Windows' from Mac, but follows the existing paradigm in the existing Cinnamon UI. (KDE Plasma uses 'Present Windows - Current Application' which didn't fit the paradigm as well.)

Refer to linuxmint#10988 for more discussion.
For the scaleapp feature, a few new lines accidentally had tabs instead of spaces.
Merge forward scaleapp-feature based on 6.4.8 to 6.6.7.
Now that scaleapp has been implemented, for consistency, created a new applet for scaleapp, based off the scale applet. The code is virtually identical except for the name changes, the icon, and one parameter to toggle() which activates scaleapp instead of scale.

A distinct icon is needed to tell it appart from the scale icon since both may exist in the tray at the same time. The new icon is a modification of the scale icon, where there are 4 larger squares instead of 9 smaller squares. The thinking behind this is the number of application windows is less than the number of total windows, so the view will have fewer windows and be bigger.
Defensively renamed the class name of the scale-app applet to be different that the scale applet, which it was originally copied from. The same name didn't seem to be a problem in testing, but it seemed like a good idea to make it unique to be safe.
…t refactor

Merged the 6.6.7 scaleapp feature into the master branch (6.7.x). There was a recent refactor for this system, so additional changes were needed to scaleapp to adapt to the refactor.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Most findings
are advisory and do not automatically disqualify a pull request.

This check is not perfect and will not replace a normal review.


Found 1 potential issue(s):

⚠️ WARNING

⚠️ lang_bind

files/usr/share/cinnamon/applets/scaleapp@cinnamon.org/applet.js:19

this.actor.connect('enter-event', Lang.bind(this, this._onEntered));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.


Automated pattern check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants