compositor: Clip pointer coordinates on pointer enter as well

When tiling window managers resize a non-resizable window they're violating
ICCCM.  Not some hippie-community standard like EWMH, but ICCCM, which is
about as old and sacred as the constitution.  If they want to force a window
to be a size it wasn't designed for, at least they could have the decency to
reparent the client window into a bigger containing window of whatever size
they think it should be.  But apparently ICCCM compliance is too much to ask.

Anyway, all that just to say that it's really not our fault when we get an
enter event with coordinates outside the valid output region.  But we'll
clip it anyway and work around mis-behaving tiling WMs.
Kristian Høgsberg 12 years ago
parent 42470cfc49
commit 00fbbe6b60
  1. 1
      src/compositor.c

@ -1756,6 +1756,7 @@ notify_pointer_focus(struct weston_seat *seat, struct weston_output *output,
struct wl_pointer *pointer = seat->seat.pointer;
if (output) {
clip_pointer_motion(seat, &x, &y);
weston_seat_update_drag_surface(seat,
x - pointer->x,
y - pointer->y);

Loading…
Cancel
Save