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

Mouse positions break in layershell popups while dragging #6144

Closed
outfoxxed opened this issue May 18, 2024 · 2 comments
Closed

Mouse positions break in layershell popups while dragging #6144

outfoxxed opened this issue May 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@outfoxxed
Copy link
Member

Hyprland Version

System/Version info
Hyprland, built from branch main at commit c21a5a934061c248ff1cdd459a74a05b621fb427 dirty (layout: Fix shrinking pseudotile windows. (6143)).
Date: Sat May 18 11:28:48 2024
Tag: v0.40.0-112-gc21a5a93, commits: 4718

flags: (if any)


System Information:
System name: Linux
Node name: msi
Release: 6.6.30
Version: #1-NixOS SMP PREEMPT_DYNAMIC Thu May  2 14:32:50 UTC 2024


GPU information:
07:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c5) (prog-if 00 [VGA controller])


os-release: ANSI_COLOR="1;34"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="24.05.20240505.25865a4"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
IMAGE_ID=""
IMAGE_VERSION=""
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 24.05 (Uakari)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="24.05 (Uakari)"
VERSION_CODENAME=uakari
VERSION_ID="24.05"


plugins:
  hy3 by outfoxxed ver 0.1

Bug or Regression?

Bug

Description

When mouse dragging in a popup of a layer surface, the mouse position is wrong. It appears to be reporting the global mouse position most of the time, but not always (I've had it work normally, then slam my volume slider to 500+% randomly)

Bug in action:

recording.mp4

Sway handling it correctly:

recording.mp4

How to reproduce

The tester shown above is written below, guaranteed to work with https://git.outfoxxed.me/outfoxxed/quickshell/commit/bba8cb8a7dcce95905b6dc3c23d1b1c8e56cab2c

quickshell tester
import QtQuick
import QtQuick.Controls
import Quickshell

ShellRoot {
	PanelWindow {
		id: root
		anchors {
			left: true
			right: true
			bottom: true
		}

		height: 30

		Button {
			anchors.centerIn: parent
			text: "toggle popup"
			onClicked: popup.visible = !popup.visible
		}

		PopupWindow {
			id: popup
			parentWindow: root

			width: 400
			height: 50
			relativeY: -height - 10
			relativeX: root.width / 2 - width / 2

			MouseArea {
				id: ma
				anchors.fill: parent
				hoverEnabled: true

				Rectangle {
					color: ma.pressed ? "green" : "red"
					width: 10
					height: 10
					radius: 5
					x: Math.max(0, Math.min(ma.width, ma.mouseX)) - 5
					y: Math.max(0, Math.min(ma.height, ma.mouseY)) - 5
				}

				Slider {
					anchors.centerIn: parent
					width: 350
				}

				Text {
					anchors.horizontalCenter: parent.horizontalCenter
					anchors.bottom: parent.bottom
					text: `mouseX: ${ma.mouseX} mouseY: ${ma.mouseY}`
				}
			}
		}
	}
}
Crash reports, logs, images, videos

no logs of note

@outfoxxed outfoxxed added the bug Something isn't working label May 18, 2024
@Agent00Ming
Copy link
Contributor

I believe this can be replicated using the scroll bar in kate. When the mouse is over the line count popup, the scroll bar is sent to the top.

@outfoxxed
Copy link
Member Author

I wasn't able to reproduce it in a non layer popup, but that mightve been because the popup was at 0,0 relative to the window

The-Briel-Deal pushed a commit to The-Briel-Deal/Hyprland that referenced this issue May 25, 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

2 participants