for the archives, this had a short discusson on IRC but then fell under the radar again
On Sun, Jul 22, 2018 at 06:53:56AM -0700, Jamey Sharp wrote: > Hey Daniel, thanks for taking a look! It turns out that this patch worked > in Weston 3, but in Weston 4, commit > 85d55540cb64bf97a08b40f79dc66843f8295d3 broke it. I didn't investigate > carefully enough to understand what that commit was for or why it broke > this, but my patch plus a revert of that commit makes Weston 4 work without > side effects we've been able to observe, so that combo is what we've been > using for the last month. 20:41 < whot> SardemFF7: afaict, the problem is that vt switching causes a libinput_suspend() call. that generates DEVICE_REMOVED events which eventually trigger weston_seat_release_keyboard(). That calls weston_keyboard_set_focus() and because of 85d55540cb6 we're guaranteed that the saved_kbd_focus is now NULL 20:41 < whot> so on vt switch back, we don't know what to restore the focus to 20:45 < SardemFF7> I see 20:46 < ongy> does weston remove the seat when the last device got removed? I had that issue before when working on waymonad. 20:47 < whot> I don't think so, from a quick check 20:53 < SardemFF7> I think I see another solution to my issue that would (hopefully) not conflict like the current one 20:54 < SardemFF7> in set_focus(), early: if (saved != NULL && new != NULL) { saved = new; return; /* let set_focus do its thing when weston is back on focus */} 20:56 < SardemFF7> so if you change focus when weston-not-focused, it’s updated, if you reset focus/unfocus (set to NULL), saved focus is not touched, and in other cases saved should be NULL I think… [...] 21:02 < whot> SardemFF7: I think that should work, yes Cheers, Peter > I hope that's useful information… > Jamey > > On Sun, Jul 22, 2018, 3:09 AM Daniel Stone <dan...@fooishbar.org> wrote: > > > Hi Jamey, > > > > On Wed, 23 May 2018 at 14:16, Jamey Sharp <ja...@minilop.net> wrote: > > > Under Weston's drm-backend, after returning to Weston from another VT, > > > no window has focus. > > > > > > There's already code in notify_keyboard_focus_out and > > > notify_keyboard_focus_in to save and restore focus, respectively; and > > > udev_input_enable eventually calls notify_keyboard_focus_in, by way of > > > evdev_notify_keyboard_focus. But udev_input_disable doesn't currently > > > call notify_keyboard_focus_out. > > > > > > This patch makes udev_input_disable symmetric with udev_input_enable by > > > calling notify_keyboard_focus_out on every seat, to save focus before > > > suspending libinput. In my testing this successfully resolved my issue. > > > However, I don't have a multi-seat setup to verify that it works there > > > too. > > > > This seems correct to me. Peter, any thoughts/comments? > > > > Cheers, > > Daniel > > _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel