Re: [Issue N10804] QPopupMenu should not use QApp::desktop()->availableGeometry()



>
> My guess is that this is just a Qt bug and not intentional.
>
> IMO the struts should be taken to mean that there's an always-on-top
> panel on that side of the screen, more or less. This means e.g. you
> don't want to maximize windows underneath the panel.
>
> I'm not sure there's a point in clamping tooltips and menus to the
> strut area, because tooltips and menus should be override redirect
> windows and thus appear on top of any panels anyway, so if they
> overlap the panel a bit, it's not really an issue. In fact you may as
> well use the whole screen for menus to avoid scrolling.
>
> But this isn't really something that is or should be in the spec or
> standardized, it's just a judgment call that toolkit developers will
> need to make.
>
> One option if clamping is desirable in general might be for the
> toolkit to support semantic types on toplevels (e.g. "dock" and
> "splashscreen"), then have tooltips/popups from windows of type "dock"
> ignore the struts. If the toolkit has semantic knowledge it can also
> set the corresponding WM spec hints of course.
>
> Havoc
>

Hi Havoc

The change that introduced this behaviour has now been reverted for X11
and windows.

Thanks for reporting this.

==== //depot/qt/3.1/src/widgets/qpopupmenu.cpp#7 (text) ====

@@ -505,7 +505,11 @@
                                                   pos+QPoint(width(),0) : pos );
     else
        screen_num = QApplication::desktop()->screenNumber( this );
+#ifdef Q_WS_MAC
     QRect screen = QApplication::desktop()->availableGeometry( screen_num );
+#else
+    QRect screen = QApplication::desktop()->screenGeometry( screen_num );
+#endif
     int sw = screen.width();                   // screen width
     int sh = screen.height();                  // screen height
     int sx = screen.x();                       // screen pos
@@ -1123,7 +1127,7 @@
            ++it;
            if ( !mi->isVisible() )
                continue;
- 
+
            int itemh = itemHeight( mi );
 
            sz = style().sizeFromContents(QStyle::CT_PopupMenuItem, this,



best regards

Anders Bakken
--
Trolltech AS, Waldemar Thranes gate 98, NO-0175 Oslo, Norway




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