Discussion:
wxAUI has problems with Metacity Windows Manager
Michael Uman
2014-04-08 00:19:39 UTC
Permalink
Hello,

I am sorry to report another bug which we discovered last week.

One of my users has been complaining recently that when he minimizes the
main window of my application and then attempts to unminimize it using the
bottom panel in gnome 2 (window panel) the application does not come back
to the front. This report led me to investigate the problem a bit deeper.

What was odd was that on my machine I could not replicate this problem, but
on two other users the problem was repeatable.

This led me to look into issues concerning the Windows manager and LO AND
BEHOLD this revealed the problem.

On my machine I use COMPIZ Window manager, but on the users who have this
problem the Windows manager is 'Metacity'... When I switched my own window
manager to Metacity the problem appeared for me. When I switched back to
Compiz the problem went away..

So some may say the solution to this problem is to enforce on my users to
use Compiz WM rather than Metacity... This was my 1st response, but it is
not acceptable because Compiz does require more CPU resources and some
users have less powerful CPU's than on my development machine.

I have written an example which demonstrates this problem...

It only happens when the 'Perspective' is restored from the config file in
the constructor of the Main Frame. The wxAUI demo does not save/restore
perspectives so I had to write a sample from scratch (using some routines
from wxAUI demo).

When I used 'metacity --replace' in a shell window I saw the following
error message printed when my Debugger application was run...

*Window manager warning: Invalid WM_TRANSIENT_FOR window 0x22003ab
specified for 0x22003a5 (Structure ).*

Attached to this email is a single-file cpp source file which can
demonstrate the problem. It is called *myEyeSample* and it contains
instructions for how to replicate the problem.

I am still stuck in Ubuntu 10.04 with Gnome 2 for the time being.

Metacity version 2.30.1
Compiz version 0.8.4

I am currently compiling against wxWidgets 3.0.0 from the Github repository.

If anyone has any suggestions, work-arounds, or patches which resolve this
issue I would be indebted to you...

Thank you,
Michael Uman
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Michael Uman
2014-04-08 18:18:36 UTC
Permalink
Alright...

Now where can I file a bug for this problem? I am not familiar with the
process.

It looks like we will have to upgrade a couple machines video cards so they
can run compiz window manager. I am a bit disappointed because they think
this is MY bug which I have explained to them that I have no control over
the minimize/unminimize operation and that the framework is the problem.

If I knew more about how the window manager interface to the framework
works maybe I could look into the problem. If anyone has any suggestions
for code for me to look at I would greatly appreciate it.

Thank you,
Michael Uman
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Marco DeFreitas
2014-04-08 19:45:34 UTC
Permalink
Perhaps as a workaround, your application can trap the Iconize event. When
you application gets restored, you might be able to manually call the
frame's "Raise" function.
Post by Michael Uman
Hello,
I am sorry to report another bug which we discovered last week.
One of my users has been complaining recently that when he minimizes the
main window of my application and then attempts to unminimize it using the
bottom panel in gnome 2 (window panel) the application does not come back
to the front. This report led me to investigate the problem a bit deeper.
What was odd was that on my machine I could not replicate this problem,
but on two other users the problem was repeatable.
This led me to look into issues concerning the Windows manager and LO AND
BEHOLD this revealed the problem.
On my machine I use COMPIZ Window manager, but on the users who have this
problem the Windows manager is 'Metacity'... When I switched my own window
manager to Metacity the problem appeared for me. When I switched back to
Compiz the problem went away..
So some may say the solution to this problem is to enforce on my users to
use Compiz WM rather than Metacity... This was my 1st response, but it is
not acceptable because Compiz does require more CPU resources and some
users have less powerful CPU's than on my development machine.
I have written an example which demonstrates this problem...
It only happens when the 'Perspective' is restored from the config file in
the constructor of the Main Frame. The wxAUI demo does not save/restore
perspectives so I had to write a sample from scratch (using some routines
from wxAUI demo).
When I used 'metacity --replace' in a shell window I saw the following
error message printed when my Debugger application was run...
*Window manager warning: Invalid WM_TRANSIENT_FOR window 0x22003ab
specified for 0x22003a5 (Structure ).*
Attached to this email is a single-file cpp source file which can
demonstrate the problem. It is called *myEyeSample* and it contains
instructions for how to replicate the problem.
I am still stuck in Ubuntu 10.04 with Gnome 2 for the time being.
Metacity version 2.30.1
Compiz version 0.8.4
I am currently compiling against wxWidgets 3.0.0 from the Github repository.
If anyone has any suggestions, work-arounds, or patches which resolve this
issue I would be indebted to you...
Thank you,
Michael Uman
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-04-08 21:45:51 UTC
Permalink
On Mon, 7 Apr 2014 17:19:39 -0700 (PDT) Michael Uman wrote:

MU> I have written an example which demonstrates this problem...

This is useful but it would be really great to have a (probably smaller)
patch to the existing sample adding perspective saving/restoring.

MU> When I used 'metacity --replace' in a shell window I saw the following
MU> error message printed when my Debugger application was run...
MU>
MU> *Window manager warning: Invalid WM_TRANSIENT_FOR window 0x22003ab
MU> specified for 0x22003a5 (Structure ).*

This almost certainly comes from a call to gtk_window_set_transient_for()
in our code. Could you please put a breakpoint on it and check for which
window exactly is this warning given?

Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Michael Uman
2014-04-09 02:15:27 UTC
Permalink
Vadim,

Thank you for your response.

A) I will attempt to modify the wxAUI sample app to save/restore
perspective... But I am not sure if it is an easy proposition because the
sample app allows the user to create new panels dynamically and this would
pose a problem upon restoration of the perspective (ie. if the panel name
does not exist at the time it is restored)... It was my 1st intention to
modify the sample app and I came up against that challenge (dynamically
created panes).

B) I will look into setting the BP on the function
*gtk_window_set_transient_for()* to see what wxWidget function is calling
it. I hope to be able to update this issue Tomorrow.

Thank you,
Michael Uman
Post by Vadim Zeitlin
MU> I have written an example which demonstrates this problem...
This is useful but it would be really great to have a (probably smaller)
patch to the existing sample adding perspective saving/restoring.
MU> When I used 'metacity --replace' in a shell window I saw the following
MU> error message printed when my Debugger application was run...
MU>
MU> *Window manager warning: Invalid WM_TRANSIENT_FOR window 0x22003ab
MU> specified for 0x22003a5 (Structure ).*
This almost certainly comes from a call to gtk_window_set_transient_for()
in our code. Could you please put a breakpoint on it and check for which
window exactly is this warning given?
Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...