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 536105 - Text in GTK disappears after launching DirectX window
Text in GTK disappears after launching DirectX window
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.12.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-06-01 18:52 UTC by Richard
Modified: 2018-02-10 03:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Richard 2008-06-01 18:52:26 UTC
Hi,

I've written a program using GTK that launches a DirectX 8 window in response to a GTK menu selection. It is single threaded.

In GTK 2.10.7 this would launch the fullscreen DirectX window and then a routine would pump the windows message queue until the mouse was clicked at which point DirectX would be shut down and control would be returned to GTK.

In GTK 2.12.9 and above, the program works as before but after the return of control, no text is displayed by GTK. All the menus and dialogs work, but none of them have any text displayed.

I've tried calling 'gtk_main_iteration_do(FALSE);' during the DirectX loop and it makes no difference.

Strangely I can recover the situation by opening a freeGLUT window. As soon as it opens, text is drawn again. If someone is interested in getting to the bottom of this I would be willing to try things, or may be able to provide sample code.

OS is windows XP. I've tried different GTK themes and they all act the same. Compiler is Visual Studio 2005 express.

Thanks,

Richard
Comment 1 louis 2011-02-24 16:46:33 UTC
maybe it's too late, but I solved this problem.

GTK use cairo, cairo with D3D cause this BUG.

D3D CreateDevice() will change FPU, see google(cairo D3D BUG).

so, use CreateDevice() with D3DCREATE_FPU_PRESERVE can fix this problem.

pID3D->CreateDevice(   D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, hwnd
  , D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE
  , &present, &pID3DDevice);

I hope this comments can help you!

LouisLiangJun
Comment 2 Dieter Verfaillie 2011-11-08 19:03:56 UTC
Wasn't this fixed upstream in cairo? With the following commit:
http://cgit.freedesktop.org/cairo/commit/?id=b62710d4f8602203d848daf2d444865b611fff09

For reference, discussion leading to that commit can be found here:
https://bugs.freedesktop.org/show_bug.cgi?id=7497
Comment 3 Jonathan Giszczak 2012-02-07 07:35:20 UTC
No, the problem still exists up to present releases.  A D3D device created without FPU_PRESERVE still destroys text rendering.
Comment 4 Matthias Clasen 2018-02-10 03:21:04 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.