Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved startup speed on high-res Wayland systems #688

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IPnator
Copy link

@IPnator IPnator commented Feb 24, 2025

Introduced a new enum CaptureMode with options PRE_CAPTURE and SILENT_CAPTURE to enhance startup speed on Linux desktop environments that support transparent windows.

  • PRE_CAPTURE: The classic way where a screenshot is taken before the main window opens, setting the screenshot as the background in the main window.

  • SILENT_CAPTURE: Opens the main window immediately without a screenshot background, using transparency to show the actual content behind.

Added a new attribute capture_mode to the main window, initialized with the return value of the capture_mode() function. The capture_mode() function determines the supported CaptureMode, preferring SILENT_CAPTURE when available, otherwise defaulting to PRE_CAPTURE.

This change improves startup speed, particularly on Wayland systems with high-resolution monitors. Nice side effect: the cursor is no longer in the way when making a selection and the image looks a little clearer.

Updated the main window's behavior and documentation to reflect these changes.

Introduced a new enum `CaptureMode` with options `PRE_CAPTURE` and
`SILENT_CAPTURE` to enhance startup speed on Linux desktop environments
that support transparent windows.

- `PRE_CAPTURE`: The classic way where a screenshot is taken before the
                 main window opens, setting the screenshot as the
                 background in the main window.

- `SILENT_CAPTURE`: Opens the main window immediately without a
                    screenshot background, using transparency to show
                    the actual content behind.

Added a new attribute `capture_mode` to the main window, initialized
with the return value of the `window_mode()` function. The
`window_mode()` function determines the supported `CaptureMode`,
preferring `SILENT_CAPTURE` when available, otherwise defaulting to
`PRE_CAPTURE`.

This change improves startup speed, particularly on Wayland systems with
high-resolution monitors. Nice side effect: the cursor is no longer in
the way when making a selection and the image looks a little clearer.

Updated the main window's behavior and documentation to reflect these changes.
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.

1 participant