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

Clicks are incorrectly handled by layer surfaces with keyboard interactivity #6409

Closed
outfoxxed opened this issue Jun 10, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@outfoxxed
Copy link
Member

Bug or Regression?

Regression

System Info and Version

git @ 1423707

Description

If more than one layer surface with keyboard interactivity exists (screenshot tools across multiple monitors, keyboard interactivity to kick focus out of games that lock the mouse), clicks will often be released immediately for seemingly no reason.

How to reproduce

  1. Have at least two monitors or run a nested session with two. The bug does not trigger with only one.
  2. run the below quickshell tester. (quickshell commit 67783ec24c61030abff8ba5008a5bbd2822c6eca guaranteed to work)
quickshell tester
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Quickshell
import Quickshell.Wayland

ShellRoot {
	Variants {
		model: Quickshell.screens

		WlrLayershell {
			id: layer
			required property ShellScreen modelData;
			screen: modelData;

			anchors {
				top: true
				bottom: true
				left: true
				right: true
			}

			color: ma.pressed ? "#20005050" : "#20202020"
			layer: WlrLayer.Overlay
			keyboardFocus: WlrKeyboardFocus.Exclusive
			onKeyboardFocusChanged: console.log(`kbf: ${keyboardFocus}`)

			MouseArea {
				id: ma
				anchors.fill: parent
				onPressed: console.log("pressed")
				onReleased: console.log("released")
				ColumnLayout {
					anchors.centerIn: parent

					Button {
						text: "close"
						onClicked: Qt.quit()
					}

					CheckBox {
						text: "Keyboard Focus"
						checkState: layer.keyboardFocus == WlrKeyboardFocus.None ? Qt.Unchecked : Qt.Checked
						onClicked: layer.keyboardFocus = layer.keyboardFocus == WlrKeyboardFocus.None ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
					}

					TextField {}
				}
			}
		}
	}
}

Crash reports, logs, images, videos

All clicks in the video below are drags, however hyprland causes it to be released early most of the time.

2024-06-10.13-33-50.mp4
@outfoxxed outfoxxed added the bug Something isn't working label Jun 10, 2024
@outfoxxed
Copy link
Member Author

appears I forgot to switch branches first, issue with a pr.

@outfoxxed outfoxxed closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 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