Commit cdc5ea19 authored by Nicolas Fella's avatar Nicolas Fella

Revert "[kcm/effects] Clip ListView"

Bad merge

This reverts commit 5babf52d.
parent 5babf52d
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(KWin)
set(PROJECT_VERSION "5.18.80")
project(KWIN)
set(PROJECT_VERSION "5.18.1")
set(PROJECT_VERSION_MAJOR 5)
set(QT_MIN_VERSION "5.12.0")
......@@ -70,6 +70,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
I18n
IconThemes
IdleTime
Init
Notifications
Package
Plasma
......@@ -311,6 +312,7 @@ cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kacti
set(KWIN_NAME "kwin")
set(KWIN_INTERNAL_NAME_X11 "kwin_x11")
set(KWIN_INTERNAL_NAME_WAYLAND "kwin_wayland")
set(KWIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available: may be disabled
if (KWIN_BUILD_XRENDER_COMPOSITING)
......@@ -390,7 +392,7 @@ add_subdirectory(helpers)
########### next target ###############
set(kwin_SRCS
set(kwin_KDEINIT_SRCS
abstract_client.cpp
abstract_opengl_context_attribute_builder.cpp
abstract_output.cpp
......@@ -502,14 +504,14 @@ set(kwin_SRCS
)
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(kwin_SRCS
${kwin_SRCS}
set(kwin_KDEINIT_SRCS
${kwin_KDEINIT_SRCS}
colorcorrection/clockskewnotifierengine_linux.cpp
)
endif()
include(ECMQtDeclareLoggingCategory)
ecm_qt_declare_logging_category(kwin_SRCS
ecm_qt_declare_logging_category(kwin_KDEINIT_SRCS
HEADER
colorcorrect_logging.h
IDENTIFIER
......@@ -522,7 +524,7 @@ ecm_qt_declare_logging_category(kwin_SRCS
if (KWIN_BUILD_TABBOX)
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
set(kwin_SRCS ${kwin_SRCS}
set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
tabbox/clientmodel.cpp
tabbox/desktopchain.cpp
tabbox/desktopmodel.cpp
......@@ -536,33 +538,33 @@ if (KWIN_BUILD_TABBOX)
endif()
if (KWIN_BUILD_ACTIVITIES)
set(kwin_SRCS ${kwin_SRCS}
set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
activities.cpp
)
endif()
if (HAVE_LINUX_VT_H)
set(kwin_SRCS ${kwin_SRCS}
set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
virtual_terminal.cpp
)
endif()
kconfig_add_kcfg_files(kwin_SRCS settings.kcfgc)
kconfig_add_kcfg_files(kwin_SRCS colorcorrection/colorcorrect_settings.kcfgc)
kconfig_add_kcfg_files(kwin_KDEINIT_SRCS settings.kcfgc)
kconfig_add_kcfg_files(kwin_KDEINIT_SRCS colorcorrection/colorcorrect_settings.kcfgc)
qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface)
qt5_add_dbus_adaptor(kwin_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface)
qt5_add_dbus_adaptor(kwin_SRCS org.kde.kwin.ColorCorrect.xml colorcorrection/colorcorrectdbusinterface.h KWin::ColorCorrect::ColorCorrectDBusInterface)
qt5_add_dbus_adaptor(kwin_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl)
qt5_add_dbus_adaptor(kwin_SRCS org.kde.kwin.OrientationSensor.xml orientation_sensor.h KWin::OrientationSensor)
qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface)
qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.Session.xml sm.h KWin::SessionManager)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.kwin.ColorCorrect.xml colorcorrection/colorcorrectdbusinterface.h KWin::ColorCorrect::ColorCorrectDBusInterface)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.kwin.OrientationSensor.xml orientation_sensor.h KWin::OrientationSensor)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.KWin.Session.xml sm.h KWin::SessionManager)
qt5_add_dbus_interface(kwin_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface)
qt5_add_dbus_interface(kwin_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface)
qt5_add_dbus_interface(kwin_SRCS org.kde.kappmenu.xml appmenu_interface)
qt5_add_dbus_interface(kwin_KDEINIT_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface)
qt5_add_dbus_interface(kwin_KDEINIT_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface)
qt5_add_dbus_interface(kwin_KDEINIT_SRCS org.kde.kappmenu.xml appmenu_interface)
ki18n_wrap_ui(kwin_SRCS
ki18n_wrap_ui(kwin_KDEINIT_SRCS
debug_console.ui
shortcutdialog.ui
)
......@@ -645,7 +647,7 @@ set(kwinLibs
Libinput::Libinput
)
add_library(kwin SHARED ${kwin_SRCS})
add_library(kwin SHARED ${kwin_KDEINIT_SRCS})
set_target_properties(kwin PROPERTIES
VERSION ${PROJECT_VERSION}
......@@ -657,10 +659,11 @@ generate_export_header(kwin EXPORT_FILE_NAME kwin_export.h)
target_link_libraries(kwin kwinglutils ${epoxy_LIBRARY})
add_executable(kwin_x11 main_x11.cpp)
target_link_libraries(kwin_x11 kwin KF5::Crash Qt5::X11Extras)
kf5_add_kdeinit_executable(kwin_x11 main_x11.cpp)
target_link_libraries(kdeinit_kwin_x11 kwin KF5::Crash Qt5::X11Extras)
install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
install(TARGETS kdeinit_kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS})
set(kwin_XWAYLAND_SRCS
......
......@@ -91,8 +91,5 @@ KWin uses [KDE's phabricator instance](https://phabricator.kde.org) for code rev
More complete documentation can be found in [KDE's wiki](https://community.kde.org/Infrastructure/Phabricator). Please add "#KWin" as reviewers. Please run KWin's automated test suite prior to uploading a patch to ensure that the change does not break existing code.
# Coding conventions
KWin's coding conventions are explained in document [coding-conventions.md](doc/coding-conventions.md).
# Coding style
KWin code follows the [Frameworks coding style](https://techbase.kde.org/Policies/Frameworks_Coding_Style).
......@@ -64,6 +64,10 @@ AbstractClient::AbstractClient()
#endif
, m_colorScheme(QStringLiteral("kdeglobals"))
{
connect(this, &AbstractClient::geometryShapeChanged, this, &AbstractClient::geometryChanged);
auto signalMaximizeChanged = static_cast<void (AbstractClient::*)(KWin::AbstractClient*, MaximizeMode)>(&AbstractClient::clientMaximizedStateChanged);
connect(this, signalMaximizeChanged, this, &AbstractClient::geometryChanged);
connect(this, &AbstractClient::clientStepUserMovedResized, this, &AbstractClient::geometryChanged);
connect(this, &AbstractClient::clientStartUserMovedResized, this, &AbstractClient::moveResizedChanged);
connect(this, &AbstractClient::clientFinishUserMovedResized, this, &AbstractClient::moveResizedChanged);
connect(this, &AbstractClient::clientStartUserMovedResized, this, &AbstractClient::removeCheckScreenConnection);
......@@ -85,7 +89,7 @@ AbstractClient::AbstractClient()
});
// replace on-screen-display on size changes
connect(this, &AbstractClient::frameGeometryChanged, this,
connect(this, &AbstractClient::geometryShapeChanged, this,
[this] (Toplevel *c, const QRect &old) {
Q_UNUSED(c)
if (isOnScreenDisplay() && !frameGeometry().isEmpty() && old.size() != frameGeometry().size() && !isInitialPositionSet()) {
......@@ -131,6 +135,11 @@ void AbstractClient::setClientShown(bool shown)
Q_UNUSED(shown)
}
MaximizeMode AbstractClient::requestedMaximizeMode() const
{
return maximizeMode();
}
xcb_timestamp_t AbstractClient::userTime() const
{
return XCB_TIME_CURRENT_TIME;
......@@ -317,13 +326,19 @@ void AbstractClient::setKeepAbove(bool b)
if (b && !rules()->checkKeepBelow(false))
setKeepBelow(false);
if (b == keepAbove()) {
// force hint change if different
if (info && bool(info->state() & NET::KeepAbove) != keepAbove())
info->setState(keepAbove() ? NET::KeepAbove : NET::States(), NET::KeepAbove);
return;
}
m_keepAbove = b;
doSetKeepAbove();
if (info) {
info->setState(keepAbove() ? NET::KeepAbove : NET::States(), NET::KeepAbove);
}
workspace()->updateClientLayer(this);
updateWindowRules(Rules::Above);
doSetKeepAbove();
emit keepAboveChanged(m_keepAbove);
}
......@@ -337,13 +352,19 @@ void AbstractClient::setKeepBelow(bool b)
if (b && !rules()->checkKeepAbove(false))
setKeepAbove(false);
if (b == keepBelow()) {
// force hint change if different
if (info && bool(info->state() & NET::KeepBelow) != keepBelow())
info->setState(keepBelow() ? NET::KeepBelow : NET::States(), NET::KeepBelow);
return;
}
m_keepBelow = b;
doSetKeepBelow();
if (info) {
info->setState(keepBelow() ? NET::KeepBelow : NET::States(), NET::KeepBelow);
}
workspace()->updateClientLayer(this);
updateWindowRules(Rules::Below);
doSetKeepBelow();
emit keepBelowChanged(m_keepBelow);
}
......@@ -390,15 +411,13 @@ void AbstractClient::demandAttention(bool set)
if (m_demandsAttention == set)
return;
m_demandsAttention = set;
doSetDemandsAttention();
if (info) {
info->setState(set ? NET::DemandsAttention : NET::States(), NET::DemandsAttention);
}
workspace()->clientAttentionChanged(this, set);
emit demandsAttentionChanged();
}
void AbstractClient::doSetDemandsAttention()
{
}
void AbstractClient::setDesktop(int desktop)
{
const int numberOfDesktops = VirtualDesktopManager::self()->count();
......@@ -470,7 +489,7 @@ void AbstractClient::setDesktops(QVector<VirtualDesktop*> desktops)
c2->setDesktops(desktops);
}
doSetDesktop();
doSetDesktop(desktop(), was_desk);
FocusChain::self()->update(this, FocusChain::MakeFirst);
updateWindowRules(Rules::Desktop);
......@@ -481,8 +500,10 @@ void AbstractClient::setDesktops(QVector<VirtualDesktop*> desktops)
emit x11DesktopIdsChanged();
}
void AbstractClient::doSetDesktop()
void AbstractClient::doSetDesktop(int desktop, int was_desk)
{
Q_UNUSED(desktop)
Q_UNUSED(was_desk)
}
void AbstractClient::enterDesktop(VirtualDesktop *virtualDesktop)
......@@ -598,7 +619,11 @@ void AbstractClient::minimize(bool avoid_animation)
if (!isMinimizable() || isMinimized())
return;
if (isShade() && info) // NETWM restriction - KWindowInfo::isMinimized() == Hidden && !Shaded
info->setState(NET::States(), NET::Shaded);
m_minimized = true;
doMinimize();
updateWindowRules(Rules::Minimize);
......@@ -618,7 +643,11 @@ void AbstractClient::unminimize(bool avoid_animation)
return;
}
if (isShade() && info) // NETWM restriction - KWindowInfo::isMinimized() == Hidden && !Shaded
info->setState(NET::Shaded, NET::Shaded);
m_minimized = false;
doMinimize();
updateWindowRules(Rules::Minimize);
......@@ -793,9 +822,9 @@ void AbstractClient::move(int x, int y, ForceGeometry_t force)
screens()->setCurrent(this);
workspace()->updateStackingOrder();
// client itself is not damaged
emit frameGeometryChanged(this, frameGeometryBeforeUpdateBlocking());
addRepaintDuringGeometryUpdates();
updateGeometryBeforeUpdateBlocking();
emit geometryChanged();
}
bool AbstractClient::startMoveResize()
......@@ -1052,8 +1081,8 @@ void AbstractClient::handleMoveResize(int x, int y, int x_root, int y_root)
bool update = false;
if (isResize()) {
QRect orig = initialMoveResizeGeometry();
SizeMode sizeMode = SizeModeAny;
auto calculateMoveResizeGeom = [this, &topleft, &bottomright, &orig, &sizeMode, &mode]() {
Sizemode sizemode = SizemodeAny;
auto calculateMoveResizeGeom = [this, &topleft, &bottomright, &orig, &sizemode, &mode]() {
switch(mode) {
case PositionTopLeft:
setMoveResizeGeometry(QRect(topleft, orig.bottomRight()));
......@@ -1069,19 +1098,19 @@ void AbstractClient::handleMoveResize(int x, int y, int x_root, int y_root)
break;
case PositionTop:
setMoveResizeGeometry(QRect(QPoint(orig.left(), topleft.y()), orig.bottomRight()));
sizeMode = SizeModeFixedH; // try not to affect height
sizemode = SizemodeFixedH; // try not to affect height
break;
case PositionBottom:
setMoveResizeGeometry(QRect(orig.topLeft(), QPoint(orig.right(), bottomright.y())));
sizeMode = SizeModeFixedH;
sizemode = SizemodeFixedH;
break;
case PositionLeft:
setMoveResizeGeometry(QRect(QPoint(topleft.x(), orig.top()), orig.bottomRight()));
sizeMode = SizeModeFixedW;
sizemode = SizemodeFixedW;
break;
case PositionRight:
setMoveResizeGeometry(QRect(orig.topLeft(), QPoint(bottomright.x(), orig.bottom())));
sizeMode = SizeModeFixedW;
sizemode = SizemodeFixedW;
break;
case PositionCenter:
default:
......@@ -1182,7 +1211,7 @@ void AbstractClient::handleMoveResize(int x, int y, int x_root, int y_root)
}
// Always obey size hints, even when in "unrestricted" mode
QSize size = adjustedSize(moveResizeGeometry().size(), sizeMode);
QSize size = adjustedSize(moveResizeGeometry().size(), sizemode);
// the new topleft and bottomright corners (after checking size constrains), if they'll be needed
topleft = QPoint(moveResizeGeometry().right() - size.width() + 1, moveResizeGeometry().bottom() - size.height() + 1);
bottomright = QPoint(moveResizeGeometry().left() + size.width() - 1, moveResizeGeometry().top() + size.height() - 1);
......@@ -1191,9 +1220,9 @@ void AbstractClient::handleMoveResize(int x, int y, int x_root, int y_root)
// if aspect ratios are specified, both dimensions may change.
// Therefore grow to the right/bottom if needed.
// TODO it should probably obey gravity rather than always using right/bottom ?
if (sizeMode == SizeModeFixedH)
if (sizemode == SizemodeFixedH)
orig.setRight(bottomright.x());
else if (sizeMode == SizeModeFixedW)
else if (sizemode == SizemodeFixedW)
orig.setBottom(bottomright.y());
calculateMoveResizeGeom();
......@@ -1209,7 +1238,7 @@ void AbstractClient::handleMoveResize(int x, int y, int x_root, int y_root)
setMoveResizeGeometry(workspace()->clientArea(FullScreenArea, screen, 0));
else {
QRect moveResizeGeom = workspace()->clientArea(MaximizeArea, screen, 0);
QSize adjSize = adjustedSize(moveResizeGeom.size(), SizeModeMax);
QSize adjSize = adjustedSize(moveResizeGeom.size(), SizemodeMax);
if (adjSize != moveResizeGeom.size()) {
QRect r(moveResizeGeom);
moveResizeGeom.setSize(adjSize);
......@@ -1313,6 +1342,8 @@ void AbstractClient::performMoveResize()
setFrameGeometry(moveResizeGeom);
}
doPerformMoveResize();
if (isResize())
addRepaintFull();
positionGeometryTip();
emit clientStepUserMovedResized(this, moveResizeGeom);
}
......@@ -1402,7 +1433,7 @@ void AbstractClient::setupWindowManagementInterface()
w->setParentWindow(transientFor() ? transientFor()->windowManagementInterface() : nullptr);
}
);
connect(this, &AbstractClient::frameGeometryChanged, w,
connect(this, &AbstractClient::geometryChanged, w,
[w, this] {
w->setGeometry(frameGeometry());
}
......@@ -1851,7 +1882,7 @@ BORDER(Right)
BORDER(Top)
#undef BORDER
QSize AbstractClient::sizeForClientSize(const QSize &wsize, SizeMode mode, bool noframe) const
QSize AbstractClient::sizeForClientSize(const QSize &wsize, Sizemode mode, bool noframe) const
{
Q_UNUSED(mode)
Q_UNUSED(noframe)
......@@ -3095,7 +3126,7 @@ void AbstractClient::checkOffscreenPosition(QRect* geom, const QRect& screenArea
}
}
QSize AbstractClient::adjustedSize(const QSize& frame, SizeMode mode) const
QSize AbstractClient::adjustedSize(const QSize& frame, Sizemode mode) const
{
// first, get the window size for the given frame size s
QSize wsize = frameSizeToClientSize(frame);
......@@ -3112,122 +3143,4 @@ QSize AbstractClient::adjustedSize() const
return sizeForClientSize(clientSize());
}
/**
* Returns @c true if the AbstractClient can be shown in full screen mode; otherwise @c false.
*
* Default implementation returns @c false.
*/
bool AbstractClient::isFullScreenable() const
{
return false;
}
/**
* Returns @c true if the AbstractClient is currently being shown in full screen mode; otherwise @c false.
*
* A client in full screen mode occupies the entire screen with no window frame around it.
*
* Default implementation returns @c false.
*/
bool AbstractClient::isFullScreen() const
{
return false;
}
/**
* Returns whether requests initiated by the user to enter or leave full screen mode are honored.
*
* Default implementation returns @c false.
*/
bool AbstractClient::userCanSetFullScreen() const
{
return false;
}
/**
* Asks the AbstractClient to enter or leave full screen mode.
*
* Default implementation does nothing.
*
* @param set @c true if the AbstractClient has to be shown in full screen mode, otherwise @c false
* @param user @c true if the request is initiated by the user, otherwise @c false
*/
void AbstractClient::setFullScreen(bool set, bool user)
{
Q_UNUSED(set)
Q_UNUSED(user)
}
/**
* Returns @c true if the AbstractClient can be minimized; otherwise @c false.
*
* Default implementation returns @c false.
*/
bool AbstractClient::isMinimizable() const
{
return false;
}
/**
* Returns @c true if the AbstractClient can be maximized; otherwise @c false.
*
* Default implementation returns @c false.
*/
bool AbstractClient::isMaximizable() const
{
return false;
}
/**
* Returns the currently applied maximize mode.
*
* Default implementation returns MaximizeRestore.
*/
MaximizeMode AbstractClient::maximizeMode() const
{
return MaximizeRestore;
}
/**
* Returns the last requested maximize mode.
*
* On X11, this method always matches maximizeMode(). On Wayland, it is asynchronous.
*
* Default implementation matches maximizeMode().
*/
MaximizeMode AbstractClient::requestedMaximizeMode() const
{
return maximizeMode();
}
/**
* Returns the geometry of the AbstractClient before it was maximized or quick tiled.
*/
QRect AbstractClient::geometryRestore() const
{
return m_maximizeGeometryRestore;
}
/**
* Sets the geometry of the AbstractClient before it was maximized or quick tiled to @p rect.
*/
void AbstractClient::setGeometryRestore(const QRect &rect)
{
m_maximizeGeometryRestore = rect;
}
/**
* Toggles the maximized state along specified dimensions @p horizontal and @p vertical.
*
* If @p adjust is @c true, only frame geometry will be updated to match requestedMaximizeMode().
*
* Default implementation does nothing.
*/
void AbstractClient::changeMaximize(bool horizontal, bool vertical, bool adjust)
{
Q_UNUSED(horizontal)
Q_UNUSED(vertical)
Q_UNUSED(adjust)
}
}
......@@ -220,8 +220,8 @@ class KWIN_EXPORT AbstractClient : public Toplevel
Q_PROPERTY(bool modal READ isModal NOTIFY modalChanged)
/**
* The geometry of this Client. Be aware that depending on resize mode the frameGeometryChanged
* signal might be emitted at each resize step or only at the end of the resize operation.
* The geometry of this Client. Be aware that depending on resize mode the geometryChanged signal
* might be emitted at each resize step or only at the end of the resize operation.
*/
Q_PROPERTY(QRect geometry READ frameGeometry WRITE setFrameGeometry)
......@@ -416,8 +416,8 @@ public:
virtual bool isHiddenInternal() const = 0;
// TODO: remove boolean trap
virtual void hideClient(bool hide) = 0;
virtual bool isFullScreenable() const;
virtual bool isFullScreen() const;
virtual bool isFullScreenable() const = 0;
virtual bool isFullScreen() const = 0;
// TODO: remove boolean trap
virtual AbstractClient *findModal(bool allow_itself = false) = 0;
virtual bool isTransient() const;
......@@ -484,12 +484,20 @@ public:
bool isMinimized() const {
return m_minimized;
}
virtual void setFullScreen(bool set, bool user = true);
virtual void setFullScreen(bool set, bool user = true) = 0;
virtual void setClientShown(bool shown);
QRect geometryRestore() const;
virtual MaximizeMode maximizeMode() const;
virtual QRect geometryRestore() const = 0;
/**
* The currently applied maximize mode
*/
virtual MaximizeMode maximizeMode() const = 0;
/**
* The maximise mode requested by the server.
* For X this always matches maximizeMode, for wayland clients it
* is asynchronous
*/
virtual MaximizeMode requestedMaximizeMode() const;
void maximize(MaximizeMode);
/**
......@@ -532,10 +540,13 @@ public:
* Whether the Client can be shaded. Default implementation returns @c false.
*/
virtual bool isShadeable() const;
virtual bool isMaximizable() const;
virtual bool isMinimizable() const;
/**
* Returns whether the window is maximizable or not.
*/
virtual bool isMaximizable() const = 0;
virtual bool isMinimizable() const = 0;
virtual QRect iconGeometry() const;
virtual bool userCanSetFullScreen() const;
virtual bool userCanSetFullScreen() const = 0;
virtual bool userCanSetNoBorder() const = 0;
virtual void checkNoBorder();
virtual void setOnActivities(QStringList newActivitiesList);
......@@ -623,15 +634,12 @@ public:
virtual QSize maxSize() const;
virtual void setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0;
void setFrameGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet);
/**
* How to resize the window in order to obey constraints (mainly aspect ratios).
*/
enum SizeMode {
SizeModeAny,
SizeModeFixedW, ///< Try not to affect width
SizeModeFixedH, ///< Try not to affect height
SizeModeMax ///< Try not to make it larger in either direction
/// How to resize the window in order to obey constains (mainly aspect ratios)
enum Sizemode {
SizemodeAny,
SizemodeFixedW, ///< Try not to affect width
SizemodeFixedH, ///< Try not to affect height
SizemodeMax ///< Try not to make it larger in either direction
};
/**
* Calculates the appropriate frame size for the given client size @p wsize.
......@@ -640,12 +648,12 @@ public: