Add window preview on hover with Aero Peek - #2470
Conversation
|
This is targetting the abondoned PR #574 |
|
I really hope this gets implemented. |
|
@dmzoneill I'm running your fork, there's an issue. Let's say chrome is open, i hover over it and open the chrome window, dash doesn't automatically hides, i have to go back and move mouse over somewhere else on the dock for it to happen. can you take a look? |
|
dock doesn't auto-hide after clicking a preview in hover mode. Fix requires changes to 2 files: windowPreview.js - In preview.connect('activate', () => {
Main.activateWindow(window);
const topMenu = this._getTopMenu();
if (topMenu.fromHover) {
topMenu.cancelOpen();
topMenu.cancelClose();
topMenu._boxPointer.close(BoxPointer.PopupAnimation.FADE, () => {
topMenu.actor.hide();
topMenu.isOpen = false;
if (topMenu._previewBox) {
topMenu._previewBox.destroy();
topMenu._previewBox = null;
}
topMenu.emit('menu-closed');
});
} else {
topMenu.close();
}
});appIcons.js - In this._signalsHandler.addWithLabel(PREVIEW_HOVER_LABEL, [
this._previewMenu,
'menu-closed',
() => {
if (this._hoverIsEnabled && !this._previewMenu.isOpen) {
this.emit('menu-state-changed', false);
}
},
]);Please fix on your end and then update pr please. |
|
Thanks for the feedback, I'm eager for this feature to be merged.. so i dont have to run a dev copy . Please can you describe the steps clearly. In my case: if im understanding your issue, i suspect you have a conflicting setting. Can you share the schema settings? this fix may work with your settings, may break for others. |
|
@dmzoneill I noticed a small issue with dock autohide behavior. When the mouse pointer moves away from the preview of the currently active window, the preview correctly disappears, but the dock does not autohide (even when autohide is enabled). Expected behavior Once the cursor moves from the window preview back to the window area, the dock should autohide automatically. Proposed fix This can be resolved by making a small change in windowPreview.js. Modify _endHoverSession() as follows: This explicitly triggers the dock’s leave logic once the preview hover session ends, ensuring autohide works as expected. |
|
@Shobhit043 i'm not entirely sure what version of the dock you're running. |
Thanks |
|
it'd be amazing if this got implemented |
|
I hope it gets merged! |
|
I've tested the fork on a secondary machine for a couple days, works great ! Haven't noticed any particular problems. |
|
@dmzoneill Works awesome, nice job, hope to see it merged soon. :) |
|
SUPER! this is the feature i'll waiting for! |
|
2k lines AI-generated commit as 61200e8 ? No, thanks. If you want a chance this to be reviewed and merged, split all the changes in atomic and incremental commits with clear explaination of why (not what), without unneeded comments. Drop the unneeded things (all this animation stuff), simplify it to the minimum and re-iterate in future in case. |
|
https://extensions.gnome.org/extension/9492/dock-window-preview/?c=173763 - the easy way use another extension :D |
Implements hover-to-preview functionality for dash-to-dock, showing window thumbnails when hovering over application icons. Includes Windows Aero Peek style transparency effect and multiple animation options. Features: - Hover over dock icons to see window previews after 300ms delay - Click on preview thumbnails to activate windows - Aero Peek: hovering over a preview makes other windows transparent - Icon-to-icon transitions: smoothly move between dock icons - Auto-show preview when launching apps while hovering - Configurable animation styles (instant, fade, slide, scale, expand, etc.) - Configurable preview size scaling - Preview shows on hover, click still opens traditional menu Technical implementation: - New setting 'show-previews-hover' to enable/disable hover previews - New setting 'preview-animation-style' with 7 animation options - WindowPreviewMenu extended with hover mode support - Hover mode removes menu from PopupMenuManager to prevent auto-close - BoxPointer made non-reactive to allow events through to dock icons - BoxPointer.bin remains reactive for clicking on window previews - windows-changed signal triggers auto-show when apps launch - 200ms delay ensures windows are properly sized before preview - Proper timeout management for smooth hover interactions Animation styles: 0. Instant - No animation 1. Fade - Pure opacity fade 2. Slide - Slide from dock with fade 3. Scale - Zoom in with scale 4. Expand - Width/height expand (default) 5. Dissolve - Quick fade with subtle scale 6. CASCADE - Staggered item appearance User experience improvements: - 300ms hover delay prevents accidental previews - Preview stays open when moving from icon to preview - 300ms delay before closing when mouse leaves - Smooth transitions between different dock icons - Instant feedback when launching applications
Adds translations for the new window preview settings introduced in commit cb0a478. Each language now includes translations for: - "Show window previews on mouse hover" - "Preview animation style" - Animation options: Instant, Fade, Slide, Scale, Expand, Dissolve, Cascade All 28 languages updated: ar, cs, de, el, es, eu, fr, gl, hu, id, it, ja, ko, nb, nl, pl, pt, pt_BR, ru, sk, sl, sr, sr@latin, sv, tr, uk_UA, zh_CN, zh_TW
- appIcons.js: remove unnecessary braces from single-statement if (curly) - dash.js: add missing BoxPointer import (no-undef), rename shadowed variable (no-shadow) - windowPreview.js: remove unused vars (PREVIEW_MAX_WIDTH, logFileStream, HOVER_LEAVE_TIMEOUT), omit unused catch binding, fix line length, convert non-interpolated template literals to single quotes, use object shorthand for delay property, remove unnecessary braces
Adds a new 'custom-border-radius' setting (integer, default -1 for theme default) that lets users override the dock background border radius. The setting is applied through theming.js and exposed in the Appearance tab of the preferences dialog as a spin button (-1 to 99).
When all of an app's windows are minimized, GNOME Shell's WindowTracker.focus_app may still report the app as focused. This caused the dock icon to remain highlighted and subsequent clicks to not raise the minimized window, because the activate logic saw the app as already focused. Check whether at least one window is actually visible on the active workspace before marking the icon as focused.
Add a new setting 'clear-notifications-on-focus' that automatically clears the notification counter badge on dock icons when the application window receives focus. The notifications themselves remain in the GNOME Shell notification tray for manual dismissal. Adds schema key, Settings UI toggle, prefs.js binding, and the acknowledgeAppNotifications() method in NotificationsMonitor.
When using dynamic transparency with a wallpaper changer like Variety, notify::allocation signals fire at high frequency on window actors. Each signal triggered _updateSolidStyle which calls set_style() and get_transformed_position(), overwhelming the compositor's style/layout pipeline and potentially freezing or crashing the GUI. Coalesce rapid _updateSolidStyle calls into a single GLib idle callback so that no matter how many allocation changes arrive in one frame, only one style update is performed.
When the pointer moves quickly from another monitor through the dock, the Clutter leave event can be lost, leaving the dock stuck visible with a stale hover state. Add a 500ms safety timer in _hoverChanged() that calls sync_hover() to verify the pointer is still actually over the dock, resolving the frozen/zoomed state.
…screen When intellihide is active, the dock disables compositor unredirection to ensure it renders on top of windows. However, disabling unredirect forces the compositor to composite every frame, which breaks VRR/Freesync for fullscreen applications. Skip the unredirect manipulation when the monitor is in fullscreen, since the dock should not need to overlay a fullscreen surface in normal operation. This preserves VRR for all intellihide dodge-window modes.
…s none When isolate-monitors is enabled and a window is moved to a different monitor, getInterestingWindows() returns an empty array for the dock on the original monitor. This caused click actions (focus, minimize, cycle) to fail silently or launch a new window instead of activating the existing one. Now when the app is running but isolation filters out all windows, we fall back to the full unfiltered window list so that the click action can find and activate/restore the window on the other monitor.
Auto-fixed: comma-spacing, space-infix-ops, quotes, tabs/indent. Manual: catch(e) -> catch(_e), catch(_e) -> catch(_) for unused vars.
Scheduled daily at 06:17 UTC (+ manual trigger). Detects new issues and PRs on micheleg/dash-to-dock, mirrors issues to our tracker, and auto-creates PRs for cleanly-applying upstream changes.
Shell versions narrowed to 47-50. Updated both workflows to actions/checkout@v5 to avoid Node.js 20 deprecation warning. Added npm artifacts to gitignore.
Extract hook_up_vfunc_symbol and gobject_prototype_symbol from public GObject.Object.prototype instead of the private imports._gi module. This resolves EGO review flag EGO-I-004 while preserving the runtime vfunc injection behavior needed by VFuncInjectionsHandler.
St.ThemeContext.get_for_stage(global.stage).scaleFactor is not yet deprecated in GNOME 47+, but returns a global value. Add inline notes at each call site where monitor index is available, flagging potential future use of global.display.get_monitor_scale(monitorIndex) for per-monitor scale correctness.
The 'preferred-monitor' integer key (default -2) was a legacy fallback for index-based monitor selection. The connector-based key 'preferred-monitor-by-connector' has been the primary path for all current configurations. Remove the deprecated schema key and simplify docking.js and prefs.js to use only the connector-based approach.
bounceAnimation.js: Track 16ms sync and 80ms step timer IDs in a Set, clean them up in both cleanup() and stop() to prevent callbacks firing on destroyed actors when the extension is disabled mid-animation. utils.js: CancellableChild.cancel() now removes any pending _disconnectIdle source before disconnecting from the parent, preventing a leaked idle callback after cancellation.
Move untracked signal connections in DockedDash and IconAnimator to use the existing _signalsHandler system so they are centrally tracked and guaranteed to disconnect on destroy. This covers the box hover signal, allocation/slider layout signals, self notify::visible/destroy handlers, translation-update signals, and the IconAnimator's St.Settings and timeline connections.
Track scrollView, showAppsButton, showAppsIcon, self-destroy, and dash-leave-event signals through _signalsHandler instead of raw .connect() with manual ID tracking. The dash-leave hover signal now uses addWithLabel/removeWithLabel for clean enable/disable cycling.
Track self property-change signals (notify::running, notify::focused, notify::updating, notify::urgent) and Main.overview 'hiding' connections through _signalsHandler instead of raw .connect(). The overview signals now use labeled tracking (MENU_OVERVIEW, PREVIEW_OVERVIEW) so they are properly cleaned up when menu actors are destroyed, preventing potential leaks on the global singleton during extension disable/re-enable cycles.
Removed @eslint/js import from eslint.config.mjs — inlined the recommended rules to avoid missing package in CI. Fixed shexli workflow dependency conflict by installing tree-sitter first.
|
This doesn't make sense as a merge request. It's changing over 6k lines of code in a project that is only 13k lines of code. I suggest you should either break it into much smaller proposals for review or maintain it as a separate project. |
|
It's clear this is now a project fork since the branch name is So this is never going to be merged into dash-to-dock. Closing. |
Adds hover-to-preview functionality for dash-to-dock, showing window thumbnails when hovering over application icons.
Reworked per review feedback: split into atomic commits, dropped animation system and translations, removed debug logging.
Features
show-previews-hoversetting with toggle in preferencesCommits
show-previews-hoverboolean settingenableHover()/disableHover()per icon, close hover on right-clickHow it works
WindowPreviewMenu.enableHover()removes the menu fromPopupMenuManagerand makes theBoxPointernon-reactive so pointer events pass through to dock icons, whileBoxPointer.binstays reactive for clicking window thumbnails_hoverChanged()inDockedDashchecks for open preview menus before autohidingwindows-changedsignal triggers auto-show with a 200ms delay for window initialization