GNOME Bugzilla – Bug 300278
Page number entry doesn't respond in fullscreen mode
Last modified: 2007-09-27 20:09:34 UTC
Please describe the problem: In fullscreen mode, trying to use the page number entry widget doesn't receive keyboard focus and a new number can't be entered. Steps to reproduce: 1. Go to fullscreen mode 2. Try to enter a number in the page number entry 3. Actual results: The number can be highlighted with the mouse, but not changed via the keyboard Expected results: To be actually able to type a number Does this happen every time? Yep Other information: I haven't tried 0.2, but a browse through the ChangeLog doesn't indicate it has been fixed.
Christian was this a gtk issue?
I'm pretty sure this is a dupe. It is a GTK+ issue.
Bug 161530 looks related, though Soeren is talking of a GTK-critical which I dont see in evince.
IIRC what I found out when I wrote the fullscreen code, the problem is that the entry doesn't get focus-in (since the toolbar is in a popup window), so doesn't process its events. Setting the popup modal and faking a focus-in event seemed to work (that's what the gtktreeview typeahead entry code does), but interfered with auto-hiding of the popup on focus-out of the evince window.
Ubuntu bug about that: https://launchpad.net/products/evince/+bug/41430
*** Bug 343363 has been marked as a duplicate of this bug. ***
*** Bug 355068 has been marked as a duplicate of this bug. ***
Although I didn't get to any good solution, yesterday I've been investigating the source of this bug, here are the thoughts I've recollected: - I think it isn't Gtk+ fault, windows of type popup are supposed to be almost completely handled by the application that's creating it, included keyboard focus handling (that's one of the reasons why Gtk+ grabs the keyboard and the mouse when popping up a menu) - WM doesn't know about those kind of windows, so it's innocent too. - Due to the behavior of the fullscreen toolbar, grabbing keyboard and stuff as soon as it appears is a bad idea, as the document view wouldn't get any events - Faking events and sending them to widgets is prone to errors - I've tried to think inversely and try to send fake events from the document view to the popup window when it's interested (at least, the number of events the page number entry is interested in is minor), but fiddling in the internals of the EggToolbarModel doesn't looks good, and the page number entry could be removed from it by the user, so it doesn't scale very well... Maybe the best solution would be to detect when the user clicks somewhere in the popup window, add a grab to the window and remove it when the user does any operation outside the window (or presses any key that should affect the document view, etc...) If you want I can investigate this further, but I can't guarantee that I'll come up with a patch soon :)
Thanks Carlos for investigation. The more I think about it the more I suspect that popup's advantages are too minor.
*** Bug 417391 has been marked as a duplicate of this bug. ***
Fixed in svn trunk. Finally, fullscreen toolbar is always visible.
*** Bug 481000 has been marked as a duplicate of this bug. ***