- gtk+-2/pinentry-gtk-2.c (move_window_to_active_monitor): New function.
(create_window): Insert call to previous function.
GnuPG-bug-id: 2245
Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
Differential D446
gtk: Put the dialog on monitor with focused window. gouttegd on Aug 23 2017, 10:48 PM. Authored by Tags Subscribers None
Details
(create_window): Insert call to previous function.GnuPG-bug-id: 2245 Buy a second monitor if you only have one. ;) Then run pinentry-gtk-2 from a terminal on one monitor, and with the mouse cursor on the other monitor, issue a GETPIN command. Without the patch, the dialog should appear on the monitor where the mouse cursor is. With the patch applied, the dialog should appear on the monitor containing the focused terminal, no matter where the mouse is. Whether this works or not may depend on the window manager, which is free to ignore the gtk_window_move and put the window wherever it wants. It works with XFCE and Awesome, though.
Diff Detail
Event TimelineComment Actions Avoid moving the window ourselves if the cursor happens to be on the same monitor than the currently focused window, since in that case the window will already be on the right monitor. |