Drop build option KWIN_BUILD_SCREENEDGES
The build option got introduced for Plasma Active back in a time when we did not properly aim for convergence. In a Plasma 5 world we want to have only one shell and one window manager which adjust itself. This means we don't want a differently compiled kwin for plasma active, but the same one. Thus the build option doesn't make much sense any more. A KWin for touch interface needs to support screenedges for the case that mouse is plugged in. CCBUG: 340960 REVIEW: 121200
This commit is contained in:
parent
482f89b91f
commit
b7a8bb4f52
14 changed files with 2 additions and 91 deletions
|
@ -188,7 +188,6 @@ include(CMakeDependentOption)
|
||||||
option(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON)
|
option(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON)
|
||||||
option(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON)
|
option(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON)
|
||||||
option(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON)
|
option(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON)
|
||||||
option(KWIN_BUILD_SCREENEDGES "Enable building of KWin with screen edge support" ON)
|
|
||||||
option(KWIN_BUILD_KAPPMENU "Enable building of KWin with application menu support" OFF)
|
option(KWIN_BUILD_KAPPMENU "Enable building of KWin with application menu support" OFF)
|
||||||
option(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON)
|
option(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON)
|
||||||
cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KF5Activities_FOUND" OFF)
|
cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KF5Activities_FOUND" OFF)
|
||||||
|
@ -211,7 +210,6 @@ set(KWIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
if(KWIN_PLASMA_ACTIVE)
|
if(KWIN_PLASMA_ACTIVE)
|
||||||
set(KWIN_BUILD_DECORATIONS OFF)
|
set(KWIN_BUILD_DECORATIONS OFF)
|
||||||
set(KWIN_BUILD_KCMS OFF)
|
set(KWIN_BUILD_KCMS OFF)
|
||||||
set(KWIN_BUILD_SCREENEDGES OFF)
|
|
||||||
set(KWIN_BUILD_XRENDER_COMPOSITING OFF)
|
set(KWIN_BUILD_XRENDER_COMPOSITING OFF)
|
||||||
set(KWIN_BUILD_WITH_OPENGLES ON)
|
set(KWIN_BUILD_WITH_OPENGLES ON)
|
||||||
set(KWIN_NAME "kwinactive")
|
set(KWIN_NAME "kwinactive")
|
||||||
|
@ -352,6 +350,7 @@ set(kwin_KDEINIT_SRCS
|
||||||
xcbutils.cpp
|
xcbutils.cpp
|
||||||
x11eventfilter.cpp
|
x11eventfilter.cpp
|
||||||
logind.cpp
|
logind.cpp
|
||||||
|
screenedge.cpp
|
||||||
scripting/scripting.cpp
|
scripting/scripting.cpp
|
||||||
scripting/workspace_wrapper.cpp
|
scripting/workspace_wrapper.cpp
|
||||||
scripting/meta.cpp
|
scripting/meta.cpp
|
||||||
|
@ -376,13 +375,6 @@ if(KWIN_BUILD_TABBOX)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(KWIN_BUILD_SCREENEDGES)
|
|
||||||
set(
|
|
||||||
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
|
||||||
screenedge.cpp
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(KWIN_BUILD_KAPPMENU)
|
if(KWIN_BUILD_KAPPMENU)
|
||||||
set(
|
set(
|
||||||
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#cmakedefine KWIN_BUILD_DECORATIONS 1
|
#cmakedefine KWIN_BUILD_DECORATIONS 1
|
||||||
#cmakedefine KWIN_BUILD_TABBOX 1
|
#cmakedefine KWIN_BUILD_TABBOX 1
|
||||||
#cmakedefine KWIN_BUILD_DESKTOPCHANGEOSD 1
|
#cmakedefine KWIN_BUILD_DESKTOPCHANGEOSD 1
|
||||||
#cmakedefine KWIN_BUILD_SCREENEDGES 1
|
|
||||||
#cmakedefine KWIN_BUILD_KAPPMENU 1
|
#cmakedefine KWIN_BUILD_KAPPMENU 1
|
||||||
#cmakedefine KWIN_BUILD_ACTIVITIES 1
|
#cmakedefine KWIN_BUILD_ACTIVITIES 1
|
||||||
#define KWIN_NAME "${KWIN_NAME}"
|
#define KWIN_NAME "${KWIN_NAME}"
|
||||||
|
|
22
effects.cpp
22
effects.cpp
|
@ -37,9 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#ifdef KWIN_BUILD_TABBOX
|
#ifdef KWIN_BUILD_TABBOX
|
||||||
#include "tabbox.h"
|
#include "tabbox.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
#include "screenedge.h"
|
#include "screenedge.h"
|
||||||
#endif
|
|
||||||
#include "scripting/scriptedeffect.h"
|
#include "scripting/scriptedeffect.h"
|
||||||
#include "screens.h"
|
#include "screens.h"
|
||||||
#include "thumbnailitem.h"
|
#include "thumbnailitem.h"
|
||||||
|
@ -284,9 +282,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
||||||
connect(tabBox, &TabBox::TabBox::tabBoxClosed, this, &EffectsHandler::tabBoxClosed);
|
connect(tabBox, &TabBox::TabBox::tabBoxClosed, this, &EffectsHandler::tabBoxClosed);
|
||||||
connect(tabBox, &TabBox::TabBox::tabBoxKeyEvent, this, &EffectsHandler::tabBoxKeyEvent);
|
connect(tabBox, &TabBox::TabBox::tabBoxKeyEvent, this, &EffectsHandler::tabBoxKeyEvent);
|
||||||
#endif
|
#endif
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
connect(ScreenEdges::self(), &ScreenEdges::approaching, this, &EffectsHandler::screenEdgeApproaching);
|
connect(ScreenEdges::self(), &ScreenEdges::approaching, this, &EffectsHandler::screenEdgeApproaching);
|
||||||
#endif
|
|
||||||
connect(m_screenLockerWatcher, &ScreenLockerWatcher::locked, this, &EffectsHandler::screenLockingChanged);
|
connect(m_screenLockerWatcher, &ScreenLockerWatcher::locked, this, &EffectsHandler::screenLockingChanged);
|
||||||
// connect all clients
|
// connect all clients
|
||||||
for (Client *c : ws->clientList()) {
|
for (Client *c : ws->clientList()) {
|
||||||
|
@ -696,9 +692,7 @@ void EffectsHandlerImpl::startMouseInterception(Effect *effect, Qt::CursorShape
|
||||||
m_mouseInterceptionWindow.raise();
|
m_mouseInterceptionWindow.raise();
|
||||||
// Raise electric border windows above the input windows
|
// Raise electric border windows above the input windows
|
||||||
// so they can still be triggered.
|
// so they can still be triggered.
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges::self()->ensureOnTop();
|
ScreenEdges::self()->ensureOnTop();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::stopMouseInterception(Effect *effect)
|
void EffectsHandlerImpl::stopMouseInterception(Effect *effect)
|
||||||
|
@ -712,9 +706,7 @@ void EffectsHandlerImpl::stopMouseInterception(Effect *effect)
|
||||||
}
|
}
|
||||||
if (m_grabbedMouseEffects.isEmpty()) {
|
if (m_grabbedMouseEffects.isEmpty()) {
|
||||||
m_mouseInterceptionWindow.unmap();
|
m_mouseInterceptionWindow.unmap();
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
Workspace::self()->stackScreenEdgesUnderOverrideRedirect();
|
Workspace::self()->stackScreenEdgesUnderOverrideRedirect();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1239,9 +1231,7 @@ void EffectsHandlerImpl::checkInputWindowStacking()
|
||||||
m_mouseInterceptionWindow.raise();
|
m_mouseInterceptionWindow.raise();
|
||||||
// Raise electric border windows above the input windows
|
// Raise electric border windows above the input windows
|
||||||
// so they can still be triggered. TODO: Do both at once.
|
// so they can still be triggered. TODO: Do both at once.
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges::self()->ensureOnTop();
|
ScreenEdges::self()->ensureOnTop();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QPoint EffectsHandlerImpl::cursorPos() const
|
QPoint EffectsHandlerImpl::cursorPos() const
|
||||||
|
@ -1251,22 +1241,12 @@ QPoint EffectsHandlerImpl::cursorPos() const
|
||||||
|
|
||||||
void EffectsHandlerImpl::reserveElectricBorder(ElectricBorder border, Effect *effect)
|
void EffectsHandlerImpl::reserveElectricBorder(ElectricBorder border, Effect *effect)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges::self()->reserve(border, effect, "borderActivated");
|
ScreenEdges::self()->reserve(border, effect, "borderActivated");
|
||||||
#else
|
|
||||||
Q_UNUSED(border)
|
|
||||||
Q_UNUSED(effect)
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::unreserveElectricBorder(ElectricBorder border, Effect *effect)
|
void EffectsHandlerImpl::unreserveElectricBorder(ElectricBorder border, Effect *effect)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges::self()->unreserve(border, effect);
|
ScreenEdges::self()->unreserve(border, effect);
|
||||||
#else
|
|
||||||
Q_UNUSED(border)
|
|
||||||
Q_UNUSED(effect)
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long EffectsHandlerImpl::xrenderBufferPicture()
|
unsigned long EffectsHandlerImpl::xrenderBufferPicture()
|
||||||
|
@ -1442,12 +1422,10 @@ QVariant EffectsHandlerImpl::kwinOption(KWinOption kwopt)
|
||||||
switch (kwopt) {
|
switch (kwopt) {
|
||||||
case CloseButtonCorner:
|
case CloseButtonCorner:
|
||||||
return decorationPlugin()->closeButtonCorner();
|
return decorationPlugin()->closeButtonCorner();
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
case SwitchDesktopOnScreenEdge:
|
case SwitchDesktopOnScreenEdge:
|
||||||
return ScreenEdges::self()->isDesktopSwitching();
|
return ScreenEdges::self()->isDesktopSwitching();
|
||||||
case SwitchDesktopOnScreenEdgeMovingWindows:
|
case SwitchDesktopOnScreenEdgeMovingWindows:
|
||||||
return ScreenEdges::self()->isDesktopSwitchingMovingClients();
|
return ScreenEdges::self()->isDesktopSwitchingMovingClients();
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
return QVariant(); // an invalid one
|
return QVariant(); // an invalid one
|
||||||
}
|
}
|
||||||
|
|
10
events.cpp
10
events.cpp
|
@ -41,9 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "unmanaged.h"
|
#include "unmanaged.h"
|
||||||
#include "useractions.h"
|
#include "useractions.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
#include "screenedge.h"
|
#include "screenedge.h"
|
||||||
#endif
|
|
||||||
#include "screens.h"
|
#include "screens.h"
|
||||||
#include "xcbutils.h"
|
#include "xcbutils.h"
|
||||||
|
|
||||||
|
@ -283,22 +281,18 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
|
||||||
const QPoint rootPos(mouseEvent->root_x, mouseEvent->root_y);
|
const QPoint rootPos(mouseEvent->root_x, mouseEvent->root_y);
|
||||||
#ifdef KWIN_BUILD_TABBOX
|
#ifdef KWIN_BUILD_TABBOX
|
||||||
if (TabBox::TabBox::self()->isGrabbed()) {
|
if (TabBox::TabBox::self()->isGrabbed()) {
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges::self()->check(rootPos, QDateTime::fromMSecsSinceEpoch(xTime()), true);
|
ScreenEdges::self()->check(rootPos, QDateTime::fromMSecsSinceEpoch(xTime()), true);
|
||||||
#endif
|
|
||||||
return TabBox::TabBox::self()->handleMouseEvent(mouseEvent);
|
return TabBox::TabBox::self()->handleMouseEvent(mouseEvent);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (effects && static_cast<EffectsHandlerImpl*>(effects)->checkInputWindowEvent(mouseEvent)) {
|
if (effects && static_cast<EffectsHandlerImpl*>(effects)->checkInputWindowEvent(mouseEvent)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
if (QWidget::mouseGrabber()) {
|
if (QWidget::mouseGrabber()) {
|
||||||
ScreenEdges::self()->check(rootPos, QDateTime::fromMSecsSinceEpoch(xTime()), true);
|
ScreenEdges::self()->check(rootPos, QDateTime::fromMSecsSinceEpoch(xTime()), true);
|
||||||
} else {
|
} else {
|
||||||
ScreenEdges::self()->check(rootPos, QDateTime::fromMSecsSinceEpoch(mouseEvent->time));
|
ScreenEdges::self()->check(rootPos, QDateTime::fromMSecsSinceEpoch(mouseEvent->time));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case XCB_KEY_PRESS: {
|
case XCB_KEY_PRESS: {
|
||||||
|
@ -453,10 +447,8 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
|
||||||
if (w)
|
if (w)
|
||||||
QWhatsThis::leaveWhatsThisMode();
|
QWhatsThis::leaveWhatsThisMode();
|
||||||
}
|
}
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
if (ScreenEdges::self()->isEntered(reinterpret_cast<xcb_enter_notify_event_t*>(e)))
|
if (ScreenEdges::self()->isEntered(reinterpret_cast<xcb_enter_notify_event_t*>(e)))
|
||||||
return true;
|
return true;
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case XCB_LEAVE_NOTIFY: {
|
case XCB_LEAVE_NOTIFY: {
|
||||||
|
@ -518,10 +510,8 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
|
||||||
case XCB_FOCUS_OUT:
|
case XCB_FOCUS_OUT:
|
||||||
return true; // always eat these, they would tell Qt that KWin is the active app
|
return true; // always eat these, they would tell Qt that KWin is the active app
|
||||||
case XCB_CLIENT_MESSAGE:
|
case XCB_CLIENT_MESSAGE:
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
if (ScreenEdges::self()->isEntered(reinterpret_cast<xcb_client_message_event_t*>(e)))
|
if (ScreenEdges::self()->isEntered(reinterpret_cast<xcb_client_message_event_t*>(e)))
|
||||||
return true;
|
return true;
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case XCB_EXPOSE: {
|
case XCB_EXPOSE: {
|
||||||
const auto *event = reinterpret_cast<xcb_expose_event_t*>(e);
|
const auto *event = reinterpret_cast<xcb_expose_event_t*>(e);
|
||||||
|
|
10
geometry.cpp
10
geometry.cpp
|
@ -38,9 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "rules.h"
|
#include "rules.h"
|
||||||
#include "screens.h"
|
#include "screens.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
#include "screenedge.h"
|
#include "screenedge.h"
|
||||||
#endif
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
|
@ -82,9 +80,7 @@ void Workspace::desktopResized()
|
||||||
saveOldScreenSizes(); // after updateClientArea(), so that one still uses the previous one
|
saveOldScreenSizes(); // after updateClientArea(), so that one still uses the previous one
|
||||||
|
|
||||||
// TODO: emit a signal instead and remove the deep function calls into edges and effects
|
// TODO: emit a signal instead and remove the deep function calls into edges and effects
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges::self()->recreateEdges();
|
ScreenEdges::self()->recreateEdges();
|
||||||
#endif
|
|
||||||
|
|
||||||
if (effects) {
|
if (effects) {
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->desktopResized(geom.size());
|
static_cast<EffectsHandlerImpl*>(effects)->desktopResized(geom.size());
|
||||||
|
@ -2596,10 +2592,8 @@ bool Client::startMoveResize()
|
||||||
initialMoveResizeGeom = moveResizeGeom = geometry();
|
initialMoveResizeGeom = moveResizeGeom = geometry();
|
||||||
checkUnrestrictedMoveResize();
|
checkUnrestrictedMoveResize();
|
||||||
emit clientStartUserMovedResized(this);
|
emit clientStartUserMovedResized(this);
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
if (ScreenEdges::self()->isDesktopSwitchingMovingClients())
|
if (ScreenEdges::self()->isDesktopSwitchingMovingClients())
|
||||||
ScreenEdges::self()->reserveDesktopSwitching(true, Qt::Vertical|Qt::Horizontal);
|
ScreenEdges::self()->reserveDesktopSwitching(true, Qt::Vertical|Qt::Horizontal);
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2674,10 +2668,8 @@ void Client::leaveMoveResize()
|
||||||
syncRequest.isPending = false;
|
syncRequest.isPending = false;
|
||||||
delete syncRequest.timeout;
|
delete syncRequest.timeout;
|
||||||
syncRequest.timeout = NULL;
|
syncRequest.timeout = NULL;
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
if (ScreenEdges::self()->isDesktopSwitchingMovingClients())
|
if (ScreenEdges::self()->isDesktopSwitchingMovingClients())
|
||||||
ScreenEdges::self()->reserveDesktopSwitching(false, Qt::Vertical|Qt::Horizontal);
|
ScreenEdges::self()->reserveDesktopSwitching(false, Qt::Vertical|Qt::Horizontal);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function checks if it actually makes sense to perform a restricted move/resize.
|
// This function checks if it actually makes sense to perform a restricted move/resize.
|
||||||
|
@ -3037,11 +3029,9 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root)
|
||||||
} else
|
} else
|
||||||
performMoveResize();
|
performMoveResize();
|
||||||
|
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
if (isMove()) {
|
if (isMove()) {
|
||||||
ScreenEdges::self()->check(globalPos, QDateTime::fromMSecsSinceEpoch(xTime()));
|
ScreenEdges::self()->check(globalPos, QDateTime::fromMSecsSinceEpoch(xTime()));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::performMoveResize()
|
void Client::performMoveResize()
|
||||||
|
|
|
@ -4,9 +4,7 @@ add_subdirectory( kwincompositing )
|
||||||
add_subdirectory( kwinoptions )
|
add_subdirectory( kwinoptions )
|
||||||
add_subdirectory( kwindecoration )
|
add_subdirectory( kwindecoration )
|
||||||
add_subdirectory( kwinrules )
|
add_subdirectory( kwinrules )
|
||||||
if(KWIN_BUILD_SCREENEDGES)
|
add_subdirectory( kwinscreenedges )
|
||||||
add_subdirectory( kwinscreenedges )
|
|
||||||
endif()
|
|
||||||
add_subdirectory( kwinscripts )
|
add_subdirectory( kwinscripts )
|
||||||
add_subdirectory( kwindesktop )
|
add_subdirectory( kwindesktop )
|
||||||
|
|
||||||
|
|
|
@ -90,9 +90,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include <QX11Info>
|
#include <QX11Info>
|
||||||
#include "composite.h"
|
#include "composite.h"
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
#include "screenedge.h"
|
#include "screenedge.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
@ -141,7 +139,6 @@ void Workspace::updateStackingOrder(bool propagate_new_clients)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
/*!
|
/*!
|
||||||
* Some fullscreen effects have to raise the screenedge on top of an input window, thus all windows
|
* Some fullscreen effects have to raise the screenedge on top of an input window, thus all windows
|
||||||
* this function puts them back where they belong for regular use and is some cheap variant of
|
* this function puts them back where they belong for regular use and is some cheap variant of
|
||||||
|
@ -153,7 +150,6 @@ void Workspace::stackScreenEdgesUnderOverrideRedirect()
|
||||||
{
|
{
|
||||||
Xcb::restackWindows(QVector<xcb_window_t>() << rootInfo()->supportWindow() << ScreenEdges::self()->windows());
|
Xcb::restackWindows(QVector<xcb_window_t>() << rootInfo()->supportWindow() << ScreenEdges::self()->windows());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Propagates the managed clients to the world.
|
Propagates the managed clients to the world.
|
||||||
|
@ -172,9 +168,7 @@ void Workspace::propagateClients(bool propagate_new_clients)
|
||||||
// windows (e.g. popups).
|
// windows (e.g. popups).
|
||||||
newWindowStack << rootInfo()->supportWindow();
|
newWindowStack << rootInfo()->supportWindow();
|
||||||
|
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
newWindowStack << ScreenEdges::self()->windows();
|
newWindowStack << ScreenEdges::self()->windows();
|
||||||
#endif
|
|
||||||
|
|
||||||
newWindowStack.reserve(newWindowStack.size() + 2*stacking_order.size()); // *2 for inputWindow
|
newWindowStack.reserve(newWindowStack.size() + 2*stacking_order.size()); // *2 for inputWindow
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#include "screenedgeitem.h"
|
#include "screenedgeitem.h"
|
||||||
#include <config-kwin.h>
|
#include <config-kwin.h>
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
#include "screenedge.h"
|
#include "screenedge.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
@ -64,9 +62,7 @@ void ScreenEdgeItem::enableEdge()
|
||||||
if (!m_enabled || m_edge == NoEdge) {
|
if (!m_enabled || m_edge == NoEdge) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges::self()->reserve(static_cast<ElectricBorder>(m_edge), this, "borderActivated");
|
ScreenEdges::self()->reserve(static_cast<ElectricBorder>(m_edge), this, "borderActivated");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenEdgeItem::disableEdge()
|
void ScreenEdgeItem::disableEdge()
|
||||||
|
@ -74,9 +70,7 @@ void ScreenEdgeItem::disableEdge()
|
||||||
if (!m_enabled || m_edge == NoEdge) {
|
if (!m_enabled || m_edge == NoEdge) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges::self()->unreserve(static_cast<ElectricBorder>(m_edge), this);
|
ScreenEdges::self()->unreserve(static_cast<ElectricBorder>(m_edge), this);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScreenEdgeItem::borderActivated(ElectricBorder edge)
|
bool ScreenEdgeItem::borderActivated(ElectricBorder edge)
|
||||||
|
|
|
@ -22,9 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "meta.h"
|
#include "meta.h"
|
||||||
#include "scriptingutils.h"
|
#include "scriptingutils.h"
|
||||||
#include "workspace_wrapper.h"
|
#include "workspace_wrapper.h"
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
#include "../screenedge.h"
|
#include "../screenedge.h"
|
||||||
#endif
|
|
||||||
// KDE
|
// KDE
|
||||||
#include <KConfigGroup>
|
#include <KConfigGroup>
|
||||||
#include <kconfigloader.h>
|
#include <kconfigloader.h>
|
||||||
|
|
|
@ -23,9 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
#include "screenedge.h"
|
#include "screenedge.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <KGlobalAccel>
|
#include <KGlobalAccel>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
@ -164,9 +162,7 @@ QScriptValue registerScreenEdge(QScriptContext *context, QScriptEngine *engine)
|
||||||
QHash<int, QList<QScriptValue> >::iterator it = script->screenEdgeCallbacks().find(edge);
|
QHash<int, QList<QScriptValue> >::iterator it = script->screenEdgeCallbacks().find(edge);
|
||||||
if (it == script->screenEdgeCallbacks().end()) {
|
if (it == script->screenEdgeCallbacks().end()) {
|
||||||
// not yet registered
|
// not yet registered
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges::self()->reserve(static_cast<KWin::ElectricBorder>(edge), script, "borderActivated");
|
ScreenEdges::self()->reserve(static_cast<KWin::ElectricBorder>(edge), script, "borderActivated");
|
||||||
#endif
|
|
||||||
script->screenEdgeCallbacks().insert(edge, QList<QScriptValue>() << context->argument(1));
|
script->screenEdgeCallbacks().insert(edge, QList<QScriptValue>() << context->argument(1));
|
||||||
} else {
|
} else {
|
||||||
it->append(context->argument(1));
|
it->append(context->argument(1));
|
||||||
|
|
|
@ -36,9 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "focuschain.h"
|
#include "focuschain.h"
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
#include "screenedge.h"
|
#include "screenedge.h"
|
||||||
#endif
|
|
||||||
#include "screens.h"
|
#include "screens.h"
|
||||||
#include "unmanaged.h"
|
#include "unmanaged.h"
|
||||||
#include "virtualdesktops.h"
|
#include "virtualdesktops.h"
|
||||||
|
@ -765,7 +763,6 @@ void TabBox::reconfigure()
|
||||||
m_desktopConfig.setLayoutName(config.readEntry("DesktopLayout", defaultDesktopLayout));
|
m_desktopConfig.setLayoutName(config.readEntry("DesktopLayout", defaultDesktopLayout));
|
||||||
m_desktopListConfig.setLayoutName(config.readEntry("DesktopListLayout", defaultDesktopLayout));
|
m_desktopListConfig.setLayoutName(config.readEntry("DesktopListLayout", defaultDesktopLayout));
|
||||||
|
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
QList<ElectricBorder> *borders = &m_borderActivate;
|
QList<ElectricBorder> *borders = &m_borderActivate;
|
||||||
QString borderConfig = QStringLiteral("BorderActivate");
|
QString borderConfig = QStringLiteral("BorderActivate");
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
@ -785,7 +782,6 @@ void TabBox::reconfigure()
|
||||||
borders = &m_borderAlternativeActivate;
|
borders = &m_borderAlternativeActivate;
|
||||||
borderConfig = QStringLiteral("BorderAlternativeActivate");
|
borderConfig = QStringLiteral("BorderAlternativeActivate");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabBox::loadConfig(const KConfigGroup& config, TabBoxConfig& tabBoxConfig)
|
void TabBox::loadConfig(const KConfigGroup& config, TabBoxConfig& tabBoxConfig)
|
||||||
|
|
|
@ -227,9 +227,7 @@ QStringList configModules(bool controlCenter)
|
||||||
#ifdef KWIN_BUILD_TABBOX
|
#ifdef KWIN_BUILD_TABBOX
|
||||||
<< QStringLiteral("kwintabbox")
|
<< QStringLiteral("kwintabbox")
|
||||||
#endif
|
#endif
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
<< QStringLiteral("kwinscreenedges")
|
<< QStringLiteral("kwinscreenedges")
|
||||||
#endif
|
|
||||||
<< QStringLiteral("kwinscripts")
|
<< QStringLiteral("kwinscripts")
|
||||||
;
|
;
|
||||||
return args;
|
return args;
|
||||||
|
|
|
@ -48,9 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "outline.h"
|
#include "outline.h"
|
||||||
#include "placement.h"
|
#include "placement.h"
|
||||||
#include "rules.h"
|
#include "rules.h"
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
#include "screenedge.h"
|
#include "screenedge.h"
|
||||||
#endif
|
|
||||||
#include "screens.h"
|
#include "screens.h"
|
||||||
#include "scripting/scripting.h"
|
#include "scripting/scripting.h"
|
||||||
#ifdef KWIN_BUILD_TABBOX
|
#ifdef KWIN_BUILD_TABBOX
|
||||||
|
@ -196,9 +194,7 @@ Workspace::Workspace(bool restore)
|
||||||
connect(qApp, SIGNAL(screenAdded(QScreen*)), this, SLOT(selectWmInputEventMask()));
|
connect(qApp, SIGNAL(screenAdded(QScreen*)), this, SLOT(selectWmInputEventMask()));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges::create(this);
|
ScreenEdges::create(this);
|
||||||
#endif
|
|
||||||
|
|
||||||
// VirtualDesktopManager needs to be created prior to init shortcuts
|
// VirtualDesktopManager needs to be created prior to init shortcuts
|
||||||
// and prior to TabBox, due to TabBox connecting to signals
|
// and prior to TabBox, due to TabBox connecting to signals
|
||||||
|
@ -239,14 +235,12 @@ void Workspace::init()
|
||||||
screens->setConfig(config);
|
screens->setConfig(config);
|
||||||
screens->reconfigure();
|
screens->reconfigure();
|
||||||
connect(options, SIGNAL(configChanged()), screens, SLOT(reconfigure()));
|
connect(options, SIGNAL(configChanged()), screens, SLOT(reconfigure()));
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
ScreenEdges *screenEdges = ScreenEdges::self();
|
ScreenEdges *screenEdges = ScreenEdges::self();
|
||||||
screenEdges->setConfig(config);
|
screenEdges->setConfig(config);
|
||||||
screenEdges->init();
|
screenEdges->init();
|
||||||
connect(options, SIGNAL(configChanged()), screenEdges, SLOT(reconfigure()));
|
connect(options, SIGNAL(configChanged()), screenEdges, SLOT(reconfigure()));
|
||||||
connect(VirtualDesktopManager::self(), SIGNAL(layoutChanged(int,int)), screenEdges, SLOT(updateLayout()));
|
connect(VirtualDesktopManager::self(), SIGNAL(layoutChanged(int,int)), screenEdges, SLOT(updateLayout()));
|
||||||
connect(this, SIGNAL(clientActivated(KWin::Client*)), screenEdges, SIGNAL(checkBlocking()));
|
connect(this, SIGNAL(clientActivated(KWin::Client*)), screenEdges, SIGNAL(checkBlocking()));
|
||||||
#endif
|
|
||||||
|
|
||||||
FocusChain *focusChain = FocusChain::create(this);
|
FocusChain *focusChain = FocusChain::create(this);
|
||||||
connect(this, SIGNAL(clientRemoved(KWin::Client*)), focusChain, SLOT(remove(KWin::Client*)));
|
connect(this, SIGNAL(clientRemoved(KWin::Client*)), focusChain, SLOT(remove(KWin::Client*)));
|
||||||
|
@ -462,9 +456,7 @@ Client* Workspace::createClient(xcb_window_t w, bool is_mapped)
|
||||||
connect(c, SIGNAL(geometryChanged()), m_compositor, SLOT(checkUnredirect()));
|
connect(c, SIGNAL(geometryChanged()), m_compositor, SLOT(checkUnredirect()));
|
||||||
connect(c, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), m_compositor, SLOT(checkUnredirect()));
|
connect(c, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), m_compositor, SLOT(checkUnredirect()));
|
||||||
connect(c, SIGNAL(blockingCompositingChanged(KWin::Client*)), m_compositor, SLOT(updateCompositeBlocking(KWin::Client*)));
|
connect(c, SIGNAL(blockingCompositingChanged(KWin::Client*)), m_compositor, SLOT(updateCompositeBlocking(KWin::Client*)));
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
connect(c, SIGNAL(clientFullScreenSet(KWin::Client*,bool,bool)), ScreenEdges::self(), SIGNAL(checkBlocking()));
|
connect(c, SIGNAL(clientFullScreenSet(KWin::Client*,bool,bool)), ScreenEdges::self(), SIGNAL(checkBlocking()));
|
||||||
#endif
|
|
||||||
connect(c, SIGNAL(desktopPresenceChanged(KWin::Client*,int)), SIGNAL(desktopPresenceChanged(KWin::Client*,int)), Qt::QueuedConnection);
|
connect(c, SIGNAL(desktopPresenceChanged(KWin::Client*,int)), SIGNAL(desktopPresenceChanged(KWin::Client*,int)), Qt::QueuedConnection);
|
||||||
if (!c->manage(w, is_mapped)) {
|
if (!c->manage(w, is_mapped)) {
|
||||||
Client::deleteClient(c);
|
Client::deleteClient(c);
|
||||||
|
@ -1377,7 +1369,6 @@ QString Workspace::supportInformation() const
|
||||||
}
|
}
|
||||||
support.append(QLatin1String(property.name()) + QStringLiteral(": ") + options->property(property.name()).toString() + QStringLiteral("\n"));
|
support.append(QLatin1String(property.name()) + QStringLiteral(": ") + options->property(property.name()).toString() + QStringLiteral("\n"));
|
||||||
}
|
}
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
support.append(QStringLiteral("\nScreen Edges\n"));
|
support.append(QStringLiteral("\nScreen Edges\n"));
|
||||||
support.append(QStringLiteral( "============\n"));
|
support.append(QStringLiteral( "============\n"));
|
||||||
const QMetaObject *metaScreenEdges = ScreenEdges::self()->metaObject();
|
const QMetaObject *metaScreenEdges = ScreenEdges::self()->metaObject();
|
||||||
|
@ -1388,7 +1379,6 @@ QString Workspace::supportInformation() const
|
||||||
}
|
}
|
||||||
support.append(QLatin1String(property.name()) + QStringLiteral(": ") + ScreenEdges::self()->property(property.name()).toString() + QStringLiteral("\n"));
|
support.append(QLatin1String(property.name()) + QStringLiteral(": ") + ScreenEdges::self()->property(property.name()).toString() + QStringLiteral("\n"));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
support.append(QStringLiteral("\nScreens\n"));
|
support.append(QStringLiteral("\nScreens\n"));
|
||||||
support.append(QStringLiteral( "=======\n"));
|
support.append(QStringLiteral( "=======\n"));
|
||||||
support.append(QStringLiteral("Multi-Head: "));
|
support.append(QStringLiteral("Multi-Head: "));
|
||||||
|
|
|
@ -212,9 +212,7 @@ public:
|
||||||
return deleted;
|
return deleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
|
||||||
void stackScreenEdgesUnderOverrideRedirect();
|
void stackScreenEdgesUnderOverrideRedirect();
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QPoint cascadeOffset(const Client *c) const;
|
QPoint cascadeOffset(const Client *c) const;
|
||||||
|
|
Loading…
Reference in a new issue