kwin: Add a KDecorationUnstable::region() slot
This slot can be reimplemented by the decoration to return the regions defined by KDecorationDefines::Region. The only region defined initially is ExtendedBorderRegion. This region specifies an invisible input region that can extend both inside and outside the decoration. The intended use case is to be able to have an active border area that's larger than the visible borders.
This commit is contained in:
parent
5f96025532
commit
3a91e4dee6
2 changed files with 38 additions and 3 deletions
|
@ -474,6 +474,11 @@ KDecoration::WindowOperation KDecorationUnstable::buttonToWindowOperation(Qt::Mo
|
|||
return static_cast< KDecorationBridgeUnstable* >(bridge_)->buttonToWindowOperation(button);
|
||||
}
|
||||
|
||||
QRegion KDecorationUnstable::region(KDecorationDefines::Region)
|
||||
{
|
||||
return QRegion();
|
||||
}
|
||||
|
||||
QString KDecorationDefines::clientGroupItemDragMimeType()
|
||||
{
|
||||
return "text/ClientGroupItem";
|
||||
|
|
|
@ -205,10 +205,29 @@ public:
|
|||
enum Requirement { REQUIREMENT_DUMMY = 1000000 };
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns mimeType used to drag and drop clientGroupItems
|
||||
*/
|
||||
* Regions that can be returned by KDecorationUnstable::region().
|
||||
*/
|
||||
enum Region {
|
||||
/**
|
||||
* This is an invisible input region that can be used to expand the
|
||||
* borders by an invisible amount, both inside and outside the
|
||||
* decoration. The intended use case is to provide an active border
|
||||
* area that's larger than the visible border.
|
||||
*
|
||||
* The mousePosition() implementation must return correct values
|
||||
* for the pixels inside this region.
|
||||
*
|
||||
* Note that mouse events that occur within this region are not
|
||||
* forwarded to the decoration. This may change in the future.
|
||||
*
|
||||
* @since 4.8
|
||||
*/
|
||||
ExtendedBorderRegion
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the mimeType used to drag and drop clientGroupItems
|
||||
*/
|
||||
static QString clientGroupItemDragMimeType();
|
||||
|
||||
};
|
||||
|
@ -978,6 +997,17 @@ public:
|
|||
* a button press was for window tab dragging or for displaying the client menu.
|
||||
*/
|
||||
WindowOperation buttonToWindowOperation(Qt::MouseButtons button);
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* This slot can be reimplemented to return the regions defined
|
||||
* by KDecorationDefines::Region.
|
||||
*
|
||||
* The default implementation always returns an empty region.
|
||||
*
|
||||
* @since 4.8
|
||||
*/
|
||||
QRegion region(KDecorationDefines::Region r);
|
||||
};
|
||||
|
||||
inline
|
||||
|
|
Loading…
Reference in a new issue