GUI System
Desktop environment and window manager
On This Page
GUI Architecture
guideXOS features a complete graphical user interface built from scratch, including a desktop environment, window manager, and UI toolkit. Everything is rendered using custom C# code directly to the framebuffer.
Components
- Desktop Environment - Main shell with wallpaper and icons
- Window Manager - Manages window lifecycle, Z-order, focus
- Taskbar - System tray, clock, Start menu, window list
- Start Menu - Application launcher
- Compositor - Combines windows into final framebuffer
- Event System - Mouse, keyboard, and window events
- Drag, resize, minimize, maximize, and close windows
- Multiple desktop workspaces
- Mouse cursor with smooth movement
- Keyboard shortcuts (Alt+Tab, Ctrl+Shift+Esc)
- Custom window decorations
- Transparent window effects
Desktop Environment
The desktop is the main interface users interact with after boot:
Desktop Components
┌──────────────────────────────────────────┐
│ Wallpaper (1024x768) │
│ │
│ 💻 My Computer 📁 Documents │
│ │
│ 🗑️ Recycle Bin ⚙️ Settings │
│ │
│ │
└──────────────────────────────────────────┘
│ [Start] [📋 Console] [🎨 Paint] 🕐 12:34│
└──────────────────────────────────────────┘
Taskbar
The taskbar at the bottom provides quick access to applications and system information:
- Start Button - Opens Start menu with application list
- Quick Launch - Pin favorite applications
- Window List - Shows all open windows, click to switch
- System Tray - Network status, volume, notifications
- Clock - Current time display
Start Menu
The Start menu organizes applications by category:
┌─ Start Menu ──────────┐
│ │
│ 📝 Accessories │
│ → Notepad │
│ → Calculator │
│ │
│ 🎨 Graphics │
│ → Paint │
│ → Image Viewer │
│ │
│ 🌐 Internet │
│ → Web Browser │
│ → IRC Client │
│ │
│ ⚙️ System │
│ → Console │
│ → Task Manager │
│ → File Manager │
│ │
│ 🔌 Shutdown │
└───────────────────────┘
Virtual Workspaces
Switch between multiple virtual desktops for better organization:
- Workspace 1 - General applications
- Workspace 2 - Development tools
- Workspace 3 - Communication apps
- Workspace 4 - System utilities
Window Manager
The window manager controls all window operations and visual appearance:
Window Structure
┌─ Title Bar ─────────────── _ □ ✕ ┐
│ Window Title │
├────────────────────────────────────┤
│ │
│ Client Area │
│ (Application content) │
│ │
│ │
└────────────────────────────────────┘
Window Operations
| Operation | Method |
|---|---|
| Move | Drag title bar |
| Resize | Drag window edges or corners |
| Minimize | Click minimize button (_) |
| Maximize | Click maximize button (□) or double-click title bar |
| Close | Click close button (✕) or Alt+F4 |
| Focus | Click anywhere on window |
| Switch | Alt+Tab or click taskbar button |
Z-Order Management
Windows are layered front-to-back. When a window gains focus, it moves to the front:
Window Stack (front to back):
[Window 3] ← Active window (on top)
[Window 1]
[Window 2] ← Background window
[Desktop] ← Bottom layer
Window States
- Normal - Standard window with title bar and border
- Maximized - Fills entire screen (minus taskbar)
- Minimized - Hidden, only appears in taskbar
- Fullscreen - Covers entire screen including taskbar
Tombstoning
guideXOS provides manual tombstoning to free up memory while preserving application state:
What is Tombstoning?
Tombstoning is a memory management feature that allows you to suspend an application and free its memory, while saving its state for later restoration. Unlike minimize (which keeps the app in memory), tombstoning completely unloads the application.
How to Tombstone an Application
1. Click the tombstone button (⏸️) in window title bar
↓
2. Application saves its state to disk:
- Window position and size
- Control values and data
- Application-specific state
↓
3. Application's memory is freed
↓
4. Window is marked as "tombstoned"
↓
5. Tombstoned app appears in Task Manager
How to Restore a Tombstoned Application
To restore (un-tombstone) an application:
- Via Task Manager: Open Task Manager, go to "Tombstoned" tab, select the app, and click "Restore"
- Via Console: Use command
restore [appname]
Restoration Process:
1. Load saved state from disk
↓
2. Reallocate memory for application
↓
3. Restore window and controls
↓
4. Application resumes where it left off
Tombstone Button
The tombstone button (⏸️) appears in the window title bar between the maximize and close buttons:
┌─ Title Bar ─────────── _ □ ⏸️ ✕ ┐
│ Window Title │
└────────────────────────────────┘
Tombstone button
When to Use Tombstoning
- Low Memory: Free up RAM while keeping work state
- Pause Large Apps: Suspend memory-heavy applications (Paint, Browser)
- Save Session: Preserve application state for later
- Multitasking: Temporarily unload apps you'll use again
Task Manager Integration
The Task Manager provides a dedicated "Tombstoned" tab showing all tombstoned applications:
| Action | Description |
|---|---|
| View List | See all tombstoned applications |
| Restore | Un-tombstone and resume application |
| End Task | Permanently close tombstoned app (discard state) |
| Memory Saved | View how much memory each tombstoned app freed |
Benefits of Tombstoning
- Free memory while keeping work saved
- Manual control over what to suspend
- No data loss - state is preserved
- Fast restoration (100-500ms)
- Network connections are dropped
- Real-time apps should not be tombstoned
- Requires disk space for state files
- Manual action required (not automatic)
Use tombstoning when you want to free memory but plan to return to the application later. It's like "Save and Close" combined - your work is saved and memory is freed, but you can restore it quickly from Task Manager or console!
Applications can implement the ITombstoneable
interface to customize what state is saved and how restoration is handled. This allows apps to save
only critical data and skip recreating transient resources.