Remote desktop taskbar won't click, but the terminal still types? A mouse button is stuck down
Over xrdp (Remmina client, XFCE session), the taskbar and every window suddenly ignored clicks. The terminal still took keystrokes. Nothing was hung, and memory was fine.
The cause: the RDP link dropped a mouse button release event. When you press a mouse button, X gives the pointer to the window under it until the button comes up. That is an implicit grab. If the release never arrives, that window keeps the pointer forever, and every other client stops getting clicks.
You can confirm it in two steps. First, ask X which buttons it thinks are down:
export DISPLAY=:10.0 # your xrdp display
xinput list # find the xrdpMouse id
xinput query-state 6 | grep down
# button[3]=down <- right button stuck
Then make Xorg log who holds the grab by sending the XF86LogGrabInfo keysym. Map it to a free keycode for a moment if it isn't bound:
xmodmap -e "keycode 255 = XF86LogGrabInfo"
xdotool key XF86LogGrabInfo # or an XTest fake key event
xmodmap -e "keycode 255 ="
grep -A6 'currently active device grabs' ~/.xorgxrdp.10.log
# Active grab ... on device 'Virtual core pointer'
# client pid 2491417 xfce4-terminal (implicit)
The fix is to click the stuck button once inside the remote session. In this case that was a single right-click. The real press and release reach xrdpMouse, the button state clears, and the grab goes away.
Faking the release locally with XTestFakeButtonEvent does not work. It comes from the XTEST device, while the stuck state belongs to the xrdpMouse device. If clicking can't fix it, closing the window that holds the grab also releases it.
The trigger is usually pressing a button just as focus leaves the Remmina window, or an RDP reconnect in the middle of a click.