Fix incorrect region captured on wayland when using monitor scaling and without letting x11 scale monitors

This commit is contained in:
dec05eba
2026-01-20 18:31:29 +01:00
parent e44b2ec528
commit 794064a8b8
9 changed files with 360 additions and 273 deletions

View File

@@ -24,6 +24,8 @@
#include <array>
struct wl_display;
namespace gsr {
class DropdownButton;
class GlobalHotkeys;
@@ -162,6 +164,9 @@ namespace gsr {
void on_press_take_screenshot(bool finished_selection, ScreenshotForceType force_type);
bool update_compositor_texture(const Monitor &monitor);
void add_region_command(std::vector<const char*> &args, char *region_str, int region_str_size);
void add_common_gpu_screen_recorder_args(std::vector<const char*> &args, const RecordOptions &record_options, const std::vector<std::string> &audio_tracks, const std::string &video_bitrate, const char *region, char *region_str, int region_str_size, const std::string &region_area_option);
std::string get_capture_target(const std::string &capture_target, const SupportedCaptureOptions &capture_options);
void force_window_on_top();
@@ -250,6 +255,8 @@ namespace gsr {
Display *x11_dpy = nullptr;
XEvent x11_mapping_xev;
struct wl_display *wayland_dpy = nullptr;
mgl::Clock replay_save_clock;
bool replay_save_show_notification = false;
ReplayStartupMode replay_startup_mode = ReplayStartupMode::TURN_ON_AT_SYSTEM_STARTUP;