diff --git a/README.md b/README.md index 1c592e9..cb849c7 100644 --- a/README.md +++ b/README.md @@ -71,3 +71,6 @@ I'm looking for somebody that can create sound effects for the notifications. If you have previously used the flatpak version of GPU Screen Recorder with the new UI then the non-flatpak version of the systemd service will conflict with that. Run `gsr-ui` to fix that. ## I use a non-qwerty keyboard layout and I have an issue with incorrect keys registered in the software This is a KDE Plasma Wayland issue. Use `setxkbmap ` command, for example `setxkbmap se` to make sure X11 applications (such as this one) gets updated to use your languages keyboard layout. +## "Save to clipboard" option doesn't work for screenshots +Some Wayland compositors don't support copying images on the clipboard between X11 and Wayland applications. GPU Screen Recorder UI is an X11 application. It can't be done properly on Wayland +since Wayland doesn't support a non-focused application from setting the clipboard, so it can't work with GPU Screen Recorder hotkey usage. Use X11 if you want a functioning desktop. \ No newline at end of file diff --git a/TODO b/TODO index ab7405d..9728223 100644 --- a/TODO +++ b/TODO @@ -231,4 +231,8 @@ Add option to include game name in file name (video and screenshot). Replace / w Check if the focused window is on top on x11 when choosing to take screenshot or show the window as the background of the overlay. -Convert clipboard image to requested type (from jpg to png for example). \ No newline at end of file +Convert clipboard image to requested type (from jpg to png for example). + +Save clipboard image with wayland on wayland. Some wayland compositors (such as hyprland, budgie and maybe more (wlroots based ones?)) don't support copying clipboard image data from x11 applications to wayland applications. + This can be done because retarded wayland only supports setting clipboard when the application has focus. This doesn't work with hotkey screenshot use. + This is specifically an issue when using wl_data_device_manager, which is a standard protocol. It can be done when using wlr specific protocol. diff --git a/src/gui/ScreenshotSettingsPage.cpp b/src/gui/ScreenshotSettingsPage.cpp index 4fb1251..b69203c 100644 --- a/src/gui/ScreenshotSettingsPage.cpp +++ b/src/gui/ScreenshotSettingsPage.cpp @@ -216,7 +216,7 @@ namespace gsr { } std::unique_ptr ScreenshotSettingsPage::create_save_screenshot_to_clipboard() { - auto checkbox = std::make_unique(&get_theme().body_font, "Save screenshot to clipboard"); + auto checkbox = std::make_unique(&get_theme().body_font, gsr_info->system_info.display_server == DisplayServer::X11 ? "Save screenshot to clipboard" : "Save screenshot to clipboard (Not supported properly by Wayland)"); save_screenshot_to_clipboard_checkbox_ptr = checkbox.get(); return checkbox; }