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 118575 - Buttons in notebook tabs are unclickable.
Buttons in notebook tabs are unclickable.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.2.x
Other Windows
: Normal normal
: ---
Assigned To: Tor Lillqvist
gtk-bugs
: 121851 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-07-29 13:27 UTC by Dave Cook
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
notebook example with some buttons in tabs. (5.79 KB, text/plain)
2003-07-29 13:29 UTC, Dave Cook
Details

Description Dave Cook 2003-07-29 13:27:49 UTC
Buttons in notebook tabs don't respond to mouse clicksThis is with the
dropline.net runtime and build envirnoment (their version 2.2.1.2).  This
works fine on a Red Hat 9 system with gtk+ 2.2.1.
Comment 1 Dave Cook 2003-07-29 13:29:05 UTC
Created attachment 18717 [details]
notebook example with some buttons in tabs.
Comment 2 Dave Cook 2003-07-29 15:13:55 UTC
I tested also with the packages from 

http://www.gimp.org/~tml/gimp/win32/downloads.html

with the same results.
Comment 3 Tor Lillqvist 2003-09-14 02:51:34 UTC
(Understanding the following comments require knowledge of the 
gtknotebook.c source code and gdk/win32 workings.)

This seem to be beause the notebook's "event_window" and the 
tab's "tab_label" window are siblings, and the tab_label window is 
below the event_window in the Z-order. Both the event_window and 
tab_label window are GDK_INPUT_ONLY, which means their extended style 
has WS_EX_TRANSPARENT. The windows are shown in the order tab_label 
first, then event_window.

show_window_internal in gdkwindow-win32.c has this interesting code 
snippet:

  if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & 
WS_EX_TRANSPARENT)
    {
      /* Don't really know if this makes sense, can't remember whether
       * this case is handled like this because it is necessary, or
       * if this is just old crap.
       */
      SetWindowPos(GDK_WINDOW_HWND (window), HWND_TOP, 0, 0, 0, 0,
		   SWP_SHOWWINDOW | SWP_NOREDRAW | SWP_NOMOVE | 
SWP_NOSIZE);
      return;
    }

So it seems that this code snippet will set the event_window's Z-
order position to be in front of tab_label's. Will check what happens 
if that code is removed.

Comment 4 Tor Lillqvist 2003-09-14 03:01:43 UTC
Yes indeed, ifdeffing out that code helps. Now, the interesting 
question is, will this break something else... or was the code 
totally unnecessary. Will try to see if I can notice any change in 
the behaviour of testgtk, gtk-demo and GIMP.
Comment 5 Tor Lillqvist 2003-09-14 03:09:06 UTC
*** Bug 121851 has been marked as a duplicate of this bug. ***
Comment 6 Tor Lillqvist 2003-09-14 13:45:02 UTC
The dubious code removed from HEAD and gtk-2-2.