Version: (using KDE Devel) Installed from: Compiled sources The tab context menu does not popup when the left-most visible tab is 'cut-off'. I'll attach a screen shot that clearly shows what I mean.
Created attachment 6254 [details] Snapshot of working and non working context tab menu.
Ok, can reproduce this one. Thought before you talk about the 'new-tab' popup menu because you said left-clicking. :-)
CVS commit by binner: Bug 82908: Tab context menu doesn't popup CCMAIL: 82908-done@bugs.kde.org M +8 -6 ktabwidget.cpp 1.32 --- kdelibs/kdeui/ktabwidget.cpp #1.31:1.32 @@ -219,10 +219,12 @@ bool KTabWidget::isEmptyTabbarSpace( con QSize size( tabBar()->sizeHint() ); if ( ( tabPosition()==Top && point.y()< size.height() ) || ( tabPosition()==Bottom && point.y()>(height()-size.height() ) ) ) { -#if QT_VERSION >= 0x030200 // QTabWidget::cornerWidget isn't const even it doesn't write any data ;( KTabWidget *that = const_cast<KTabWidget*>(this); - if ( that->cornerWidget( TopLeft ) ) + QWidget *leftcorner = that->cornerWidget( TopLeft ); + if ( leftcorner ) { + if ( point.x()<=leftcorner->width() ) + return true; point.setX( point.x()-size.height() ); -#endif + } if ( tabPosition()==Bottom ) point.setY( point.y()-( height()-size.height() ) );
Left handed mouse... :-() I'm glad I didn't waste any time trying to fix this... ;-)) Works O.K.
CVS commit by binner: Don't consider corner widgets as empty tabbar space (don't you expect it too?) Kurt, there are some small gaps between the full tabbar and the corner widgets which allow dnd and context menu but in general the application has to imple- ment the full wanted behavior for the corner widgets it sets now itself. CCMAIL: 82908@bugs.kde.org M +7 -2 ktabwidget.cpp 1.33 --- kdelibs/kdeui/ktabwidget.cpp #1.32:1.33 @@ -221,8 +221,13 @@ bool KTabWidget::isEmptyTabbarSpace( con // QTabWidget::cornerWidget isn't const even it doesn't write any data ;( KTabWidget *that = const_cast<KTabWidget*>(this); + QWidget *rightcorner = that->cornerWidget( TopRight ); + if ( rightcorner ) { + if ( point.x()>=width()-rightcorner->width() ) + return false; + } QWidget *leftcorner = that->cornerWidget( TopLeft ); if ( leftcorner ) { if ( point.x()<=leftcorner->width() ) - return true; + return false; point.setX( point.x()-size.height() ); }
Now I can't get the context menu to popup at all... It worked with the Comment #3 patch, but not with the Comment #5 patch. I also notice that konqueror is the same... no context menu on the newtab button.
I just update CVS and the context menus still don't work at all; even with just 1 tab open.
Did you read comment 5?
Read? Yes. Understand? No. To get the tab context menu, now, you have to click on an empty space on the tabbar. Of course, if there are no empty spaces (ie. the tab arrows are showing) then you are out of luck. I'm rather puzzled by this change...
> To get the tab context menu, now, you have to click on an empty space on the tabbar. Unless the application doesn't handle right clicks for its buttons, yes. Please feel invited to change Konsole.
O.K. I see what you mean. Before the context menu was a mis-feature. corner widget == empty space. Here's a quickie... it appears to work... I'll look at it again later when I have more time. Index: konsole.cpp =================================================================== RCS file: /home/kde/kdebase/konsole/konsole/konsole.cpp,v retrieving revision 1.465 diff -u -p -r1.465 konsole.cpp --- konsole.cpp 15 Jun 2004 15:19:02 -0000 1.465 +++ konsole.cpp 18 Jun 2004 09:33:31 -0000 @@ -941,6 +941,12 @@ bool Konsole::eventFilter( QObject *o, Q return true; } } + else if (ev->type() == QEvent::ContextMenu) + { + QMouseEvent* mev = static_cast<QMouseEvent*>(ev); + slotTabbarContextMenu(mev->globalPos()); + return true; + } } return KMainWindow::eventFilter(o, ev); }
Applied.