Bug 46432 - [bug] Can not get keyboard focus if previous client exits abnomally (e.g. Ctrl-C)
Summary: [bug] Can not get keyboard focus if previous client exits abnomally (e.g. Ctr...
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-22 00:51 UTC by zhiwen.wu@linux.intel.com
Modified: 2012-08-16 10:13 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description zhiwen.wu@linux.intel.com 2012-02-22 00:51:45 UTC
weston commit: 31f9d0e8de4f788aaf35fb8072dc290da19b097a
waylad commit: ab3b5cd71ce6dd1a532d9c1fecabb1a6e9d1a055

Step to reproduce:
1. src/weston 
2. clients/weston-terminal
3. Ctrl-c
4. clients/weston-terminal
no keyboard focus on weston-terminal.

I found that wl_input_device_set_keyboard_focus() return at wayland_server.c:603.
The reason is device->keyboard_focus is not reset when the surface
with keyboard focus destroied. Next time weston-terminal launched, weston_surface_activate() calls wl_input_device_set_keyboard_focus(), but the value of surface is equal to previous one. That make  wl_input_device_set_keyboard_focus() returned early, and no keyboard focus set.

Maybe we should add some code in destroy_surface() to repick the keyboard_focus for the surface with keyboard focus.
Comment 1 Kristian Høgsberg 2012-08-13 17:42:50 UTC
Should be fixed in e377822c64151c8ba1fcfb2e3ccdd62768fcd1d2


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.