diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2014-01-02 23:00:11 -0800 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-01-02 23:00:11 -0800 |
commit | 0ed6750541eac94af7083fabe5911c20e6ca31f9 (patch) | |
tree | 26c145eae638a010f85426652d321a4a348a5699 | |
parent | 9f7e331a20c56674eca1502b8adf36d5dbec3ac5 (diff) |
shell: Only assign focus on touch if there is a touch focus surface
Similar to 7c4f6cc145daf66cd9624f1e70dd5278241f5858, if we don't have
a background image from the desktop-shell client or the touch point
for some other reason doesn't hit a surface we trigger a
segfault as we try to deref the seat->touch->focus NULL pointer.
For touch, another problem could be fudgey calibration that ends up
giving touch coordinates outside the output space.
https://bugs.freedesktop.org/show_bug.cgi?id=72839
-rw-r--r-- | desktop-shell/shell.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index b3b2b552..f85a2695 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4229,6 +4229,8 @@ touch_to_activate_binding(struct weston_seat *seat, uint32_t time, void *data) { if (seat->touch->grab != &seat->touch->default_grab) return; + if (seat->touch->focus == NULL) + return; activate_binding(seat, data, seat->touch->focus->surface); } |