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

Cannot move window between vertically stacked monitors with different scales. #8605

Open
1 task done
GardenerGeralt opened this issue Nov 28, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@GardenerGeralt
Copy link

Already reported ? *

  • I have searched the existing open and closed issues.

Regression?

No

System Info and Version

System/Version info
Hyprland 0.45.2 built from branch  at commit 12f9a0d0b93f691d4d9923716557154d74777b0a  ([gha] Nix: update inputs).
Date: Tue Nov 19 21:47:18 2024
Tag: v0.45.2, commits: 5451
built against aquamarine 0.5.0


flags set:
debug


System Information:
System name: Linux
Node name: archlinux
Release: 6.12.1-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Fri, 22 Nov 2024 16:04:27 +0000


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-H GT2 [UHD Graphics] [8086:9bc4] (rev 05) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:

======Config-Start======


Config File: /home/misha/.config/hypr/hyprland.conf: Read Succeeded
# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf

xwayland {
    force_zero_scaling = true
}

################
### MONITORS ###
################

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1,1920x1080,0x0,1.5
monitor=DP-3,1920x1080,-320x-1080,1
monitor=DP-4,1920x1080,-320x-1080,1
monitor=DP-5,1920x1080,-320x-1080,1

###################
### MY PROGRAMS ###
###################

# See https://wiki.hyprland.org/Configuring/Keywords/

# Set programs that you use
$terminal = wezterm
$fileManager = thunar
$browser = zen-browser
$menu = wofi --show drun
$run = wofi --show run
$changeWallpaper = /home/misha/.config/wofi/scripts/select-wallpaper.sh

#################
### AUTOSTART ###
#################

# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:

# exec-once = $terminal
# exec-once = nm-applet &
exec-once = "/home/misha/.config/hypr/launch-waybar" &
exec-once = "wal -R" &
exec-once = swaync & polkit-kde-agent & hyprpaper & nm-applet   # & hypridle 

source = /home/misha/.cache/wal/colors-hyprland.conf

#############################
### ENVIRONMENT VARIABLES ###
#############################

# See https://wiki.hyprland.org/Configuring/Environment-variables/

env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24


#####################
### LOOK AND FEEL ###
#####################

# Refer to https://wiki.hyprland.org/Configuring/Variables/

# https://wiki.hyprland.org/Configuring/Variables/#general
general { 
    gaps_in = 2
    gaps_out = 5

    border_size = 2

    # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
    col.active_border = $color11 rgba(00000000) $color14 45deg
    col.inactive_border = rgba(00000000)

    # Set to true enable resizing windows by clicking and dragging on borders and gaps
    resize_on_border = false 

    # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
    allow_tearing = false

    layout = dwindle
}

# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
    rounding = 10

    # Change transparency of focused and unfocused windows
    active_opacity = 0.6
    inactive_opacity = 0.6

    shadow {
        enabled = true
        range = 4
        render_power = 3
        color = rgba(1a1a1aee)
    }

    # https://wiki.hyprland.org/Configuring/Variables/#blur
    blur {
        enabled = true 
        size = 1
        passes = 6 
        contrast = 1 
        brightness = 1 
        ignore_opacity = true
    }

    layerrule = blur, waybar
    # layerrule = blur, wofi
}

# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {
    enabled = true

    # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = defaultBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, defaultBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}

# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
    pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = true # You probably want this
}

# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master {
    new_status = master
}

# https://wiki.hyprland.org/Configuring/Variables/#misc
misc { 
    force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
    disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
}


#############
### INPUT ###
#############

# https://wiki.hyprland.org/Configuring/Variables/#input
input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =
    
    #kb_options = ctrl:num_lock
    numlock_by_default = true

    follow_mouse = 1

    sensitivity = 0.25 # -1.0 - 1.0, 0 means no modification.

    touchpad {
        scroll_factor = 0.2
        natural_scroll = true
    }
}

# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
    workspace_swipe = true
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
    name = epic-mouse-v1
    sensitivity = -0.5
}


###################
### KEYBINDINGS ###
###################

# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # Sets "Windows" key as main modifier

### EXECUTE ###

# Run program
bind = $mainMod, Return, exec, $terminal
bind = $mainMod, X, exec, $browser
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, Space, exec, $menu
bind = $mainMod ALT, Space, exec, $run

# Update wallpaper
bind = $mainMod, W, exec, $changeWallpaper && killall waybar && waybar

# Take screenshot
bind = $mainMod SHIFT, 3, exec, hyprshot -m window
bind = $mainMod SHIFT, 4, exec, hyprshot -m region

# Kill program
bind = $mainMod, Q, killactive,

# Exit Hyprland
bind = $mainMod, M, exit,

### NAVIGATE ###

