diff --git a/clients/b2/b2client.cpp b/clients/b2/b2client.cpp index e74659b92d..c317dfc63f 100644 --- a/clients/b2/b2client.cpp +++ b/clients/b2/b2client.cpp @@ -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(); } } diff --git a/clients/keramik/keramik.cpp b/clients/keramik/keramik.cpp index 109d221ff3..49c3476e3c 100644 --- a/clients/keramik/keramik.cpp +++ b/clients/keramik/keramik.cpp @@ -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(); } diff --git a/clients/kwmtheme/kwmthemeclient.cpp b/clients/kwmtheme/kwmthemeclient.cpp index eac4311310..a422f31fb5 100644 --- a/clients/kwmtheme/kwmthemeclient.cpp +++ b/clients/kwmtheme/kwmthemeclient.cpp @@ -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(); } diff --git a/lib/kcommondecoration.cpp b/lib/kcommondecoration.cpp index 5da52cee4c..ba5a8a3f41 100644 --- a/lib/kcommondecoration.cpp +++ b/lib/kcommondecoration.cpp @@ -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 )