diff options
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | src/Overlay.cpp | 8 | ||||
-rw-r--r-- | src/main.cpp | 1 | ||||
-rw-r--r-- | tools/gsr-global-hotkeys/keyboard_event.c | 1 |
4 files changed, 7 insertions, 7 deletions
@@ -20,8 +20,6 @@ Make hotkeys configurable. Filechooser should have the option to select list view, search bar and common folders/mounted drives on the left side for quick navigation. Also a button to create a new directory. -Support wayland (excluding gnome, or force xwayland on gnome). - Restart replay on system start if monitor resolution changes. Show warning when selecting hevc/av1 on amd because of amd driver/ffmpeg bug. @@ -111,4 +109,4 @@ Re-enable hotkey disable option for flatpak. Make gsr-ui flatpak systemd work nicely with non-flatpak gsr-ui. Maybe change ExecStart to do flatpak run ... || gsr-ui, but make it run as a shell command first with /bin/sh -c "". -When enabling X11 global hotkey again only grab lalt, not ralt.
\ No newline at end of file +When enabling X11 global hotkey again only grab lalt, not ralt. diff --git a/src/Overlay.cpp b/src/Overlay.cpp index aa14e3b..48aa4d3 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -743,7 +743,10 @@ namespace gsr { // MGL_WINDOW_TYPE_DIALOG is needed for kde plasma wayland in some cases, otherwise the window will pop up on another activity // or may not be visible at all window_create_params.window_type = (is_kwin && gsr_info.system_info.display_server == DisplayServer::WAYLAND) ? MGL_WINDOW_TYPE_DIALOG : MGL_WINDOW_TYPE_NORMAL; - window_create_params.render_api = MGL_RENDER_API_EGL; + // Nvidia + Wayland + Egl doesn't work on some systems properly and it instead falls back to software rendering. + // Use Glx on Wayland to workaround this issue. This is fine since Egl is only needed for x11 to reliably get the texture of the fullscreen window on Nvidia + // when a compositor isn't running. + window_create_params.render_api = gsr_info.system_info.display_server == DisplayServer::WAYLAND ? MGL_RENDER_API_GLX : MGL_RENDER_API_EGL; if(!window->create("gsr ui", window_create_params)) fprintf(stderr, "error: failed to create window\n"); @@ -782,9 +785,6 @@ namespace gsr { update_compositor_texture(focused_monitor); - top_bar_text = mgl::Text("GPU Screen Recorder", get_theme().top_bar_font); - logo_sprite = mgl::Sprite(&get_theme().logo_texture); - bg_screenshot_overlay = mgl::Rectangle(mgl::vec2f(get_theme().window_width, get_theme().window_height)); top_bar_background = mgl::Rectangle(mgl::vec2f(get_theme().window_width, get_theme().window_height*0.06f).floor()); top_bar_text = mgl::Text("GPU Screen Recorder", get_theme().top_bar_font); diff --git a/src/main.cpp b/src/main.cpp index 9c20a81..c81bc8c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,7 @@ static void disable_prime_run() { unsetenv("__NV_PRIME_RENDER_OFFLOAD_PROVIDER"); unsetenv("__GLX_VENDOR_LIBRARY_NAME"); unsetenv("__VK_LAYER_NV_optimus"); + unsetenv("DRI_PRIME"); } static std::unique_ptr<gsr::GlobalHotkeysX11> register_x11_hotkeys(gsr::Overlay *overlay) { diff --git a/tools/gsr-global-hotkeys/keyboard_event.c b/tools/gsr-global-hotkeys/keyboard_event.c index bcfd616..74332ba 100644 --- a/tools/gsr-global-hotkeys/keyboard_event.c +++ b/tools/gsr-global-hotkeys/keyboard_event.c @@ -184,6 +184,7 @@ static void keyboard_event_process_input_event_data(keyboard_event *self, event_ if(event.type == EV_KEY) { keyboard_event_process_key_state_change(self, event, extra_data, fd); + /* We do this conversion from keycode to keysym back to keycode to support different keyboard layouts in the X server (which Wayland also uses to support Xwayland) */ uint32_t keycode = event.code; const uint32_t keysym = keycode_to_keysym(self, event.code); if(keysym) |