Skip to content

Conversation

@juarezr
Copy link
Contributor

@juarezr juarezr commented Oct 3, 2025

Summary

This PR introduces a new "Windows" settings page in the Forge extension preferences that allows users to view and manage floating window overrides directly from the GUI. This replaces the need to manually edit configuration files and provides a more user-friendly interface for managing which windows should float.

Changes Made

🆕 New Features

  • New Windows Settings Page: Added a dedicated preferences page (FloatingPage) for managing floating windows
  • Visual Window Management: Users can now see all currently configured floating windows with their titles and window classes
  • Remove Functionality: Added ability to remove floating window overrides directly from the preferences interface
  • Real-time Updates: Changes made in preferences are immediately reflected in the main extension without requiring restart

🔧 Technical Improvements

  • Reload Mechanism: Implemented a signal-based system (window-overrides-reload-trigger) to notify the main extension when floating overrides are modified
  • Dangling Pointer Fix: Refactored window override management to prevent dangling pointer issues by properly accessing fresh data from ConfigManager
  • Widget Reusability: Added RemoveItemRow widget component for consistent UI patterns

🛠️ Infrastructure Updates

  • Makefile Refactoring: Improved test rules and added better error handling for disable command
  • Schema Updates: Added new GSettings key for the reload trigger mechanism
  • Translation Support: Updated all translation files (es, fr, it, nl, pt_BR, tr) with new strings

Files Changed

Core Functionality

  • lib/prefs/floating.js - New floating windows management page
  • lib/prefs/widgets.js - Added RemoveItemRow widget component
  • lib/extension/window.js - Added reload mechanism and fixed dangling pointers
  • prefs.js - Integrated new floating page into preferences

Configuration & Schema

  • schemas/org.gnome.shell.extensions.forge.gschema.xml - Added reload trigger setting

Translations

  • Updated all .po files with new translatable strings
  • Synchronized line numbers across all translation files

Build System

  • Makefile - Refactored test rules and improved error handling

How It Works

  1. View Floating Windows: The new page displays all windows configured to float, showing both the window title and WM class
  2. Remove Overrides: Users can click the remove button next to any floating window to remove it from the floating list
  3. Real-time Sync: When changes are made, a timestamp is set in GSettings that triggers the main extension to reload its window overrides
  4. Persistent Storage: All changes are saved to the configuration file and persist across extension restarts

Testing

✅ Tested floating window removal functionality
✅ Verified real-time reload mechanism works correctly
✅ Confirmed changes persist across extension restarts
✅ Updated translation files are properly formatted

@juarezr juarezr added the enhancement New feature or request label Oct 3, 2025
@juarezr juarezr self-assigned this Oct 6, 2025
@juarezr
Copy link
Contributor Author

juarezr commented Oct 6, 2025

Windows Preference Page

Screenshot:

image

Copy link
Collaborator

@jmmaranan jmmaranan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I am not able to test it though

@jmmaranan jmmaranan merged commit ab49d98 into forge-ext:main Oct 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants