After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 547449 - Entry/ Combo popup misplaced after resize
Entry/ Combo popup misplaced after resize
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.13.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-08-12 15:59 UTC by Christian Dywan
Modified: 2008-09-03 12:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Reposition entry completion (794 bytes, patch)
2008-08-15 08:54 UTC, Christian Dywan
committed Details | Review
Reposition combo popup (2.23 KB, patch)
2008-08-15 08:56 UTC, Christian Dywan
committed Details | Review
Testcase (4.56 KB, patch)
2008-08-15 09:16 UTC, Christian Dywan
none Details | Review

Description Christian Dywan 2008-08-12 15:59:52 UTC
If widgets inside a window are resized and thus cause the position of an entry/ combo to change, while a completion popup is open, the popup stays at its - afterwards wrong - position.

This can happen in different cases.

The original example is a Maemo device with a hardware keyboard, where this issue was originally noticed. One opens the Notes application, focusses the text widget so that the virtual keyboard appears. Then one pops up the font size combo. If now the user chooses to reveal the hardware keyboard the virtual keyboard disappears, which causes the font combo to move, yet the popup remains at tis position.

Other examples are all situations where something other than the user changes the size of widgets, hides/ shows widgets or adds/ removes widgets.

The problem is the same with entry completion and combo popups staying at their original position regardless of size changes.

Patch following
Comment 1 Christian Dywan 2008-08-15 08:54:59 UTC
Created attachment 116639 [details] [review]
Reposition entry completion
Comment 2 Christian Dywan 2008-08-15 08:56:10 UTC
Created attachment 116641 [details] [review]
Reposition combo popup

This patch repositions both the menu mode popup and the list mode popup.
Comment 3 Tim Janik 2008-08-15 09:01:34 UTC
This bug badly needs an interactive test case. E.g. a small demo program that shows the patched widgets and moves their allocations around in a timer (slowly, so one can test the effects on their popups.)
Comment 4 Christian Dywan 2008-08-15 09:16:58 UTC
Created attachment 116643 [details] [review]
Testcase

Oops, I meant to upload my testcase but forgot to.

The attached program has a timer, fired every 7 seconds, that either shows or hides the images in the window, in order to cause movement and resizing of the widgets, which is what we want to test here. The demo quits automatically after switching the images 10 times.
Comment 5 Matthias Clasen 2008-08-15 18:56:03 UTC
I haven't tried your testcase, but I think that in most cases it is probably less infuriating for the user to have the popup 'torn off' than to have it jump out from under the pointer...
Comment 6 Christian Dywan 2008-08-15 20:10:09 UTC
(In reply to comment #5)
> I haven't tried your testcase, but I think that in most cases it is probably
> less infuriating for the user to have the popup 'torn off' than to have it jump
> out from under the pointer...

I'm not so sure about that. I mean, we are looking at a situation where a widget is changing its size and position. That means if you wouldn't have popped up a menu or list, you would have the exact same phenomenon of "jumping from under the pointer". In other words, it's due to the missing repositioning that the normal behaviour of the widget moving doesn't fully affect the interaction with it in the first place. If anything, the application developer should make sure not to move around things too much, for instance not in a timeout like in the testcase.
Comment 7 Christian Dywan 2008-08-18 11:58:01 UTC
(In reply to comment #5)
> I haven't tried your testcase, but I think that in most cases it is probably
> less infuriating for the user to have the popup 'torn off' than to have it jump
> out from under the pointer...

When you say "torn off", do you mean pop down? In that case that may be a sensible option, considering that clicking outside of the popup has the same effect and the original issue is about a hardware button it makes sense to treat this similarly.
Comment 8 Tim Janik 2008-09-03 10:39:28 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > I haven't tried your testcase, but I think that in most cases it is probably
> > less infuriating for the user to have the popup 'torn off' than to have it jump
> > out from under the pointer...
> 
> When you say "torn off", do you mean pop down?

I think Matthias meant "displaced", i.e. just leave the popup where it is, unconnected to the popup origin widget.

I have to say that after trying it out, i think the popup position adjustments are very nice, clearly better than leaving the popped up window "torn off". Also, moving the popup, rather than forcing it to popdown avoids potentially nasty issues you could get in scenrios where input methods like a VKB auto-show for certain types of popups that take keyboard input.

I.e. please apply, appears to be a worthwhile addition/fix to me.
Comment 9 Christian Dywan 2008-09-03 12:40:45 UTC
Thanks, committed.