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 520165 - typeahead find (interactive search) only accepts one character in 2.12.8
typeahead find (interactive search) only accepts one character in 2.12.8
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.12.x
Other All
: Normal normal
: ---
Assigned To: Cody Russell
gtk-bugs
: 524169 526805 535027 535912 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-03 20:32 UTC by Daniel Atallah
Modified: 2008-08-22 00:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (1.19 KB, patch)
2008-06-14 23:15 UTC, Cody Russell
none Details | Review
A different fix (725 bytes, patch)
2008-07-31 19:31 UTC, Cody Russell
committed Details | Review

Description Daniel Atallah 2008-03-03 20:32:47 UTC
Please describe the problem:
In GTK+ 2.12.8, using the interactive search on a GtkTreeView no longer works correctly; it'll only accept a single character after which, the input field is unresponsive even though the cursor continues to flash.

Steps to reproduce:
Using gtk-demo, open the "Tree View->List Store" demo and start typing to activate the interactive search.

Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Bill Meier 2008-03-06 01:13:08 UTC
A slight variant:

Type <ctl>f to pop-up the search window;

At this point: keyboard entry to the search window seems to be ignored and eventually the search window "times out" and is dismissed.
(The cursor is shown within the GtkEntry).


Additional information:

a. This problem does not occur in my Linux environment (Fedora 8);
b. Falling back *just* the libgdk dll to the 2.12.6 version causes the 
   search to work AOK again.
   (I've no idea if one is really allowed to fall back just the libgdk dll).

Comment 2 Asbjørn Ulsberg 2008-03-13 13:29:36 UTC
I'm experiencing this bug in Pidgin 2.4.0 on Windows Vista. Related Pidgin bug: http://developer.pidgin.im/ticket/4966
Comment 3 Stephen Fisher 2008-03-18 07:13:19 UTC
We're tracking this as Wireshark bug #2325: 
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2325

Comment 4 Cody Russell 2008-03-18 17:26:27 UTC
Daniel prodded me in irc just now, so I'll do this today.  I didn't have a Win32 setup to test on when I was in Berlin so I just put this off last week, sorry about that.
Comment 5 Cody Russell 2008-04-10 21:15:14 UTC
*** Bug 526805 has been marked as a duplicate of this bug. ***
Comment 6 Michael Schumacher 2008-05-31 19:46:33 UTC
*** Bug 535912 has been marked as a duplicate of this bug. ***
Comment 7 Cody Russell 2008-06-08 20:24:28 UTC
*** Bug 535027 has been marked as a duplicate of this bug. ***
Comment 8 Daniel Atallah 2008-06-12 03:21:34 UTC
I've done some further analysis and found the cause.

One of the parts of revision 19545, was to suppress keypresses for windows that are "modally blocked" (gdk/win32/gdkevents-win32.c:1771).  This is where the subsequent keypresses are being eaten.

The typeahead window is the current modal window, but (clearly) it isn't the toplevel window for the window receiving the keypresses (which is the window containing the GtkTreeView).

I'm not sure what the correct solution is - should the keypresses actually be directly received by the typeahead window? (why are they not?)
Should the modal blocking code somehow be able to tell that these keypresses should through even though it isn't the modal window?
Comment 9 Cody Russell 2008-06-14 23:15:08 UTC
Created attachment 112755 [details] [review]
Fix

This is kind of a hacky solution, and I'm not sure yet if there's a better way to do it.  I need to talk to Kris, because I don't really understand yet what TreeView is doing here.  It kind of seems like the key strokes are being received by something else, and I'm not sure if it's the TreeView or what.  It's not the modal_current.

It seems that TreeView is the only thing using GDK_WINDOW_TYPE_HINT_UTILITY, so theoretically this should not affect anything else. :)

Doesn't the file selector have a similar search box?  Do you happen to know if it is affected by this issue as well?
Comment 10 J. Baute 2008-06-16 10:55:09 UTC
Yes, it also happens for the file selector.
See this bug #526805
Comment 11 Nathan Vexler 2008-07-04 17:56:44 UTC
(In reply to comment #2)
> I'm experiencing this bug in Pidgin 2.4.0 on Windows Vista. Related Pidgin bug:
> http://developer.pidgin.im/ticket/4966
> 

Indeed, this bug is still occurring on Pidgin 2.4.3. What's holding up patching trunk?
Comment 12 Cody Russell 2008-07-04 19:23:46 UTC
There's not a good solution yet.  The patch I posted above is not good.  I need to dig into GtkTreeView code I think, and I'm not looking forward to that. :)

The alternative is to back out the patch that caused this problem, but I don't want to do that either because the problems that were solved in that patch were much bigger and more important than this one.
Comment 13 Charles Day 2008-07-28 17:39:31 UTC
*** Bug 524169 has been marked as a duplicate of this bug. ***
Comment 14 Cody Russell 2008-07-31 19:31:25 UTC
Created attachment 115635 [details] [review]
A different fix

This makes much more sense.
Comment 15 Daniel Atallah 2008-08-06 04:34:02 UTC
(In reply to comment #14)
> Created an attachment (id=115635) [edit]
> A different fix
> 
> This makes much more sense.

This patch certainly fixes this bug.  I've been using it for a few days and haven't noticed any ill effects (I don't use very much modal stuff though).
Comment 16 Daniel Atallah 2008-08-21 22:01:40 UTC
Are there any issues with the patch? If not, can we get it committed soon?
Comment 17 Cody Russell 2008-08-22 00:31:09 UTC
2008-08-21  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkevents-win32.c (doesnt_want_key): Remove the checks
        to see if the window is modally blocked.  This doesn't get us anything,
        and it confuses the search window in GtkTreeView (and potentially other
        utility windows in other apps).  (#520165)
Comment 18 Cody Russell 2008-08-22 00:32:22 UTC
Committed to gtk-2-12 branch as well.  Thanks for reminding me about this one, I had forgotten that I didn't commit it yet.