Make the titlebar double-click operation react only the LMB.
BUG: 96079 svn path=/trunk/KDE/kdebase/kwin/; revision=409714
This commit is contained in:
parent
f299853a93
commit
cc7ab636af
4 changed files with 7 additions and 4 deletions
|
@ -1383,7 +1383,7 @@ void B2Titlebar::paintEvent(QPaintEvent *)
|
|||
|
||||
void B2Titlebar::mouseDoubleClickEvent(QMouseEvent *e)
|
||||
{
|
||||
if (e->y() < height()) {
|
||||
if (e->button() == LeftButton && e->y() < height()) {
|
||||
client->titlebarDblClickOperation();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1653,7 +1653,8 @@ void KeramikClient::resizeEvent( QResizeEvent *e )
|
|||
|
||||
void KeramikClient::mouseDoubleClickEvent( QMouseEvent *e )
|
||||
{
|
||||
if ( QRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) )
|
||||
if ( e->button() == LeftButton
|
||||
&& QRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) )
|
||||
titlebarDblClickOperation();
|
||||
}
|
||||
|
||||
|
|
|
@ -752,7 +752,7 @@ void KWMThemeClient::showEvent(QShowEvent *)
|
|||
|
||||
void KWMThemeClient::mouseDoubleClickEvent( QMouseEvent * e )
|
||||
{
|
||||
if (titlebar->geometry().contains( e->pos() ) )
|
||||
if (e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) )
|
||||
titlebarDblClickOperation();
|
||||
}
|
||||
|
||||
|
|
|
@ -684,8 +684,10 @@ void KCommonDecoration::resizeWidget(int w, int h, QWidget *widget) const
|
|||
|
||||
void KCommonDecoration::mouseDoubleClickEvent(QMouseEvent *e)
|
||||
{
|
||||
int tb = layoutMetric(LM_TitleEdgeTop)+layoutMetric(LM_TitleHeight)+layoutMetric(LM_TitleEdgeBottom);
|
||||
if( e->button() != LeftButton )
|
||||
return;
|
||||
|
||||
int tb = layoutMetric(LM_TitleEdgeTop)+layoutMetric(LM_TitleHeight)+layoutMetric(LM_TitleEdgeBottom);
|
||||
// when shaded, react on double clicks everywhere to make it easier to unshade. otherwise
|
||||
// react only on double clicks in the title bar region...
|
||||
if (isSetShade() || e->pos().y() <= tb )
|
||||
|
|
Loading…
Reference in a new issue