Bug 198934 - large unusable area in window menu
Summary: large unusable area in window menu
Status: RESOLVED UPSTREAM
Alias: None
Product: plasma4
Classification: Unmaintained
Component: widget-taskbar (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Alexis MENARD
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-04 18:36 UTC by 20120808_bugs.kde.org
Modified: 2009-07-22 07:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
as described in method a, right mouse click on the title bar (23.83 KB, image/jpeg)
2009-07-04 18:37 UTC, 20120808_bugs.kde.org
Details
as described in method a, clicking the menu button (27.13 KB, image/jpeg)
2009-07-04 18:38 UTC, 20120808_bugs.kde.org
Details
as described in method b, window menu through taskbar (43.91 KB, image/jpeg)
2009-07-04 18:40 UTC, 20120808_bugs.kde.org
Details
as described in method b, moving mouse pointer to access the submenu (39.68 KB, image/jpeg)
2009-07-04 18:41 UTC, 20120808_bugs.kde.org
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 20120808_bugs.kde.org 2009-07-04 18:36:25 UTC
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
Comment 1 20120808_bugs.kde.org 2009-07-04 18:37:25 UTC
Created attachment 35041 [details]
as described in method a, right mouse click on the title bar
Comment 2 20120808_bugs.kde.org 2009-07-04 18:38:09 UTC
Created attachment 35042 [details]
as described in method a, clicking the menu button
Comment 3 20120808_bugs.kde.org 2009-07-04 18:40:19 UTC
Created attachment 35043 [details]
as described in method b, window menu through taskbar
Comment 4 20120808_bugs.kde.org 2009-07-04 18:41:09 UTC
Created attachment 35044 [details]
as described in method b, moving mouse pointer to access the submenu
Comment 5 20120808_bugs.kde.org 2009-07-04 18:44:34 UTC
my settings

desktop effects: disabled
desktop theme: air
appearance widget style: oxygen
window decoration: plastik
Comment 6 20120808_bugs.kde.org 2009-07-05 00:03:26 UTC
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
Comment 7 Aaron J. Seigo 2009-07-05 09:28:33 UTC
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?
Comment 8 20120808_bugs.kde.org 2009-07-22 07:53:37 UTC
"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