# Switch workspace using vimkeys
bind = $mainMod, H, workspace, r-1
bind = $mainMod, J, movefocus, d
bind = $mainMod, K, movefocus, u
bind = $mainMod, L, workspace, r+1 

# Switch to last workspace
bind = $mainMod, Tab, workspace, previous_per_monitor 

# Scroll through existing workspaces with mousewheel
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Switch window using vimkeys
bind = $mainMod ALT, H, movefocus, l
bind = $mainMod ALT, J, movefocus, d
bind = $mainMod ALT, K, movefocus, u
bind = $mainMod ALT, L, movefocus, r 

# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic

### MANAGE WINDOWS ###

# Move window to workspace using vimkeys
bind = $mainMod SHIFT, H, movetoworkspace, r-1
bind = $mainMod SHIFT, J, movewindow, d
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, L, movetoworkspace, r+1 

# Move/resize window using mouse
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

# Modify window
bind = $mainMod, V, togglefloating,
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, C, togglesplit, # dwindle
bind = $mainMod, F, fullscreen,
bind = $mainMod, O, exec, hyprctl setprop active opaque toggle

### MISC ###

# Lock screen
# bind = $mainMod_SHIFT, l, exec, hyprlock
# bindl = , switch:Lid Switch, exec, hyprlock
bindl = , switch:on:Lid Switch, exec, shutdown +5 && notify-send "Lid closed - shutdown in 5 minutes"
bindl = , switch:off:Lid Switch, exec, shutdown -c && notify-send "Shutdown canceled"

# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-

##############################
### WINDOWS AND WORKSPACES ###
##############################

# Pop-up windows should float
windowrulev2 = float,class:^(gloobus-preview|com.nextcloud.desktopclient.nextcloud)$

# Eog Image Viewer (Eugenio)
windowrulev2 = float,class:^(Eog)$
windowrulev2 = size 384 216,class:^(Eog)$
windowrulev2 = move 100%-391 100%-223,class:^(Eog)$

# Firefox/Zen Picture-in-Picture
windowrulev2 = float,title:^(Picture-in-Picture)$
windowrulev2 = size 384 216,title:^(Picture-in-Picture)$
windowrulev2 = move 100%-391 100%-223,title:^(Picture-in-Picture)$

# blueberry
windowrulev2 = float,class:^(blueberry.py)$
windowrulev2 = size 300 400,class:^(blueberry.py)$
windowrulev2 = move 100%-307 25,class:^(blueberry.py)$

# network-manager
windowrulev2 = float,class:^(nm-connection-editor)$
windowrulev2 = size 300 400,class:^(nm-connection-editor)$
windowrulev2 = move 100%-307 25,class:^(nm-connection-editor)$

windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.


Config File: /home/misha/.cache/wal/colors-hyprland.conf: Read Succeeded
$background = rgb(08191B)
$color11 = rgb(C68B70)
$color14 = rgb(608F9A)

======Config-End========

Description

Context:
I have a monitor (DP-3) above my laptop monitor (eDP-1). Below are some relevant parts of my config.

monitor=eDP-1,1920x1080,0x0,1.5
monitor=DP-3,1920x1080,-320x-1080,1
# Move window to workspace using vimkeys
bind = $mainMod SHIFT, H, movetoworkspace, r-1
bind = $mainMod SHIFT, J, movewindow, d
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, L, movetoworkspace, r+1 

The bug is: when I try to move a window to from the bottom monitor to the top monitor (with super+shift+k), it does not move. However, I can move a window from the top monitor to the bottom monitor (using super+shift+j). A second bug you will notice here is that the window now looks blurry (until you try to resize it with the mouse). Also, when the bottom monitor has two windows open then I can move one of them to the top monitor using the keybind. I suspect the bug is related to the monitor scalings that I am using.

How to reproduce

Add the following to your hyprland.conf (make sure that the monitor names match your monitors and that you don't have any conflicting keybinds):

monitor=eDP-1,1920x1080,0x0,1.5
monitor=DP-3,1920x1080,-320x-1080,1
# Move window to workspace using vimkeys
bind = $mainMod SHIFT, H, movetoworkspace, r-1
bind = $mainMod SHIFT, J, movewindow, d
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, L, movetoworkspace, r+1 

Open a terminal on the bottom monitor (eDP-1) and a browser on the top monitor (DP-3). There should not be any other windows open. Place you mouse on the bottom (terminal window) and press super+shift+k. This should reproduce the bug if the window does not move.

You can then verify that pressing super+shift+j on the top window (browser) does move it, but the window becomes blurry. When the browser and terminal are both in the bottom monitor you can also move either one of them to the top. Dragging the windows in every which way also works.

*It does not really matter what app the windows belong to. The terminal and browser are just as an example.

Crash reports, logs, images, videos

output.mp4
@GardenerGeralt GardenerGeralt added the bug Something isn't working label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant