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 625972 - gdk_window_ensure_native changes window position
gdk_window_ensure_native changes window position
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.20.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
csw
Depends on:
Blocks:
 
 
Reported: 2010-08-03 19:47 UTC by Ben Dean-Kawamura
Modified: 2018-02-10 03:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test C File (1.30 KB, text/x-csrc)
2010-08-04 15:25 UTC, Ben Dean-Kawamura
Details

Description Ben Dean-Kawamura 2010-08-03 19:47:10 UTC
When I call gdk_window_ensure_native() on a GdkWindow, the window moves to the point (0, 0).  I'm attaching a test program that creates a GtkDrawingArea, and paints it red in the expose callback.  On Ubuntu Intrepid it works fine.  On windows, the drawing area does not get painted correctly.  Using winspector spy, I see that the native window is positioned at the (0, 0) coordinates of the window.   The width and height seem to be correct.

The program works fine if the call to gdk_window_ensure_native() is commented out.
Comment 1 Ben Dean-Kawamura 2010-08-04 15:25:24 UTC
Created attachment 167120 [details]
Test C File
Comment 2 Ben Dean-Kawamura 2010-08-04 15:34:19 UTC
One more thing to note: this bug was opened because of our development on Miro.  We ran into a problem embedding XULRunner and VLC when upgrading from GTK 2.16 to 2.20.  Here's a bug in our tracker with some more details: http://bugzilla.pculture.org/show_bug.cgi?id=14037
Comment 3 Ben Dean-Kawamura 2010-08-05 23:49:09 UTC
One more note: I misreported by ubuntu version. It's 10.4, AKA Lucid.
Comment 4 Hans Breuer 2010-08-24 20:56:10 UTC
There is more broken with Gtk 2.2x (and 2.18) on win32. See:
http://mail.gnome.org/archives/gtk-devel-list/2010-August/msg00200.html
Comment 5 Ben Dean-Kawamura 2010-08-25 16:26:17 UTC
Thanks for working on this issue.  If I can be of any help, please tell me what to do.  I would love to get this working for the next version of GTK.  The functionality is for much more than just eclipse, embedding other components (which is what we do for Miro) seems like a pretty common use case.
Comment 6 Hans Breuer 2010-08-27 20:24:12 UTC
I've just pushed my changes to gtk-2-22 branch, so it should work a bit better now. It would be nice to have this confirmed.
Comment 7 John Stowers 2010-08-28 06:08:35 UTC
(In reply to comment #6)
> I've just pushed my changes to gtk-2-22 branch, so it should work a bit better
> now. It would be nice to have this confirmed.

Hans, while you have a working dev. setup, would you mind committing the patches on bug 598299 to the gtk-2-22 branch?
Comment 8 Matthias Clasen 2018-02-10 03:26:00 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.