Problem with gdk_window_set_transient_for() under windows



As the title suggests there seems to be a bug with
gdk_window_set_transient_for() in the windows code.  This shows up when
you have two nested dialogs, when you close them the focus gets put to a
random window.

Looking at the code in gdkwindow-win32.c it calls SetWindowLong
(window_id, GWL_HWNDPARENT, (long) parent_id).  Looking at the msdn
entry for SetWindowLong, it says:

"You must not call SetWindowLong with the GWL_HWNDPARENT index to change
the parent of a child window. Instead, use the SetParent function."

I tried calling SetParent instead and this actually puts the child
dialog inside the parent window...  There's a comment in the code that
suggests this has been discussed before - I couldn't find that thread.

I don't know how to fix it, I've got a simple example if anyone is
interested...

Jon



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]