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 141721 - gdk_gc_set_subwindow() doesn't seem to do anything on win32
gdk_gc_set_subwindow() doesn't seem to do anything on win32
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.4.x
Other Linux
: Normal minor
: Small fix
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-05-03 10:25 UTC by Damon Chaplin
Modified: 2010-08-25 05:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test program by "Roberto" (1.21 KB, text/plain)
2007-07-31 10:08 UTC, Tor Lillqvist
Details

Description Damon Chaplin 2004-05-03 10:25:03 UTC
I've been trying to use gdk_gc_set_subwindow (GDK_INCLUDE_INFERIORS)
in Glade-3 to draw selection rectangles. It works on Linux but not on
win32. Looking at the code the value is stored in GdkGCWin32 but doesn't
seem to be used. (Though I could be wrong.)

Is it correct that this doesn't work on win32?

It may be that it is impossible to support this on win32, which is OK
as long as it is documented.
Comment 1 Tor Lillqvist 2004-05-05 01:45:19 UTC
Yes, the subwindow mode of a GC is maintained in the GdkGCWin32 structure but 
not used for anything. I don't remember what subwindow_mode means in X11 (and I 
don't have access to copy of the X11 proto spec and/or Xlib reference right 
now). I can't say yet how hard it would be to implement its semantics.
Comment 2 Damon Chaplin 2004-05-05 08:51:21 UTC
Normally any drawing in a window is clipped by any child windows.
But if you call gdk_gc_set_subwindow (GDK_INCLUDE_INFERIORS) you can draw
over child windows as well.
Comment 3 Tor Lillqvist 2004-08-31 19:41:06 UTC
It ought to be possible to implement this in gdk/win32. Creating the Win32 DC 
corresponding to the GdkGC with GetDCEx() instead of GetDC(), and not setting 
the DCX_CLIPCHILDREN bit in the flags argument should give a DC that allows 
writing on child windows. Could you please attach a minimal but complete test 
program?
Comment 4 Tor Lillqvist 2007-07-31 10:08:28 UTC
Created attachment 92781 [details]
Test program by "Roberto"
Comment 5 Matthias Clasen 2010-08-25 05:46:09 UTC
GdkGC has been removed in GTK3