hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.1k stars 882 forks source link

GTK4 Apps Popup Blurry Text #4972

Closed JustasPolis closed 7 months ago

JustasPolis commented 7 months ago

Hyprland Version

Hyprland, built from branch  at commit 12985fa0d8e43b1e33326dfb49be681970dfaea5  ().
Date: 2024-03-05
Tag: 

flags: (if any)

System Information:
System name: Linux
Node name: nixos
Release: 6.7.5
Version: #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 16 18:14:32 UTC 2024

GPU information: 
63:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c7) (prog-if 00 [VGA contr
olle
r])

os-release: BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="23.11.20240218.e0da498"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 23.11 (Tapir)"
SUPPORT_END="2024-06-30"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="23.11 (Tapir)"
VERSION_CODENAME=tapir
VERSION_ID="23.11"

Bug or Regression?

Regression

Description

Text became very blurry in GTK4 layer popups after 2e111c8cf97d391c25fc6263660271fab605ece1

b39dcfa497f84486569bf862092dfcfadbfd8747 works fine.

Something in xdg-popup reimplementation broke.

How to reproduce

Use GTK4 layer and render popup with text.

I can provide repro repo (gtk4-rs)

Or use any GTK-4 app and check popup (Celluloid as an example).

Crash reports, logs, images, videos

b39dcfa497f84486569bf862092dfcfadbfd8747 commit look before breakage:

2024-03-05-120356_hyprshot

after 2e111c8cf97d391c25fc6263660271fab605ece1:

2024-03-05-121036_hyprshot

vaxerski commented 7 months ago

since you offer, please provide repro and give your config

JustasPolis commented 7 months ago

do you use nix ? Will be easier that way to provide all dependencies :)

vaxerski commented 7 months ago

no

JustasPolis commented 7 months ago

https://github.com/JustasPolis/hypr-popup-repro

to run gtk4 for arch: sudo pacman -S gtk4 base-devel

rust version: 1.76.0

my config:

monitor=eDP-1,2560x1600@90,auto,2
monitor=DP-1, 3840x2160@144,auto,2
monitor=DP-2, 3840x2160@144,auto,2

exec-once = dbus-hyprland-environment
exec-once = bash ~/.config/hypr/scripts/monitors.sh

$terminal = kitty
$app_menu = ~/.config/hypr/scripts/apps.sh
$browser = firefox
exec-once=hyprctl setcursor Bibata-Modern-Ice 24
exec-once=hyprctl dispatch exec [workspace 3 silent] $browser

exec-once = hyprpaper & hypridle & configure-gtk 

exec-once=systemctl --user restart pulseaudio.service
exec-once=sway-audio-idle-inhibit

env = WLR_NO_HARDWARE_CURSORS,1
env = XCURSOR_SIZE,24
env = XCURSOR_THEME,capitaine-cursors
env = DESKTOP_SESSION,hyprland
env = XDG_SESSION_TYPE,wayland
env = GTK_USE_PORTAL,0
env = GTK_DEBUG,0

$base           = 0xff191724
$surface        = 0xff1f1d2e
$overlay        = 0xff26233a
$muted          = 0xff6e6a86
$subtle         = 0xff908caa
$text           = 0xffe0def4
$love           = 0xffeb6f92
$gold           = 0xfff6c177
$rose           = 0xffebbcba
$pine           = 0xff31748f
$foam           = 0xff9ccfd8
$iris           = 0xffc4a7e7
$highlightLow   = 0xff21202e
$highlightMed   = 0xff403d52
$highlightHigh  = 0xff524f67

env = XCURSOR_SIZE, 36

input {
    kb_layout = us
    kb_variant = 
    kb_model = 
    kb_options =
    kb_rules =

    follow_mouse = 1

    touchpad {
        natural_scroll = no
    scroll_factor = 0.2
    disable_while_typing = true
    drag_lock = true
    tap-and-drag = true
    }

    sensitivity = -0.2 
    repeat_delay = 150
    repeat_rate = 90
}

device {
  name = steelseries-steelseries-rival-110-gaming-mouse 
  sensitivity=-1.2
}

general {
    gaps_in = 5
    gaps_out = 20
    border_size = 0
    col.active_border = $rose $pine $love $iris 
    col.inactive_border = $muted
    layout = dwindle
    allow_tearing = false
}

decoration {

rounding = 5

blur { 
  enabled = false
  size = 5
  passes = 2
  new_optimizations = true
  special = true 
  brightness = 0.9
}

  drop_shadow = false
  shadow_range = 3
  shadow_render_power = 1
  col.shadow = rgba(1a1a1aee)
}

animations {
    enabled = yes

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    #animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 0, 5, default
}

dwindle {
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

master {
    new_is_master = true
}

gestures {
    workspace_swipe = off
}

misc {
    force_default_wallpaper = 0 
    disable_splash_rendering = true
    disable_hyprland_logo = true
}

windowrulev2 = size 500 500, title: Save Image
windowrulev2 = center, title: Save Image
windowrulev2 = center, title: Save As
windowrulev2 = size 500 500, title: Save As
windowrulev2 = workspace 3, class:($browser)
windowrulev2 = workspace 2, class:($terminal)
windowrulev2 = workspace 1,title:^(lf)$ 
windowrulev2 = float, class:(swayimg) 
windowrulev2 = center, class:(swayimg) 
windowrulev2 = noborder, class:(swayimg) 
windowrulev2 = workspace 5, class:(celluloid)
layerrule = unset, testing

$mainMod = SUPER

bind = $mainMod, T, exec, $terminal
bind = $mainMod, Q, killactive, 
bind = $mainMod, B, exec, $browser
bind = $mainMod, SPACE, exec, $app_menu 
bind = $mainMod, F, exec, $file_manager
bind = $mainMod, M, exit,

bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d

bind = $mainMod, 1, exec, hyprctl dispatch workspace 1
bind = $mainMod, 2, exec, hyprctl dispatch workspace 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
bind = $mainMod SHIFT, S, exec, hyprshot -m region
bind = , F5, exec, brightnessctl set 10%-
bind = , F6, exec, brightnessctl set +10%
bind = , F2, exec, pamixer --decrease 10
bind = , F3, exec, pamixer --increase 10
bind = , F1, exec, pamixer --toggle-mute
bind = , F10, exec, systemctl suspend && hyprlock
bind = $mainMod, Z, fullscreen
vaxerski commented 7 months ago

why does it have to be rust... Anyways, fails to compile due to missing gtk4-layer-shell which doesn't compile from the aur, does this not happen in any mainstream gtk4 app?

JustasPolis commented 7 months ago

shit, sorry for that.

I checked Celluloid (GTK4) app, and it's popups, they have severe text degradation, very blurry. Can you check that ?

vaxerski commented 7 months ago

"The strongest principle of growth lies in the human choice."    - George Eliot, "Daniel Deronda"