Qtopia-interest Archive, March 2008
Questions reagrding the MenuManager in qsoftmenubar.cpp
Message 1 in thread
Hey,
this evening we had a quick look at the MenuManager implementation. Basicly
our window manager is special and is not setting _NETWM_WORKAREA even if the
softmenu is setting _WM_STRUT(_PARTIAL). So we ended up browsing this code
and found:
MenuManager::positionForMenu is only called when the related widget is resized
and the menu is active. I think the placement is wrong. for the y-coordinate
you do not want to do any subtraction. If you put an exit(-1) in this method
and run your test suite, is it actually executed at all? I assume it is not.
Also the above method is not called for the initial popup, instead the code is
copy and pasted from the above description, not once but twice. and guarded
by GREENPHONE like effects #ifdefs/#ifndefs. Why is this layering violation
needed? Why is the above positionForMenu function not used?
Assumptions of the placement functions: You want to align to the bottom of the
screen? Why do you want to do that? The only thing I can think of is because
by default the soft menu is at the bottom of the screen and the menu should
be shown above the soft menu? What happens if I decide to dock the menu to
the right?
My patch is changing positionForMenu to be similar to the copy and pasted
code, I would like to get rid of the layering violation (also the one in
QtopiaApplication.cpp for the greenphone... blending on pixels, likely not
inlined function and only working on rgb565....).
So input would be appreciated, specially I'm interested in a generic way to
find out where the soft menu was actually placed to create proper placement!
Maybe the qpe process should popup the native window?
good night from taipei
z.
--
[ signature omitted ]