Changeset View
Changeset View
Standalone View
Standalone View
src/decoration.cpp
Context not available. | |||||
23 | #include "private/decoratedclientprivate.h" | 23 | #include "private/decoratedclientprivate.h" | ||
---|---|---|---|---|---|
24 | #include "private/decorationbridge.h" | 24 | #include "private/decorationbridge.h" | ||
25 | #include "decorationbutton.h" | 25 | #include "decorationbutton.h" | ||
26 | #include "decorationtabgroup.h" | ||||
26 | #include "decorationsettings.h" | 27 | #include "decorationsettings.h" | ||
27 | #include "decorationshadow.h" | 28 | #include "decorationshadow.h" | ||
28 | 29 | | |||
Context not available. | |||||
144 | ); | 145 | ); | ||
145 | } | 146 | } | ||
146 | 147 | | |||
148 | void Decoration::Private::setTabGroup(DecorationTabGroup *grp) | ||||
149 | { | ||||
150 | if (tabGroup == grp) { | ||||
151 | return; | ||||
152 | } | ||||
153 | tabGroup = grp; | ||||
154 | } | ||||
155 | | ||||
147 | Decoration::Decoration(QObject *parent, const QVariantList &args) | 156 | Decoration::Decoration(QObject *parent, const QVariantList &args) | ||
148 | : QObject(parent) | 157 | : QObject(parent) | ||
149 | , d(new Private(this, args)) | 158 | , d(new Private(this, args)) | ||
Context not available. | |||||
338 | return; | 347 | return; | ||
339 | } | 348 | } | ||
340 | } | 349 | } | ||
350 | | ||||
351 | // for tabgoup | ||||
352 | if (d->tabGroup) { | ||||
353 | if (d->tabGroup->geometry().contains(event->localPos())) { | ||||
354 | QCoreApplication::instance()->sendEvent(d->tabGroup, event); | ||||
355 | return; | ||||
356 | } | ||||
357 | } | ||||
341 | } | 358 | } | ||
342 | 359 | | |||
343 | void Decoration::mouseReleaseEvent(QMouseEvent *event) | 360 | void Decoration::mouseReleaseEvent(QMouseEvent *event) | ||
Context not available. | |||||
348 | return; | 365 | return; | ||
349 | } | 366 | } | ||
350 | } | 367 | } | ||
368 | | ||||
369 | // for tabgoup | ||||
370 | if (d->tabGroup->isButtonPressed()) { | ||||
371 | QCoreApplication::instance()->sendEvent(d->tabGroup, event); | ||||
372 | return; | ||||
373 | } | ||||
351 | // not handled, take care ourselves | 374 | // not handled, take care ourselves | ||
352 | d->updateSectionUnderMouse(event->pos()); | 375 | d->updateSectionUnderMouse(event->pos()); | ||
353 | } | 376 | } | ||
Context not available. |