Version: kde 4.3 rc1 (4.2.95) (using KDE 4.2.90) OS: Linux Installed from: Ubuntu Packages using kde 4.2.95 (kde 4.3 rc1) kubuntu packages I am seeing different effects from the following two ways of accessing the window menu. Other than having expected the same results, it seems there is a bug when accessed through the one method. steps to reproduce: 1 - open a program, konqueror for example method a) 2a - either click the "menu" button (usually the button to the far left on the title bar of the application) or right mouse click on konqueror's title bar the 'window menu' with to desktop, resize, move, and so on appears the arrows for 'to desktop' and 'advanced' are flush with the right-hand side of the window moving the mouse pointer along the horizontal left or right from 'to desktop' results in the menu expanding, showing the other desktop options (all, desktop 1, desktop 2) * this is the expected behavior * method b) 2b - right mouse click on the place setting for konqueror in the task manager the same window menu appears (to desktop, move, resize, ...) with all of the same options as in method a save 'configure window behavior ...' but in this window, the arrows for 'to desktop' and 'advanced' are not flush to the right-hand side of the window and the mouse pointer needs to be placed between the left-hand side of the window and the displayed arrow in order for the menu to expand. placing the mouse pointer to the right of the arrow, between the arrow and the right-hand side border does not result in the menu being expanded. * this is the unexpected behavior * the two windows (the one from method a and the one from method b) appear to be the same size and in both cases the arrows indicating hidden submenus appear to be placed the same distance to the right after the longest line of text in method a, that longest line is 'configure window behavior...' and in method b, the longest line is 'to desktop' (actually on mine there is a greyed out entry 'to current desktop' which is longer than 'to desktop') screenshots to follow
Created attachment 35041 [details] as described in method a, right mouse click on the title bar
Created attachment 35042 [details] as described in method a, clicking the menu button
Created attachment 35043 [details] as described in method b, window menu through taskbar
Created attachment 35044 [details] as described in method b, moving mouse pointer to access the submenu
my settings desktop effects: disabled desktop theme: air appearance widget style: oxygen window decoration: plastik
in method b) the 'window menu' appears to be drawn to be the same size as its entry in the taskbar. opening more programs, more windows, results in each entry becoming narrower on the taskbar. eventually the 'window menu' is larger than the entry in the taskbar, sticking to its apparent min width value. in this case the arrows indicating submenus are flush with the right-hand side of the window
this is evidently a bug in Qt. the following patch fixes it: ===== diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 9fbbb04..5d62ea6 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -280,7 +280,7 @@ void QMenuPrivate::calcActionRects(QMap<QAction*, QRect> &actionRects, QList<QAc if (!sz.isEmpty()) { - max_column_width = qMax(max_column_width, sz.width()); + max_column_width = qMax(q->minimumWidth(), qMax(max_column_width, sz.width())); //wrapping if (!scroll && y+sz.height()+vmargin > dh - (q->style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, 0, q) * 2)) { ====== Alexis: could you look into getting this into upstream?
"method b" was not the case in kde 4.2.2 there the window menu is large (allows for "do not allow this program to be grouped") but the arrows are to the far right of the area