diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fc4fc2412..ce69e8492a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,6 @@ OPTION(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON) OPTION(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON) OPTION(KWIN_MOBILE_EFFECTS "Only build effects relevant for mobile devices" OFF) OPTION(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON) -OPTION(KWIN_BUILD_TILING "Enable building of KWin Tiling functionality" ON) OPTION(KWIN_BUILD_SCREENEDGES "Enable building of KWin with screen edge support" ON) OPTION(KWIN_BUILD_SCRIPTING "Enable building of KWin with scripting support" ON) OPTION(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON) @@ -21,7 +20,6 @@ set(KWIN_NAME "kwin") if(KWIN_PLASMA_ACTIVE) set(KWIN_BUILD_DECORATIONS OFF) set(KWIN_BUILD_KCMS OFF) - set(KWIN_BUILD_TILING OFF) set(KWIN_BUILD_SCREENEDGES OFF) set(KWIN_BUILD_SCRIPTING ON) set(KWIN_BUILD_XRENDER_COMPOSITING OFF) @@ -143,26 +141,6 @@ if(KWIN_BUILD_TABBOX) ) endif(KWIN_BUILD_TABBOX) -if(KWIN_BUILD_TILING) - set( - kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} - tiling/tile.cpp - tiling/tiling.cpp - tiling/tilinglayout.cpp - tilinglayoutfactory.cpp - - # tiling layouts - # spiral - tilinglayouts/spiral/spiral.cpp - - # columns - tilinglayouts/columns/columns.cpp - - # floating - tilinglayouts/floating/floating.cpp - ) -endif(KWIN_BUILD_TILING) - if(KWIN_BUILD_SCREENEDGES) set( kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} diff --git a/config-kwin.h.cmake b/config-kwin.h.cmake index 04c31f31de..e5ed2a6d92 100644 --- a/config-kwin.h.cmake +++ b/config-kwin.h.cmake @@ -1,6 +1,5 @@ #cmakedefine KWIN_BUILD_DECORATIONS 1 #cmakedefine KWIN_BUILD_TABBOX 1 -#cmakedefine KWIN_BUILD_TILING 1 #cmakedefine KWIN_BUILD_DESKTOPCHANGEOSD 1 #cmakedefine KWIN_BUILD_SCREENEDGES 1 #cmakedefine KWIN_BUILD_SCRIPTING 1 diff --git a/geometry.cpp b/geometry.cpp index 9d158600c4..dbfb41d8c8 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -46,9 +46,6 @@ along with this program. If not, see . #include #include "outline.h" -#ifdef KWIN_BUILD_TILING -#include "tiling/tiling.h" -#endif namespace KWin { @@ -2030,9 +2027,6 @@ void Client::move(int x, int y, ForceGeometry_t force) workspace()->checkActiveScreen(this); workspace()->updateStackingOrder(); workspace()->checkUnredirect(); -#ifdef KWIN_BUILD_TILING - workspace()->tiling()->notifyTilingWindowMove(this, moveResizeGeom, initialMoveResizeGeom); -#endif // client itself is not damaged const QRect deco_rect = visibleRect(); addLayerRepaint(deco_rect_before_block); @@ -2612,31 +2606,21 @@ void Client::finishMoveResize(bool cancel) const bool wasMove = isMove(); leaveMoveResize(); -#ifdef KWIN_BUILD_TILING - if (workspace()->tiling()->isEnabled()) { - if (wasResize) - workspace()->tiling()->notifyTilingWindowResizeDone(this, moveResizeGeom, initialMoveResizeGeom, cancel); - else if (wasMove) - workspace()->tiling()->notifyTilingWindowMoveDone(this, moveResizeGeom, initialMoveResizeGeom, cancel); - } else -#endif - { - if (cancel) - setGeometry(initialMoveResizeGeom); - else { - if (wasResize) { - const bool restoreH = maximizeMode() == MaximizeHorizontal && - moveResizeGeom.width() != initialMoveResizeGeom.width(); - const bool restoreV = maximizeMode() == MaximizeVertical && - moveResizeGeom.height() != initialMoveResizeGeom.height(); - if (restoreH || restoreV) // NOT setMaximize(restoreH, restoreV); ! - setMaximize(false, false); - } - setGeometry(moveResizeGeom); + if (cancel) + setGeometry(initialMoveResizeGeom); + else { + if (wasResize) { + const bool restoreH = maximizeMode() == MaximizeHorizontal && + moveResizeGeom.width() != initialMoveResizeGeom.width(); + const bool restoreV = maximizeMode() == MaximizeVertical && + moveResizeGeom.height() != initialMoveResizeGeom.height(); + if (restoreH || restoreV) // NOT setMaximize(restoreH, restoreV); ! + setMaximize(false, false); } - if (screen() != moveResizeStartScreen && maximizeMode() != MaximizeRestore) - checkWorkspacePosition(); + setGeometry(moveResizeGeom); } + if (screen() != moveResizeStartScreen && maximizeMode() != MaximizeRestore) + checkWorkspacePosition(); if (isElectricBorderMaximizing()) { setQuickTileMode(electricMode); @@ -2811,12 +2795,6 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root) bool update = false; if (isResize()) { -#ifdef KWIN_BUILD_TILING - // query layout for supported resize mode - if (workspace()->tiling()->isEnabled()) { - mode = workspace()->tiling()->supportedTilingResizeMode(this, mode); - } -#endif // first resize (without checking constrains), then snap, then check bounds, then check constrains QRect orig = initialMoveResizeGeom; Sizemode sizemode = SizemodeAny; @@ -2850,22 +2828,10 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root) sizemode = SizemodeFixedW; break; case PositionCenter: -#ifdef KWIN_BUILD_TILING - // exception for tiling - // Center means no resizing allowed - if (workspace()->tiling()->isEnabled()) { - finishMoveResize(false); - buttonDown = false; - return; - } -#endif default: abort(); break; } -#ifdef KWIN_BUILD_TILING - workspace()->tiling()->notifyTilingWindowResize(this, moveResizeGeom, initialMoveResizeGeom); -#endif // adjust new size to snap to other windows/borders moveResizeGeom = workspace()->adjustClientSize(this, moveResizeGeom, mode); @@ -3067,9 +3033,6 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root) performMoveResize(); if (isMove()) { -#ifdef KWIN_BUILD_TILING - workspace()->tiling()->notifyTilingWindowMove(this, moveResizeGeom, initialMoveResizeGeom); -#endif #ifdef KWIN_BUILD_SCREENEDGES workspace()->screenEdge()->check(globalPos, xTime()); #endif @@ -3078,13 +3041,8 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root) void Client::performMoveResize() { -#ifdef KWIN_BUILD_TILING - if (!workspace()->tiling()->isEnabled()) -#endif - { - if (isMove() || (isResize() && !s_haveResizeEffect)) { - setGeometry(moveResizeGeom); - } + if (isMove() || (isResize() && !s_haveResizeEffect)) { + setGeometry(moveResizeGeom); } #ifdef HAVE_XSYNC if (isResize() && syncRequest.counter != None) diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp index d998259bff..100128b00d 100644 --- a/kcmkwin/kwinoptions/windows.cpp +++ b/kcmkwin/kwinoptions/windows.cpp @@ -62,9 +62,6 @@ #define KWIN_AUTOGROUP_FOREGROUND "AutogroupInForeground" #define KWIN_SEPARATE_SCREEN_FOCUS "SeparateScreenFocus" #define KWIN_ACTIVE_MOUSE_SCREEN "ActiveMouseScreen" -#define KWIN_TILINGON "TilingOn" -#define KWIN_TILING_DEFAULT_LAYOUT "TilingDefaultLayout" -#define KWIN_TILING_RAISE_POLICY "TilingRaisePolicy" //CT 15mar 98 - magics #define KWM_BRDR_SNAP_ZONE "BorderSnapZone" @@ -640,58 +637,6 @@ KAdvancedConfig::KAdvancedConfig(bool _standAlone, KConfig *_config, const KComp connect(hideUtilityWindowsForInactive, SIGNAL(toggled(bool)), SLOT(changed())); vLay->addWidget(hideUtilityWindowsForInactive, 1, 0, 1, 2); - tilBox = new KButtonGroup(this); - tilBox->setTitle(i18n("Tiling")); - QGridLayout *tilBoxLay = new QGridLayout(tilBox); - - tilingOn = new QCheckBox(i18n("Enable Tiling"), tilBox); - tilingOn->setWhatsThis( - i18n("A tiling window manager lays out all the windows in a non-overlapping manner." - " This way all windows are always visible.")); - tilBoxLay->addWidget(tilingOn); - connect(tilingOn, SIGNAL(toggled(bool)), SLOT(tilingOnChanged(bool))); - connect(tilingOn, SIGNAL(toggled(bool)), SLOT(changed())); - - tilingLayoutLabel = new QLabel(i18n("Default Tiling &Layout"), tilBox); - tilBoxLay->addWidget(tilingLayoutLabel, 1, 0); - - tilingLayoutCombo = new KComboBox(tilBox); - - // NOTE: add your layout to the bottom of this list - tilingLayoutCombo->addItem(i18nc("Spiral tiling layout", "Spiral")); - tilingLayoutCombo->addItem(i18nc("Two-column horizontal tiling layout", "Columns")); - tilingLayoutCombo->addItem(i18nc("Floating layout, windows aren't tiled at all", "Floating")); - - tilingLayoutLabel->setBuddy(tilingLayoutCombo); - connect(tilingLayoutCombo, SIGNAL(activated(int)), SLOT(changed())); - tilBoxLay->addWidget(tilingLayoutCombo, 1, 1); - - tilingRaiseLabel = new QLabel(i18n("Floating &Windows Raising"), tilBox); - tilBoxLay->addWidget(tilingRaiseLabel, 2, 0); - - tilingRaiseCombo = new KComboBox(tilBox); - // when a floating window is activated, all other floating - // windows are also brought to the front, above the tiled windows - // when a tiled window is focused, all floating windows go to the back. - // NOTE: If the user has explicitly set a client to "keep above others", that will be respected. - tilingRaiseCombo->addItem(i18nc("Window Raising Policy", "Raise/Lower all floating windows")); - tilingRaiseCombo->addItem(i18nc("Window Raising Policy", "Raise/Lower current window only")); - tilingRaiseCombo->addItem(i18nc("Window Raising Policy", "Floating windows are always on top")); - wtstr = i18n("The window raising policy determines how floating windows are stacked" - " ") ; - tilingRaiseCombo->setWhatsThis(wtstr); - connect(tilingRaiseCombo, SIGNAL(activated(int)), SLOT(changed())); - tilingRaiseLabel->setBuddy(tilingRaiseCombo); - tilBoxLay->addWidget(tilingRaiseCombo, 2, 1); - - lay->addWidget(tilBox); - lay->addStretch(); load(); @@ -721,33 +666,6 @@ void KAdvancedConfig::shadeHoverChanged(bool a) shadeHover->setEnabled(a); } -void KAdvancedConfig::setTilingOn(bool on) -{ - tilingOn->setChecked(on); - tilingLayoutLabel->setEnabled(on); - tilingLayoutCombo->setEnabled(on); - tilingRaiseLabel->setEnabled(on); - tilingRaiseCombo->setEnabled(on); -} - -void KAdvancedConfig::setTilingLayout(int l) -{ - tilingLayoutCombo->setCurrentIndex(l); -} - -void KAdvancedConfig::setTilingRaisePolicy(int l) -{ - tilingRaiseCombo->setCurrentIndex(l); -} - -void KAdvancedConfig::tilingOnChanged(bool a) -{ - tilingLayoutLabel->setEnabled(a); - tilingLayoutCombo->setEnabled(a); - tilingRaiseLabel->setEnabled(a); - tilingRaiseCombo->setEnabled(a); -} - void KAdvancedConfig::showEvent(QShowEvent *ev) { if (!standAlone) { @@ -794,10 +712,6 @@ void KAdvancedConfig::load(void) setAutogroupSimilarWindows(cg.readEntry(KWIN_AUTOGROUP_SIMILAR, false)); setAutogroupInForeground(cg.readEntry(KWIN_AUTOGROUP_FOREGROUND, true)); - setTilingOn(cg.readEntry(KWIN_TILINGON, false)); - setTilingLayout(cg.readEntry(KWIN_TILING_DEFAULT_LAYOUT, 0)); - setTilingRaisePolicy(cg.readEntry(KWIN_TILING_RAISE_POLICY, 0)); - emit KCModule::changed(false); } @@ -835,10 +749,6 @@ void KAdvancedConfig::save(void) QDBusConnection::sessionBus().send(message); } - - cg.writeEntry(KWIN_TILINGON, tilingOn->isChecked()); - cg.writeEntry(KWIN_TILING_DEFAULT_LAYOUT, tilingLayoutCombo->currentIndex()); - cg.writeEntry(KWIN_TILING_RAISE_POLICY, tilingRaiseCombo->currentIndex()); emit KCModule::changed(false); } @@ -848,9 +758,6 @@ void KAdvancedConfig::defaults() setShadeHoverInterval(250); placementCombo->setCurrentIndex(0); // default to Smart setHideUtilityWindowsForInactive(true); - setTilingOn(false); - setTilingLayout(0); - setTilingRaisePolicy(0); setInactiveTabsSkipTaskbar(false); setAutogroupSimilarWindows(false); setAutogroupInForeground(true); diff --git a/kcmkwin/kwinoptions/windows.h b/kcmkwin/kwinoptions/windows.h index f0a9b849c5..7bdab6a3ee 100644 --- a/kcmkwin/kwinoptions/windows.h +++ b/kcmkwin/kwinoptions/windows.h @@ -181,7 +181,6 @@ private slots: emit KCModule::changed(true); } - void tilingOnChanged(bool a); private: int getShadeHoverInterval(void); @@ -210,19 +209,6 @@ private: QCheckBox* autogroupInForeground; KComboBox *placementCombo; - - // ------------------------------ - // Tiling related widgets/methods - // ------------------------------ - KButtonGroup *tilBox; - QCheckBox *tilingOn; - QLabel *tilingLayoutLabel; - QLabel *tilingRaiseLabel; - KComboBox *tilingLayoutCombo; - KComboBox *tilingRaiseCombo; - void setTilingOn(bool); - void setTilingLayout(int); - void setTilingRaisePolicy(int); }; #endif // KKWMWINDOWS_H diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index b37c2939e2..5c1ee928e6 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -106,7 +106,6 @@ RulesWidget::RulesWidget(QWidget* parent) SETUP(autogroupid, force); SETUP(opacityactive, force); SETUP(opacityinactive, force); - SETUP(tilingoption, force); SETUP(shortcut, force); // workarounds tab SETUP(fsplevel, force); @@ -118,7 +117,6 @@ RulesWidget::RulesWidget(QWidget* parent) SETUP(disableglobalshortcuts, force); SETUP(blockcompositing, force); - connect (title_match, SIGNAL(currentIndexChanged(int)), SLOT(titleMatchChanged())); connect (machine_match, SIGNAL(currentIndexChanged(int)), SLOT(machineMatchChanged())); connect (shortcut_edit, SIGNAL(clicked()), SLOT(shortcutEditClicked())); @@ -175,7 +173,6 @@ UPDATE_ENABLE_SLOT(autogroupfg) UPDATE_ENABLE_SLOT(autogroupid) UPDATE_ENABLE_SLOT(opacityactive) UPDATE_ENABLE_SLOT(opacityinactive) -UPDATE_ENABLE_SLOT(tilingoption) void RulesWidget::updateEnableshortcut() { shortcut->setEnabled(enable_shortcut->isChecked() && rule_shortcut->currentIndex() != 0); @@ -311,16 +308,6 @@ QString RulesWidget::comboToActivity(int val) const return activity->itemData(val).toString(); } -int RulesWidget::tilingToCombo(int t) const -{ - return qBound(0, t, 1); -} - -int RulesWidget::comboToTiling(int val) const -{ - return val; // 0 is tiling, 1 is floating -} - static int placementToCombo(Placement::Policy placement) { static const int conv[] = { @@ -473,7 +460,6 @@ void RulesWidget::setRules(Rules* rules) LINEEDIT_FORCE_RULE(autogroupid,); SPINBOX_FORCE_RULE(opacityactive,); SPINBOX_FORCE_RULE(opacityinactive,); - COMBOBOX_FORCE_RULE(tilingoption, tilingToCombo); LINEEDIT_SET_RULE(shortcut,); COMBOBOX_FORCE_RULE(fsplevel,); COMBOBOX_FORCE_RULE(type, typeToCombo); @@ -568,7 +554,6 @@ Rules* RulesWidget::rules() const LINEEDIT_FORCE_RULE(autogroupid,); SPINBOX_FORCE_RULE(opacityactive,); SPINBOX_FORCE_RULE(opacityinactive,); - COMBOBOX_FORCE_RULE(tilingoption, comboToTiling); LINEEDIT_SET_RULE(shortcut,); COMBOBOX_FORCE_RULE(fsplevel,); COMBOBOX_FORCE_RULE(type, comboToType); @@ -688,7 +673,6 @@ void RulesWidget::prefillUnusedValues(const KWindowInfo& info) //LINEEDIT_PREFILL( autogroupid, ); SPINBOX_PREFILL(opacityactive, , 100 /*get the actual opacity somehow*/); SPINBOX_PREFILL(opacityinactive, , 100 /*get the actual opacity somehow*/); - COMBOBOX_PREFILL(tilingoption, tilingToCombo, 0); //LINEEDIT_PREFILL( shortcut, ); //COMBOBOX_PREFILL( fsplevel, ); COMBOBOX_PREFILL(type, typeToCombo, info.windowType(SUPPORTED_MANAGED_WINDOW_TYPES_MASK)); diff --git a/kcmkwin/kwinrules/ruleswidget.h b/kcmkwin/kwinrules/ruleswidget.h index 50a5ea284e..27cf7314ca 100644 --- a/kcmkwin/kwinrules/ruleswidget.h +++ b/kcmkwin/kwinrules/ruleswidget.h @@ -78,7 +78,6 @@ private slots: void updateEnableautogroupid(); void updateEnableopacityactive(); void updateEnableopacityinactive(); - void updateEnabletilingoption(); // workarounds tab void updateEnablefsplevel(); void updateEnabletype(); @@ -96,7 +95,6 @@ private: int comboToDesktop(int val) const; int activityToCombo(QString d) const; QString comboToActivity(int val) const; - int tilingToCombo(int t) const; int comboToTiling(int val) const; void prefillUnusedValues(const KWindowInfo& info); DetectDialog* detect_dlg; diff --git a/kcmkwin/kwinrules/ruleswidgetbase.ui b/kcmkwin/kwinrules/ruleswidgetbase.ui index 318f3c4fca..0ff1abd78c 100644 --- a/kcmkwin/kwinrules/ruleswidgetbase.ui +++ b/kcmkwin/kwinrules/ruleswidgetbase.ui @@ -7,14 +7,14 @@ 0 0 569 - 517 + 535 - 1 + 0 @@ -1308,6 +1308,348 @@ to unconditionally popup in the middle of your screen. &Arrangement && Access + + + + false + + + + Do Not Affect + + + + + Apply Initially + + + + + Remember + + + + + Force + + + + + Apply Now + + + + + Force Temporarily + + + + + + + + Window shall (not) appear in the manager for virtual desktops + + + Skip pa&ger + + + + + + + false + + + + Do Not Affect + + + + + Apply Initially + + + + + Remember + + + + + Force + + + + + Apply Now + + + + + Force Temporarily + + + + + + + + false + + + + + + + false + + + + + + + Window shall (not) appear in the taskbar. + + + Skip &taskbar + + + + + + + false + + + + + + + Window shall (not) appear in the Alt+Tab list + + + Skip &switcher + + + + + + + false + + + Edit... + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + false + + + + Do Not Affect + + + + + Force + + + + + Force Temporarily + + + + + + + + false + + + + Do Not Affect + + + + + Apply Initially + + + + + Remember + + + + + Force + + + + + Apply Now + + + + + Force Temporarily + + + + + + + + Qt::Horizontal + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 8 + + + + + + + + false + + + + + + + false + + + + + + + Shortcut + + + + + + + + + + false + + + + Do Not Affect + + + + + Apply Initially + + + + + Remember + + + + + Force + + + + + Apply Now + + + + + Force Temporarily + + + + + + + + false + + + + Do Not Affect + + + + + Apply Initially + + + + + Remember + + + + + Force + + + + + Apply Now + + + + + Force Temporarily + + + + + + + + false + + + + + + + false + + + @@ -1315,6 +1657,131 @@ to unconditionally popup in the middle of your screen. + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Autog&roup in foreground + + + + + + + false + + + + Do Not Affect + + + + + Force + + + + + Force Temporarily + + + + + + + + false + + + + + + + Qt::Horizontal + + + + + + + Keep &below + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + + Do Not Affect + + + + + Force + + + + + Force Temporarily + + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + + + + + Autogroup by I&D + + + + + + + Autogroup with &identical + + + @@ -1352,107 +1819,6 @@ to unconditionally popup in the middle of your screen. - - - - false - - - - - - - Keep &below - - - - - - - false - - - - Do Not Affect - - - - - Apply Initially - - - - - Remember - - - - - Force - - - - - Apply Now - - - - - Force Temporarily - - - - - - - - false - - - - - - - Qt::Horizontal - - - - - - - Autogroup with &identical - - - - - - - Autog&roup in foreground - - - - - - - false - - - - Do Not Affect - - - - - Force - - - - - Force Temporarily - - - - @@ -1460,441 +1826,6 @@ to unconditionally popup in the middle of your screen. - - - - Autogroup by I&D - - - - - - - false - - - - Do Not Affect - - - - - Force - - - - - Force Temporarily - - - - - - - - false - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - T&iling - - - - - - - false - - - - Do Not Affect - - - - - Force - - - - - Force Temporarily - - - - - - - - false - - - - Tiled - - - - - Floating - - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - - - - - false - - - - - - - Window shall (not) appear in the taskbar. - - - Skip &taskbar - - - - - - - false - - - - Do Not Affect - - - - - Apply Initially - - - - - Remember - - - - - Force - - - - - Apply Now - - - - - Force Temporarily - - - - - - - - Window shall (not) appear in the manager for virtual desktops - - - Skip pa&ger - - - - - - - false - - - - Do Not Affect - - - - - Apply Initially - - - - - Remember - - - - - Force - - - - - Apply Now - - - - - Force Temporarily - - - - - - - - false - - - - - - - Window shall (not) appear in the Alt+Tab list - - - Skip &switcher - - - - - - - false - - - - Do Not Affect - - - - - Apply Initially - - - - - Remember - - - - - Force - - - - - Apply Now - - - - - Force Temporarily - - - - - - - - false - - - - - - - Qt::Horizontal - - - - - - - Shortcut - - - - - - - - - - false - - - - Do Not Affect - - - - - Apply Initially - - - - - Remember - - - - - Force - - - - - Apply Now - - - - - Force Temporarily - - - - - - - - false - - - - - - - false - - - Edit... - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 8 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 8 - - - - - - - - false - - - - - - - false - - - - Do Not Affect - - - - - Force - - - - - Force Temporarily - - - - @@ -2589,7 +2520,6 @@ but this may sometimes fail or superact. rule_autogroupfg enable_autogroupid rule_autogroupid - enable_tilingoption enable_noborder rule_noborder enable_opacityactive diff --git a/kwin.notifyrc b/kwin.notifyrc index cf8caf34a7..65cfe59bbd 100644 --- a/kwin.notifyrc +++ b/kwin.notifyrc @@ -7122,349 +7122,6 @@ Comment[zh_CN]=一些效果不被后端或硬件支持。 Comment[zh_TW]=有些效果未被後端介面或硬體支援。 Action=Popup -[Event/tilingenabled] -Name=Tiling Enabled -Name[ar]=رصف النوافذ مُفعّل -Name[ast]=Mosaicu activáu -Name[bg]=Включено е подреждане в мозайка -Name[bs]=Popločavanje uključeno -Name[ca]=Mosaic habilitat -Name[ca@valencia]=Mosaic habilitat -Name[cs]=Dlaždicování zapnuto -Name[da]=Fliseudlægning aktiveret -Name[de]=Kacheln aktiviert -Name[el]=Ενεργοποίηση παράθεσης -Name[en_GB]=Tiling Enabled -Name[es]=Mosaico activado -Name[et]=Paanimine on sisse lülitatud -Name[eu]=Mosaikoa gaituta -Name[fi]=Kaakelointi otettu käyttöön -Name[fr]=Mosaïque activée -Name[ga]=Tíliú Cumasaithe -Name[he]=ריצוף אופשר -Name[hi]=टायलिग सक्षम -Name[hr]=Slaganje omogućeno -Name[hu]=Mozaik bekapcsolva -Name[ia]=Tegulas habilitate -Name[id]=Pengubinan Diaktifkan -Name[is]=Flísalagningahamur virkur -Name[it]=Affiancamento abilitato -Name[ja]=タイリングが有効 -Name[kk]=Қатарлау рұқсат етілді -Name[km]=បានបើក​ក្រឡា​ក្បឿង -Name[ko]=타일링 활성화됨 -Name[lt]=Išdėliojimas įjungtas -Name[lv]=Mozaīkošana ieslēgta -Name[nb]=Flislegging slått på -Name[nds]=Kacheln anmaakt -Name[nl]=Tegelen ingeschakeld -Name[pa]=ਟਿਲਿੰਗ ਚਾਲੂ ਹੈ -Name[pl]=Kafelki włączone -Name[pt]=Mosaico Activado -Name[pt_BR]=Mosaico habilitado -Name[ro]=Mozaic activat -Name[ru]=Мозаичный режим включён -Name[si]=උළු සෙවිලි කිරීම සක්‍රියයි -Name[sk]=Dlaždice povolené -Name[sl]=Tlakovanje omogočeno -Name[sr]=Поплочавање укључено -Name[sr@ijekavian]=Поплочавање укључено -Name[sr@ijekavianlatin]=Popločavanje uključeno -Name[sr@latin]=Popločavanje uključeno -Name[sv]=Sida vid sida aktiverad -Name[th]=การปูหน้าต่างถูกเปิดใช้งาน -Name[tr]=Döşeme Etkinleştirildi -Name[ug]=كاھىش ئۈنۈمى ئىناۋەتلىك -Name[uk]=Мозаїчне розташування увімкнено -Name[x-test]=xxTiling Enabledxx -Name[zh_CN]=平铺已启用 -Name[zh_TW]=鋪排已開啟 -Comment=Tiling mode has been enabled -Comment[ar]=فُعِّل نمط رصف النوافذ -Comment[ast]=Activáu'l mou mosaicu -Comment[bg]=Включено е подреждане на прозорците в мозайка -Comment[bs]=Uključen je režim popločavanja -Comment[ca]=S'ha habilitat el mode de mosaic -Comment[ca@valencia]=S'ha habilitat el mode de mosaic -Comment[cs]=Dlaždicový režim byl povolen -Comment[da]=Fliseudlægningstilstand er blevet aktiveret -Comment[de]=Kacheln-Modus ist aktiviert worden -Comment[el]=Η λειτουργία παράθεσης έχει ενεργοποιηθεί -Comment[en_GB]=Tiling mode has been enabled -Comment[es]=Se ha activado el modo mosaico -Comment[et]=Paanimine on sisse lülitatud -Comment[eu]=Mosaiko modua gaitu egin da -Comment[fi]=Kaakelointitila on otettu käyttöön -Comment[fr]=L'affichage des fenêtres en mosaïque a été activé. -Comment[ga]=Cumasaíodh an mód tílithe -Comment[he]=מצב ריצוף אופשר -Comment[hr]=Omogućeno je slaganje -Comment[hu]=Mozaikozó ablakkezelés bekapcsolva -Comment[ia]=Le modo de tegulas ha essite habilitate -Comment[id]=Mode pengubinan telah diaktifkan -Comment[is]=Flísalagningahamur hefur verið gerður virkur -Comment[it]=La modalità di affiancamento è stata attivata -Comment[ja]=タイリングモードが有効になりました -Comment[kk]=Қатарлау режімі рұқсат етілді -Comment[km]=បានបើក​របៀប​ក្រឡា​ក្បឿង -Comment[ko]=타일링 모드를 사용합니다 -Comment[lt]=Įjungtas išdėliojimo režimas -Comment[lv]=Mozaīkošanas režīms ir ieslēgts -Comment[nb]=Flislegging er slått på -Comment[nds]="Kacheln " wöör anmaakt -Comment[nl]=Tegelenmodus is ingeschakeld -Comment[pa]=ਟਿਲਿੰਗ ਮੋਡ ਚਾਲੂ ਹੈ -Comment[pl]=Tryb kafelków został włączony -Comment[pt]=O modo em mosaico (lado-a-lado) foi activado -Comment[pt_BR]=O modo em mosaico foi habilitado -Comment[ro]=Dispunerea în modul mozaic a fost activată -Comment[ru]=Мозаичный режим диспетчера окон включён -Comment[si]=සෙවිලි කිරීමේ ප්‍රකාරය සක්‍රිය කර ඇත -Comment[sk]=Režim dlaždíc bol povolený -Comment[sl]=Način s tlakovanjem je bil omogočen -Comment[sr]=Укључен је режим поплочавања -Comment[sr@ijekavian]=Укључен је режим поплочавања -Comment[sr@ijekavianlatin]=Uključen je režim popločavanja -Comment[sr@latin]=Uključen je režim popločavanja -Comment[sv]=Sida vid sida har aktiverats -Comment[th]=โหมดการปูหน้าต่างถูกเปิดใช้งาน -Comment[tr]=Döşeme kipi etkinleştirildi -Comment[ug]=تەكشى ياي ھالىتى قوزغىتىلدى -Comment[uk]=Було увімкнено режим мозаїчного розташування -Comment[x-test]=xxTiling mode has been enabledxx -Comment[zh_CN]=已启用平铺模式 -Comment[zh_TW]=鋪排模式已開啟 -Action=Popup - -[Event/tilingdisabled] -Name=Tiling Disabled -Name[ar]=رصف النوافذ مُعطّل -Name[ast]=Mosaicu desactiváu -Name[bg]=Изключено е подреждането в мозайка -Name[bs]=Popločavanje isključeno -Name[ca]=Mosaic deshabilitat -Name[ca@valencia]=Mosaic deshabilitat -Name[cs]=Dlaždicování vypnuto -Name[da]=Fliseudlægning deaktiveret -Name[de]=Kacheln deaktiviert -Name[el]=Η παράθεση απενεργοποιήθηκε -Name[en_GB]=Tiling Disabled -Name[es]=Mosaico desactivado -Name[et]=Paanimine on välja lülitatud -Name[eu]=Mosaikoa ezgaituta -Name[fi]=Kaakelointi on poistettu käytöstä -Name[fr]=Mosaïque désactivée -Name[ga]=Tíliú Díchumasaithe -Name[he]=ריצוף הופסק -Name[hi]=टायलिंग अक्षम -Name[hr]=Slaganje onemogućeno -Name[hu]=Mozaik kikapcsolva -Name[ia]=Tegulas dishabilitate -Name[id]=Pengubinan Dinonaktifkan -Name[is]=Flísalagningahamur óvirkur -Name[it]=Affiancamento disabilitato -Name[ja]=タイリングが無効 -Name[kk]=Қатарлау рұқсат етілмеді -Name[km]=បានបិទ​ក្រឡា​ក្បឿង -Name[ko]=타일링 비활성화됨 -Name[lt]=Išdėliojimas išjungtas -Name[lv]=Mozaīkošana izslēgta -Name[nb]=Flislegging slått av -Name[nds]="Kacheln" utmaakt -Name[nl]=Tegelen uitgeschakeld -Name[pa]=ਟਿੰਲਿੰਗ ਬੰਦ ਹੈ -Name[pl]=Kafelki wyłączone -Name[pt]=Mosaico Desactivado -Name[pt_BR]=Mosaico desabilitado -Name[ro]=Mozaic dezactivat -Name[ru]=Мозаичный режим выключен -Name[si]=උළු සෙවිලි කිරීම අක්‍රියයි -Name[sk]=Dlaždice zakázané -Name[sl]=Tlakovanje onemogočeno -Name[sr]=Поплочавање искључено -Name[sr@ijekavian]=Поплочавање искључено -Name[sr@ijekavianlatin]=Popločavanje isključeno -Name[sr@latin]=Popločavanje isključeno -Name[sv]=Sida vid sida inaktiverad -Name[th]=การปูหน้าต่างถูกปิดการใช้งาน -Name[tr]=Döşeme Pasifleştirildi -Name[ug]=كاھىش ئۈنۈمى چەكلەنگەن -Name[uk]=Мозаїчне розташування вимкнено -Name[x-test]=xxTiling Disabledxx -Name[zh_CN]=平铺已禁用 -Name[zh_TW]=鋪排已關閉 -Comment=Tiling mode has been disabled -Comment[ar]=عُطِّل نمط رصف النوافذ -Comment[ast]=Desactivóse'l mou mosaicu -Comment[bg]=Изключено е подреждането на прозорците в мозайка -Comment[bs]=Isključen je režim popločavanja -Comment[ca]=S'ha deshabilitat el mode de mosaic -Comment[ca@valencia]=S'ha deshabilitat el mode de mosaic -Comment[cs]=Dlaždicový režim byl zakázán -Comment[da]=Fliseudlægningstilstand er blevet deaktiveret -Comment[de]=Die Funktion „Kacheln“ ist deaktiviert worden -Comment[el]=Η λειτουργία παράθεσης έχει απενεργοποιηθεί -Comment[en_GB]=Tiling mode has been disabled -Comment[es]=Se ha desactivado el modo mosaico -Comment[et]=Paanimine on välja lülitatud -Comment[eu]=Mosaiko modua ezgaitu egin da -Comment[fi]=Kaakelointitila poistettu käytöstä -Comment[fr]=L'affichage des fenêtres en mosaïque a été désactivé. -Comment[ga]=Díchumasaíodh an mód tílithe -Comment[he]=מצב ריצוף הופסק -Comment[hr]=Popločavanje je onemogućeno -Comment[hu]=Mozaikozó ablakkezelés kikapcsolva -Comment[ia]=Le mode de tegulas ha essite dishabilitate -Comment[id]=Tombol pengubinan telah dinonaktifkan -Comment[is]=Flísalagningahamur hefur verið gerður óvirkur -Comment[it]=La modalità di affiancamento è stata disattivata -Comment[ja]=タイリングモードが無効になりました -Comment[kk]=Қатарлау режімі рұқсат етілмеді -Comment[km]=បាន​បិទ​របៀប​ក្រឡាក្បឿង -Comment[ko]=타일링 모드를 사용하지 않습니다 -Comment[lt]=Išjungtas išdėliojimo režimas -Comment[lv]=Mozaīkošanas režīms ir izslēgts -Comment[nb]=Flislegging er slått av -Comment[nds]="Kacheln" wöör utmaakt -Comment[nl]=Tegelenmodus is gedeactiveerd -Comment[pa]=ਟਿਲਿੰਗ ਮੋਡ ਬੰਦ ਕੀਤਾ ਗਿਆ -Comment[pl]=Tryb kafelków został wyłączony -Comment[pt]=O modo em mosaico (lado-a-lado) foi desactivado -Comment[pt_BR]=O modo em mosaico foi desabilitado -Comment[ro]=Dispunerea în modul mozaic a fost dezactivată -Comment[ru]=Мозаичный режим диспетчера окон выключен -Comment[si]=සෙවිලි කිරීමේ ප්‍රකාරය අක්‍රිය කර ඇත -Comment[sk]=Režim dlaždíc bol zakázaný -Comment[sl]=Način s tlakovanjem je bil onemogočen -Comment[sr]=Искључен је режим поплочавања -Comment[sr@ijekavian]=Искључен је режим поплочавања -Comment[sr@ijekavianlatin]=Isključen je režim popločavanja -Comment[sr@latin]=Isključen je režim popločavanja -Comment[sv]=Sida vid sida har inaktiverats -Comment[th]=โหมดการปูหน้าต่างถูกปิดการใช้งาน -Comment[tr]=Döşeme kipi pasifleştirildi -Comment[ug]=تەكشى ياي ھالىتى چەكلەنگەن -Comment[uk]=Було вимкнено режим мозаїчного розташування -Comment[x-test]=xxTiling mode has been disabledxx -Comment[zh_CN]=已禁用平铺模式 -Comment[zh_TW]=鋪排模式已關閉 -Action=Popup - -[Event/tilinglayoutchanged] -Name=Tiling Layout Changed -Name[ar]=تغيَّر مخطط رصف النوافذ -Name[ast]=Disposición de mosaicu camudada -Name[bg]=Подреждането в мозайка е променено -Name[bs]=Raspored popločavanja promijenjen -Name[ca]=Canvi de la disposició del mosaic -Name[ca@valencia]=Canvi de la disposició del mosaic -Name[cs]=Rozložení dlaždic změněno -Name[da]=Layout af fliseudlægning ændret -Name[de]=Kachel-Layout geändert -Name[el]=Η διάταξη της παράθεσης τροποποιήθηκε -Name[en_GB]=Tiling Layout Changed -Name[es]=Disposición de mosaico modificada -Name[et]=Paanimispaigutust muudeti -Name[eu]=Mosaikoaren antolamendua aldatuta -Name[fi]=Kaakelointikokoonpano muuttunut -Name[fr]=Schéma de mosaïque modifié -Name[ga]=Athraíodh Leagan Amach na dTíleanna -Name[he]=פריסת ריצוף שונתה -Name[hi]=टायलिंग खाका बदला -Name[hr]=Promijenjen je raspored slaganja -Name[hu]=Mozaik elrendezése módosítva -Name[ia]=Disposition a tegulas modificate -Name[id]=Tata Letak Pengubinan Diubah -Name[is]=Skipt um flísalagningaham -Name[it]=Schema di affiancamento modificato -Name[ja]=タイリング配列が変更 -Name[kk]=Қатарлап орналасуы өзгертілді -Name[km]=បានផ្លាស់ប្ដូរ​ប្លង់​ក្រឡា​ក្បឿង -Name[ko]=타일링 레이아웃 변경됨 -Name[lt]=Pakeistas išdėliojimo išdėstymas -Name[lv]=Mozaīkošanas izvietojums mainīts -Name[nb]=Endret utforming av flislegging -Name[nds]=Kachelutsehn ännert -Name[nl]=Tegelindeling gewijzigd -Name[pa]=ਟਿਲਿੰਗ ਲੇਆਉਟ ਬਦਲਿਆਟਿਲਿੰਗ ਲੇਆਉ -Name[pl]=Układ kafelków zmieniony -Name[pt]=Disposição em Mosaico Alterada -Name[pt_BR]=Leiaute em mosaico alterado -Name[ro]=Aranjamentul mozaic s-a schimbat -Name[ru]=Схема размещения окон изменена -Name[si]=උළු පිරිසැලසුම වෙනස් කරන ලදි -Name[sk]=Rozloženie dlaždíc zmenené -Name[sl]=Razpored tlakovanja spremenjen -Name[sr]=Распоред поплочавања промењен -Name[sr@ijekavian]=Распоред поплочавања промијењен -Name[sr@ijekavianlatin]=Raspored popločavanja promijenjen -Name[sr@latin]=Raspored popločavanja promenjen -Name[sv]=Utläggning sida vid sida ändrad -Name[th]=การจัดเรียงการปูหน้าต่างมีการเปลี่ยนแปลง -Name[tr]=Döşeme Düzeni Değiştirildi -Name[ug]=تەكشى ياي ئۇسلۇبى ئۆزگەردى -Name[uk]=Мозаїчне компонування змінено -Name[x-test]=xxTiling Layout Changedxx -Name[zh_CN]=平铺布局已更改 -Name[zh_TW]=鋪排佈局已變更 -Comment=Tiling Layout has been changed -Comment[ar]=مخطط رصف النوافذ قد تغير -Comment[ast]=Camudóse la disposición del mosaicu -Comment[bg]=Подреждането на прозорците в мозайка е променено -Comment[bs]=Promijenjen je raspored popločavanja -Comment[ca]=Ha canviat la disposició del mosaic -Comment[ca@valencia]=Ha canviat la disposició del mosaic -Comment[cs]=Rozložení dlaždic bylo změněno -Comment[da]=Layout af fliseudlægning er blevet ændret -Comment[de]=Das Layout der „Kacheln“-Funktion wurde geändert -Comment[el]=Η διάταξη της παράθεσης έχει αλλάξει -Comment[en_GB]=Tiling Layout has been changed -Comment[es]=Se ha modificado la disposición del mosaico -Comment[et]=Paanimispaigutust muudeti -Comment[eu]=Mosaikoaren antolamendua aldatu egin da -Comment[fi]=Kaakelointitila on muuttunut -Comment[fr]=Le schéma de mosaïque a été modifié -Comment[ga]=Athraíodh leagan amach na dtíleanna -Comment[he]=פריסת ריצוף שונתה -Comment[hi]=टायलिंग खाका बदला गया -Comment[hr]=Promijenjen je raspored slaganja -Comment[hu]=A mozaik elrendezése megváltozott -Comment[ia]=Le disposition a tegulas ha essite cambiate -Comment[id]=Tata Letak Pengubinan telah diubah -Comment[is]=Skipt hefur verið um flísalagningaham -Comment[it]=Lo schema di affiancamento è stato modificato -Comment[ja]=タイリング配列が変更されました -Comment[kk]=Қатарлап орналасуы өзгертілді -Comment[km]=បាន​ផ្លាស់ប្ដូរ​ប្លង់​ក្រឡា​ក្បឿង -Comment[ko]=타일링 레이아웃이 변경되었습니다 -Comment[lt]=Išdėliojimo išdėstymas buvo pakeistas -Comment[lv]=Mozaīkošanas izvietojums ir mainīts -Comment[nb]=Utforming av flislegging er endret -Comment[nds]=Dat Kachelutsehn wöör ännert -Comment[nl]=Tegelindeling is gewijzigd -Comment[pa]=ਟਿਲਿੰਗ ਲੇਆਉਟ ਬਦਲਿਆ ਗਿਆ -Comment[pl]=Układ kafelków został zmieniony -Comment[pt]=A disposição das janelas em mosaico (lado-a-lado) mudou -Comment[pt_BR]=O leiaute das janelas em mosaico foi alterado -Comment[ro]=Aranjamentul de tip mozaic a fost schimbat -Comment[ru]=Схема размещения окон была изменена -Comment[si]=උළු පිරිසැලසුම වෙනස් වී ඇත -Comment[sk]=Rozloženie dlaždíc bolo zmenené -Comment[sl]=Razpored tlakovanja je bil spremenjen -Comment[sr]=Промењен је распоред поплочавања -Comment[sr@ijekavian]=Промијењен је распоред поплочавања -Comment[sr@ijekavianlatin]=Promijenjen je raspored popločavanja -Comment[sr@latin]=Promenjen je raspored popločavanja -Comment[sv]=Utläggning sida vid sida har ändrats -Comment[th]=การจัดเรียงการปูหน้าต่างได้เปลี่ยนแปลงแล้ว -Comment[tr]=Döşeme Düzeni değiştirildi -Comment[ug]=تەكشى ياي ئۇسلۇبى ئۆزگەرتىلدى -Comment[uk]=Було змінено мозаїчне компонування -Comment[x-test]=xxTiling Layout has been changedxx -Comment[zh_CN]=已更改平铺布局 -Comment[zh_TW]=鋪排佈局已變更 -Action=Popup - [Event/fullscreen] Name=Window Fullscreen Set Name[ca]=Estableix a pantalla completa diff --git a/libkdecorations/kdecoration.h b/libkdecorations/kdecoration.h index c1ddf5c4dc..614b90238a 100644 --- a/libkdecorations/kdecoration.h +++ b/libkdecorations/kdecoration.h @@ -121,6 +121,7 @@ public: CloseTabGroupOp, // Close the group ActivateNextTabOp, // Move left in the group ActivatePreviousTabOp, // Move right in the group + ///< @deprecated, tiling got removed in 4.10 ToggleClientTiledStateOp, // put a floating client into tiling TabDragOp, diff --git a/libkdecorations/kdecoration_p.cpp b/libkdecorations/kdecoration_p.cpp index 1e01618640..5b54369304 100644 --- a/libkdecorations/kdecoration_p.cpp +++ b/libkdecorations/kdecoration_p.cpp @@ -195,8 +195,7 @@ unsigned long KDecorationOptionsPrivate::updateSettings(KConfig* config) KConfigGroup windowsConfig(config, "Windows"); bool old_move_resize_maximized_windows = move_resize_maximized_windows; - move_resize_maximized_windows = windowsConfig.readEntry("MoveResizeMaximizedWindows", false) || - windowsConfig.readEntry("TilingOn", false); // bug 246153 + move_resize_maximized_windows = windowsConfig.readEntry("MoveResizeMaximizedWindows", false); if (old_move_resize_maximized_windows != move_resize_maximized_windows) changed |= SettingBorder; diff --git a/notifications.cpp b/notifications.cpp index b3b30f5d02..098c806088 100644 --- a/notifications.cpp +++ b/notifications.cpp @@ -101,9 +101,6 @@ bool Notify::raise(Event e, const QString& message, Client* c) case CompositingSuspendedDbus: event = "compositingsuspendeddbus"; break; - case TilingLayoutChanged: - event = "tilinglayoutchanged"; - break; case FullScreen: event = "fullscreen"; break; diff --git a/notifications.h b/notifications.h index bc34bf8555..bc1ad4b165 100644 --- a/notifications.h +++ b/notifications.h @@ -58,7 +58,6 @@ public: DemandAttentionCurrent, DemandAttentionOther, CompositingSuspendedDbus, - TilingLayoutChanged, FullScreen, UnFullScreen, DesktopChange = 100 diff --git a/options.cpp b/options.cpp index ce9e3719a8..72f168d94a 100644 --- a/options.cpp +++ b/options.cpp @@ -125,9 +125,6 @@ Options::Options(QObject *parent) , m_delayFocusInterval(Options::defaultDelayFocusInterval()) , m_shadeHover(Options::defaultShadeHover()) , m_shadeHoverInterval(Options::defaultShadeHoverInterval()) - , m_tilingOn(Options::defaultTiling()) - , m_tilingLayout(Options::defaultTilingLayout()) - , m_tilingRaisePolicy(Options::defaultTilingRaisePolicy()) , m_separateScreenFocus(Options::defaultSeparateScreenFocus()) , m_activeMouseScreen(Options::defaultActiveMouseScreen()) , m_placement(Options::defaultPlacement()) @@ -292,33 +289,6 @@ void Options::setShadeHoverInterval(int shadeHoverInterval) emit shadeHoverIntervalChanged(); } -void Options::setTiling(bool tiling) -{ - if (m_tilingOn == tiling) { - return; - } - m_tilingOn = tiling; - emit tilingChanged(); -} - -void Options::setTilingLayout(int tilingLayout) -{ - if (m_tilingLayout == static_cast(tilingLayout)) { - return; - } - m_tilingLayout = static_cast(tilingLayout); - emit tilingLayoutChanged(); -} - -void Options::setTilingRaisePolicy(int tilingRaisePolicy) -{ - if (m_tilingRaisePolicy == tilingRaisePolicy) { - return; - } - m_tilingRaisePolicy = tilingRaisePolicy; - emit tilingRaisePolicyChanged(); -} - void Options::setSeparateScreenFocus(bool separateScreenFocus) { if (m_separateScreenFocus == separateScreenFocus) { @@ -871,10 +841,6 @@ unsigned long Options::loadConfig() setShadeHover(config.readEntry("ShadeHover", Options::defaultShadeHover())); setShadeHoverInterval(config.readEntry("ShadeHoverInterval", Options::defaultShadeHoverInterval())); - setTiling(config.readEntry("TilingOn", Options::defaultTiling())); - setTilingLayout(config.readEntry("TilingDefaultLayout", Options::defaultTilingLayout())); - setTilingRaisePolicy(config.readEntry("TilingRaisePolicy", Options::defaultTilingRaisePolicy())); - setClickRaise(config.readEntry("ClickRaise", Options::defaultClickRaise())); setBorderSnapZone(config.readEntry("BorderSnapZone", Options::defaultBorderSnapZone())); diff --git a/options.h b/options.h index fc44b729ca..9e4fcc682e 100644 --- a/options.h +++ b/options.h @@ -30,7 +30,6 @@ along with this program. If not, see . #include "placement.h" #include "utils.h" -#include "tilinglayoutfactory.h" namespace KWin { @@ -72,15 +71,6 @@ class Options : public QObject, public KDecorationOptions shade hover interval */ Q_PROPERTY(int shadeHoverInterval READ shadeHoverInterval WRITE setShadeHoverInterval NOTIFY shadeHoverIntervalChanged) - /** - * Whether tiling is enabled or not - */ - Q_PROPERTY(bool tiling READ isTilingOn WRITE setTilingOn WRITE setTiling NOTIFY tilingChanged) - Q_PROPERTY(int tilingLayout READ tilingLayout WRITE setTilingLayout NOTIFY tilingLayoutChanged) - /** - * Tiling window raise policy. - */ - Q_PROPERTY(int tilingRaisePolicy READ tilingRaisePolicy WRITE setTilingRaisePolicy NOTIFY tilingRaisePolicyChanged) /** * whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client) **/ @@ -290,30 +280,6 @@ public: return m_shadeHoverInterval; } - /** - * Whether tiling is enabled or not - */ - bool isTilingOn() const { - return m_tilingOn; - } - void setTilingOn(bool enabled) { - m_tilingOn = enabled; - } - - /** - * Tiling Layout - */ - TilingLayoutFactory::Layouts tilingLayout() const { - return m_tilingLayout; - } - - /** - * Tiling window raise policy. - */ - int tilingRaisePolicy() const { - return m_tilingRaisePolicy; - } - // whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client) bool isSeparateScreenFocus() const { return m_separateScreenFocus; @@ -606,9 +572,6 @@ public: void setDelayFocusInterval(int delayFocusInterval); void setShadeHover(bool shadeHover); void setShadeHoverInterval(int shadeHoverInterval); - void setTiling(bool tiling); - void setTilingLayout(int tilingLayout); - void setTilingRaisePolicy(int tilingRaisePolicy); void setSeparateScreenFocus(bool separateScreenFocus); void setActiveMouseScreen(bool activeMouseScreen); void setPlacement(int placement); @@ -687,15 +650,6 @@ public: static int defaultShadeHoverInterval() { return 250; } - static bool defaultTiling() { - return false; - } - static TilingLayoutFactory::Layouts defaultTilingLayout() { - return TilingLayoutFactory::DefaultLayout; - } - static int defaultTilingRaisePolicy() { - return 0; - } static bool defaultSeparateScreenFocus() { return false; } @@ -916,9 +870,6 @@ Q_SIGNALS: void delayFocusIntervalChanged(); void shadeHoverChanged(); void shadeHoverIntervalChanged(); - void tilingChanged(); - void tilingLayoutChanged(); - void tilingRaisePolicyChanged(); void separateScreenFocusChanged(); void activeMouseScreenChanged(); void placementChanged(); @@ -983,9 +934,6 @@ private: int m_delayFocusInterval; bool m_shadeHover; int m_shadeHoverInterval; - bool m_tilingOn; - TilingLayoutFactory::Layouts m_tilingLayout; - int m_tilingRaisePolicy; bool m_separateScreenFocus; bool m_activeMouseScreen; Placement::Policy m_placement; diff --git a/org.kde.KWin.xml b/org.kde.KWin.xml index 2e8eee595e..da7c55afb8 100644 --- a/org.kde.KWin.xml +++ b/org.kde.KWin.xml @@ -68,10 +68,6 @@ - - - - diff --git a/rules.cpp b/rules.cpp index 08111da98b..5b94e76d1c 100644 --- a/rules.cpp +++ b/rules.cpp @@ -50,7 +50,6 @@ Rules::Rules() , maxsizerule(UnusedForceRule) , opacityactiverule(UnusedForceRule) , opacityinactiverule(UnusedForceRule) - , tilingoptionrule(UnusedForceRule) , ignorepositionrule(UnusedForceRule) , desktoprule(UnusedSetRule) , activityrule(UnusedSetRule) @@ -156,7 +155,6 @@ void Rules::readFromCfg(const KConfigGroup& cfg) READ_FORCE_RULE(opacityinactive, , 0); if (opacityinactive < 0 || opacityinactive > 100) opacityinactive = 100; - READ_FORCE_RULE(tilingoption, , 0); READ_FORCE_RULE(ignoreposition, , false); READ_SET_RULE(desktop, , 0); READ_SET_RULE(activity, , QString()); @@ -246,7 +244,6 @@ void Rules::write(KConfigGroup& cfg) const WRITE_FORCE_RULE(maxsize,); WRITE_FORCE_RULE(opacityactive,); WRITE_FORCE_RULE(opacityinactive,); - WRITE_FORCE_RULE(tilingoption,); WRITE_FORCE_RULE(ignoreposition,); WRITE_SET_RULE(desktop,); WRITE_SET_RULE(activity,); @@ -288,7 +285,6 @@ bool Rules::isEmpty() const && maxsizerule == UnusedForceRule && opacityactiverule == UnusedForceRule && opacityinactiverule == UnusedForceRule - && tilingoptionrule == UnusedForceRule && ignorepositionrule == UnusedForceRule && desktoprule == UnusedSetRule && activityrule == UnusedSetRule @@ -577,7 +573,6 @@ APPLY_FORCE_RULE(maxsize, MaxSize, QSize) APPLY_FORCE_RULE(opacityactive, OpacityActive, int) APPLY_FORCE_RULE(opacityinactive, OpacityInactive, int) APPLY_FORCE_RULE(ignoreposition, IgnorePosition, bool) -APPLY_FORCE_RULE(tilingoption, TilingOption, int) // the cfg. entry needs to stay named the say for backwards compatibility bool Rules::applyIgnoreGeometry(bool& ignore) const @@ -674,7 +669,6 @@ void Rules::discardUsed(bool withdrawn) DISCARD_USED_FORCE_RULE(maxsize); DISCARD_USED_FORCE_RULE(opacityactive); DISCARD_USED_FORCE_RULE(opacityinactive); - DISCARD_USED_FORCE_RULE(tilingoption); DISCARD_USED_FORCE_RULE(ignoreposition); DISCARD_USED_SET_RULE(desktop); DISCARD_USED_SET_RULE(activity); @@ -784,7 +778,6 @@ CHECK_FORCE_RULE(MinSize, QSize) CHECK_FORCE_RULE(MaxSize, QSize) CHECK_FORCE_RULE(OpacityActive, int) CHECK_FORCE_RULE(OpacityInactive, int) -CHECK_FORCE_RULE(TilingOption, int) CHECK_FORCE_RULE(IgnorePosition, bool) bool WindowRules::checkIgnoreGeometry(bool ignore) const diff --git a/rules.h b/rules.h index 3b322fce77..bf299f0a14 100644 --- a/rules.h +++ b/rules.h @@ -61,7 +61,6 @@ public: QSize checkMaxSize(QSize s) const; int checkOpacityActive(int s) const; int checkOpacityInactive(int s) const; - int checkTilingOption(int s) const; bool checkIgnoreGeometry(bool ignore) const; int checkDesktop(int desktop, bool init = false) const; QString checkActivity(QString activity, bool init = false) const; @@ -127,7 +126,6 @@ public: bool applyMaxSize(QSize& s) const; bool applyOpacityActive(int& s) const; bool applyOpacityInactive(int& s) const; - bool applyTilingOption(int& s) const; bool applyIgnoreGeometry(bool& ignore) const; bool applyDesktop(int& desktop, bool init) const; bool applyActivity(QString& activity, bool init) const; @@ -223,8 +221,6 @@ private: ForceRule opacityactiverule; int opacityinactive; ForceRule opacityinactiverule; - int tilingoption; - ForceRule tilingoptionrule; bool ignoreposition; ForceRule ignorepositionrule; int desktop; diff --git a/sm.cpp b/sm.cpp index 36cb78826c..c6350d162d 100644 --- a/sm.cpp +++ b/sm.cpp @@ -35,9 +35,6 @@ along with this program. If not, see . #include #include #include -#ifdef KWIN_BUILD_TILING -#include "tiling/tiling.h" -#endif namespace KWin { @@ -87,16 +84,6 @@ void Workspace::storeSession(KConfig* config, SMSavePhase phase) int count = 0; int active_client = -1; - if (phase == SMSavePhase2 || phase == SMSavePhase2Full) { -#ifdef KWIN_BUILD_TILING - cg.writeEntry("tiling", m_tiling->isEnabled()); - if (m_tiling->isEnabled()) { - kDebug(1212) << "Tiling was ON"; - m_tiling->setEnabled(false); - } -#endif - } - for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it) { Client* c = (*it); QByteArray sessionId = c->sessionId(); @@ -282,10 +269,6 @@ void Workspace::loadSessionInfo() session.clear(); KConfigGroup cg(kapp->sessionConfig(), "Session"); -#ifdef KWIN_BUILD_TILING - m_tiling->setEnabled(cg.readEntry("tiling", false)); -#endif - addSessionInfo(cg); } diff --git a/tiling/tile.cpp b/tiling/tile.cpp deleted file mode 100644 index 01bf6cefa2..0000000000 --- a/tiling/tile.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#include "tile.h" - -#include - -#include - -#include "client.h" -#include "workspace.h" -#include "tiling/tiling.h" - -namespace KWin -{ - -Tile::Tile(Client *c, const QRect& area) - : m_client(c), - m_floating(false) -{ - Q_ASSERT(c != NULL); - setGeometry(area); - m_prevGeom = c->geometry(); - if (!c->isResizable()) - floatTile(); -} - -/* - * NOTE: Why isn't left/right/parent copied? - * Because they might be deleted at any point, so we can't keep pointers to them - * Also it doesn't make sense in the areas where copy is actually going to be used. - * Since we will be getting a new parent and children. - */ -Tile::Tile(const Tile& orig) - : m_client(orig.client()), - m_prevGeom(orig.m_prevGeom), - m_floating(orig.floating()) -{ - setGeometry(orig.geometry()); -} - -Tile::~Tile() -{ - restorePreviousGeometry(); -} - -void Tile::commit() -{ - m_client->setGeometry(geometry(), ForceGeometrySet); -} - -void Tile::setGeometry(int x, int y, int w, int h) -{ - QRect old = m_geom; - m_geom.setTopLeft(QPoint(x, y)); - m_geom.setWidth(w); - m_geom.setHeight(h); - - if (old == m_geom) - return; - - if (floating()) - m_prevGeom = m_geom; - -} - -void Tile::floatTile() -{ - if (floating()) return; - - // note, order of setting m_floating to true - // then calling restore is important - // childGeometryChanged will check for ignoreGeometry() - m_floating = true; - - restorePreviousGeometry(); - - commit(); - client()->workspace()->tiling()->notifyTilingWindowActivated(client()); - // TODO: notify layout manager -} - -void Tile::unfloatTile() -{ - if (!floating()) return; - - m_floating = false; - m_prevGeom = m_client->geometry(); - - setGeometry(m_client->workspace()->clientArea(PlacementArea, m_client)); - commit(); - // TODO: notify layout manager - -} - -void Tile::restorePreviousGeometry() -{ - if (m_prevGeom.isNull()) { - QRect area = m_client->workspace()->clientArea(PlacementArea, m_client); - m_client->workspace()->place(m_client, area); - } else { - m_client->setGeometry(m_prevGeom, ForceGeometrySet); - } - setGeometry(m_client->geometry()); -} - -bool Tile::minimized() const -{ - return m_client->isMinimized(); -} - -void Tile::focus() -{ - m_client->workspace()->activateClient(m_client, true); -} - -void Tile::dumpTile(const QString& indent) const -{ - kDebug(1212) << indent << m_client - << (floating() ? "floating" : "not floating") - << (ignoreGeometry() ? "ignored" : "tiled") - << m_geom ; -} -} diff --git a/tiling/tile.h b/tiling/tile.h deleted file mode 100644 index bcaeb900e3..0000000000 --- a/tiling/tile.h +++ /dev/null @@ -1,125 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#ifndef KWIN_TILE_H -#define KWIN_TILE_H - -#include -#include - -namespace KWin -{ - -class Client; -class Workspace; - -class Tile -{ -public: - enum Direction { - Top, - Right, - Bottom, - Left - }; - - enum LayoutMode { - UseRatio, // uses m_ratio - UseGeometry, // uses current geometry of children - Equal // distribute equally - }; - - Tile(Client *c, const QRect& area); - Tile(const Tile& orig); - virtual ~Tile(); - void setGeometry(const QRect& area); - void setGeometry(int x, int y, int w, int h); - - void resize(const QRect area); - - void restorePreviousGeometry(); - - void commit(); - - void focus(); - - // :| the float datatype interferes with naming - void floatTile(); - void unfloatTile(); - - bool minimized() const; - bool floating() const; - bool ignoreGeometry() const; - QRect geometry() const; - Client* client() const; - - void dumpTile(const QString& indent = "") const; - -private: - - // ------------- - // PROPERTIES - // ------------- - - // our client - Client *m_client; - - // tiled geometry - QRect m_geom; - // before tiling was enabled, if any - QRect m_prevGeom; - - bool m_floating; - -}; - -inline QRect Tile::geometry() const -{ - return m_geom; -} - -inline Client* Tile::client() const -{ - return m_client; -} - -inline bool Tile::floating() const -{ - return m_floating; -} - -/* - * should be respected by all geometry modifying methods. - * It returns true if the Tile is 'out' of the layout, - * due to being minimized, floating or for some other reason. - */ -inline bool Tile::ignoreGeometry() const -{ - return minimized() || floating(); -} - -inline void Tile::setGeometry(const QRect& area) -{ - setGeometry(area.x(), area.y(), area.width(), area.height()); -} - -} // namespace -#endif - diff --git a/tiling/tiling.cpp b/tiling/tiling.cpp deleted file mode 100644 index 7da6bd48ff..0000000000 --- a/tiling/tiling.cpp +++ /dev/null @@ -1,523 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe -Copyright (C) 2011 Arthur Arlt - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#include - -#include -#include -#include -#include - -#include -#include - -#include "tiling/tile.h" -#include "tiling/tilinglayout.h" -#include "tilinglayoutfactory.h" -#include "workspace.h" - -namespace KWin { -Tiling::Tiling(KWin::Workspace* w) - : QObject(w) - , m_workspace(w) - , m_enabled(false) -{ -} - -Tiling::~Tiling() -{ -} - -void Tiling::initShortcuts(KActionCollection* keys){ - KAction *a = NULL; - #define KEY( name, key, fnSlot ) \ - a = keys->addAction( name ); \ - a->setText( i18n( name ) ); \ - qobject_cast( a )->setGlobalShortcut(KShortcut(key)); \ - connect(a, SIGNAL(triggered(bool)), SLOT(fnSlot)); - - a = keys->addAction("Group:Tiling"); - a->setText(i18n("Tiling")); - KEY(I18N_NOOP("Enable/Disable Tiling"), Qt::SHIFT + Qt::ALT + Qt::Key_F11, slotToggleTiling()); - KEY(I18N_NOOP("Toggle Floating"), Qt::META + Qt::Key_F, slotToggleFloating()); - - KEY(I18N_NOOP("Switch Focus Left") , Qt::META + Qt::Key_H, slotFocusTileLeft()); - KEY(I18N_NOOP("Switch Focus Right") , Qt::META + Qt::Key_L, slotFocusTileRight()); - KEY(I18N_NOOP("Switch Focus Up") , Qt::META + Qt::Key_K, slotFocusTileTop()); - KEY(I18N_NOOP("Switch Focus Down") , Qt::META + Qt::Key_J, slotFocusTileBottom()); - KEY(I18N_NOOP("Move Window Left") , Qt::SHIFT + Qt::META + Qt::Key_H, slotMoveTileLeft()); - KEY(I18N_NOOP("Move Window Right") , Qt::SHIFT + Qt::META + Qt::Key_L, slotMoveTileRight()); - KEY(I18N_NOOP("Move Window Up") , Qt::SHIFT + Qt::META + Qt::Key_K, slotMoveTileTop()); - KEY(I18N_NOOP("Move Window Down") , Qt::SHIFT + Qt::META + Qt::Key_J, slotMoveTileBottom()); - KEY(I18N_NOOP("Next Layout"), Qt::META + Qt::Key_PageDown, slotNextTileLayout()); - KEY(I18N_NOOP("Previous Layout"), Qt::META + Qt::Key_PageUp, slotPreviousTileLayout()); - -} - -bool Tiling::isEnabled() const -{ - return m_enabled; -} - -void Tiling::setEnabled(bool tiling) -{ - if (isEnabled() == tiling) return; - - m_enabled = tiling; - - KSharedConfig::Ptr _config = KGlobal::config(); - KConfigGroup config(_config, "Windows"); - config.writeEntry("TilingOn", m_enabled); - config.sync(); - options->setTilingOn(m_enabled); - - if (m_enabled) { - connect(m_workspace, SIGNAL(clientAdded(KWin::Client*)), this, SLOT(createTile(KWin::Client*))); - connect(m_workspace, SIGNAL(clientAdded(KWin::Client*)), this, SLOT(slotResizeTilingLayouts())); - connect(m_workspace, SIGNAL(numberDesktopsChanged(int)), this, SLOT(slotResizeTilingLayouts())); - connect(m_workspace, SIGNAL(clientRemoved(KWin::Client*)), this, SLOT(removeTile(KWin::Client*))); - connect(m_workspace, SIGNAL(clientActivated(KWin::Client*)), this, SLOT(notifyTilingWindowActivated(KWin::Client*))); - m_tilingLayouts.resize(Workspace::self()->numberOfDesktops() + 1); - foreach (Toplevel *t, Workspace::self()->stackingOrder()) { - if (Client *c = qobject_cast(t)) { - createTile(c); - } - } - } else { - disconnect(m_workspace, SIGNAL(clientAdded(KWin::Client*))); - disconnect(m_workspace, SIGNAL(numberDesktopsChanged(int))); - disconnect(m_workspace, SIGNAL(clientRemoved(KWin::Client*))); - qDeleteAll(m_tilingLayouts); - m_tilingLayouts.clear(); - } -} - -void Tiling::slotToggleTiling() -{ - if (isEnabled()) { - setEnabled(false); - QString message = i18n("Tiling Disabled"); - KNotification::event("tilingdisabled", message, QPixmap(), NULL, KNotification::CloseOnTimeout, KComponentData("kwin")); - } else { - setEnabled(true); - QString message = i18n("Tiling Enabled"); - KNotification::event("tilingenabled", message, QPixmap(), NULL, KNotification::CloseOnTimeout, KComponentData("kwin")); - } -} - -void Tiling::createTile(Client* c) -{ - if (c == NULL) - return; - - if (c->desktop() < 0 || c->desktop() >= m_tilingLayouts.size()) return; - - kDebug(1212) << "Now tiling " << c->caption(); - if (!isEnabled() || !tileable(c)) - return; - - Tile *t = new Tile(c, Workspace::self()->clientArea(PlacementArea, c)); - if (!tileable(c)) { - kDebug(1212) << c->caption() << "is not tileable"; - t->floatTile(); - } - - if (!m_tilingLayouts.value(c->desktop())) { - m_tilingLayouts[c->desktop()] = TilingLayoutFactory::createLayout(TilingLayoutFactory::DefaultLayout, m_workspace); - m_tilingLayouts[c->desktop()]->setParent(this); - } - m_tilingLayouts[c->desktop()]->addTile(t); - m_tilingLayouts[c->desktop()]->commit(); - // if tiling is activated, connect to Client's signals and react with rearrangement when (un)minimizing - connect(c, SIGNAL(clientMinimized(KWin::Client*,bool)), this, SLOT(notifyTilingWindowMinimizeToggled(KWin::Client*))); - connect(c, SIGNAL(clientUnminimized(KWin::Client*,bool)), this, SLOT(notifyTilingWindowMinimizeToggled(KWin::Client*))); - connect(c, SIGNAL(clientUnminimized(KWin::Client*,bool)), this, SLOT(updateAllTiles())); -} - -void Tiling::removeTile(Client *c) -{ - if (!m_tilingLayouts.value(c->desktop())) { - return; - } - if (m_tilingLayouts[ c->desktop()]) - m_tilingLayouts[ c->desktop()]->removeTile(c); -} - -bool Tiling::tileable(Client* c) -{ - kDebug(1212) << c->caption(); - KWindowInfo info = KWindowSystem::windowInfo(c->window(), -1U, NET::WM2WindowClass); - kDebug(1212) << "WINDOW CLASS IS " << info.windowClassClass(); - if (info.windowClassClass() == "Plasma-desktop") { - return false; - } - // TODO: if application specific settings - // to ignore, put them here - - if (!c->isNormalWindow()) { - return false; - } - - // 0 means tile it, if we get 1 (floating), don't tile - if (c->rules()->checkTilingOption(0) == 1) { - return false; - } - - kDebug() << "Tiling" << c; - return true; -} - -void Tiling::belowCursor() -{ - // TODO ... "WHAT?" remove? What's a parameterless void function supposed to do? -} - -Tile* Tiling::getNiceTile() const -{ - if (!isEnabled()) return NULL; - if (!m_workspace->activeClient()) return NULL; - if (!m_tilingLayouts.value(m_workspace->activeClient()->desktop())) return NULL; - - return m_tilingLayouts[ m_workspace->activeClient()->desktop()]->findTile(m_workspace->activeClient()); - // TODO ... WHAT? -} - -void Tiling::updateAllTiles() -{ - foreach (TilingLayout * t, m_tilingLayouts) { - if (!t) continue; - t->commit(); - } -} - -/* - * Resize the neighbouring clients to close any gaps - */ -void Tiling::notifyTilingWindowResize(Client *c, const QRect &moveResizeGeom, const QRect &orig) -{ - if (m_tilingLayouts.value(c->desktop()) == NULL) - return; - m_tilingLayouts[ c->desktop()]->clientResized(c, moveResizeGeom, orig); -} - -void Tiling::notifyTilingWindowMove(Client *c, const QRect &moveResizeGeom, const QRect &orig) -{ - if (m_tilingLayouts.value(c->desktop()) == NULL) { - return; - } - m_tilingLayouts[ c->desktop()]->clientMoved(c, moveResizeGeom, orig); - updateAllTiles(); -} - -void Tiling::notifyTilingWindowResizeDone(Client *c, const QRect &moveResizeGeom, const QRect &orig, bool canceled) -{ - if (canceled) - notifyTilingWindowResize(c, orig, moveResizeGeom); - else - notifyTilingWindowResize(c, moveResizeGeom, orig); -} - -void Tiling::notifyTilingWindowMoveDone(Client *c, const QRect &moveResizeGeom, const QRect &orig, bool canceled) -{ - if (canceled) - notifyTilingWindowMove(c, orig, moveResizeGeom); - else - notifyTilingWindowMove(c, moveResizeGeom, orig); -} - -void Tiling::notifyTilingWindowDesktopChanged(Client *c, int old_desktop) -{ - if (c->desktop() < 1 || c->desktop() > m_workspace->numberOfDesktops()) - return; - - if (m_tilingLayouts.value(old_desktop)) { - Tile *t = m_tilingLayouts[ old_desktop ]->findTile(c); - - // TODO: copied from createTile(), move this into separate method? - if (!m_tilingLayouts.value(c->desktop())) { - m_tilingLayouts[c->desktop()] = TilingLayoutFactory::createLayout(TilingLayoutFactory::DefaultLayout, m_workspace); - } - - if (t) - m_tilingLayouts[ c->desktop()]->addTile(t); - - m_tilingLayouts[ old_desktop ]->removeTile(c); - m_tilingLayouts[ old_desktop ]->commit(); - } -} - -/* - * Implements the 3 raising modes in Window Behaviour -> Advanced - */ -void Tiling::notifyTilingWindowActivated(KWin::Client *c) -{ - if (c == NULL) - return; - - if (options->tilingRaisePolicy() == 1) // individual raise/lowers - return; - - if (m_tilingLayouts.value(c->desktop())) { - QList tiles = m_tilingLayouts[ c->desktop()]->tiles(); - - StackingUpdatesBlocker blocker(m_workspace); - - Tile *tile_to_raise = m_tilingLayouts[ c->desktop()]->findTile(c); - - if (!tile_to_raise) { - return; - } - - kDebug(1212) << "FOUND TILE"; - bool raise_floating = false; - if (options->tilingRaisePolicy() == 2) // floating always on top - raise_floating = true; - else - raise_floating = tile_to_raise->floating(); - - foreach (Tile * t, tiles) { - if (t->floating() == raise_floating && t != tile_to_raise) - m_workspace->raiseClient(t->client()); - } - // raise the current tile last so that it ends up on top - // but only if it supposed to be raised, required to support tilingRaisePolicy - kDebug(1212) << "Raise floating? " << raise_floating << "to raise is floating?" << tile_to_raise->floating(); - if (tile_to_raise->floating() == raise_floating) - m_workspace->raiseClient(tile_to_raise->client()); - } -} - -void Tiling::notifyTilingWindowMinimizeToggled(KWin::Client* c) -{ - if (m_tilingLayouts.value(c->desktop())) { - m_tilingLayouts[ c->desktop()]->clientMinimizeToggled(c); - } -} - -void Tiling::notifyTilingWindowMaximized(Client *c, Options::WindowOperation op) -{ - if (m_tilingLayouts.value(c->desktop())) { - Tile *t = m_tilingLayouts[ c->desktop()]->findTile(c); - if (!t) { - createTile(c); - t = m_tilingLayouts[ c->desktop()]->findTile(c); - - // if still no tile, it couldn't be tiled - // so ignore it - if (!t) - return; - } - - // if window IS tiled and a maximize - // is attempted, make the window float. - // That is all we do since that can - // mess up the layout. - // In all other cases, don't do - // anything, let the user manage toggling - // using Meta+F - if (!t->floating() - && (op == Options::MaximizeOp - || op == Options::HMaximizeOp - || op == Options::VMaximizeOp)) { - m_tilingLayouts[ c->desktop()]->toggleFloatTile(c); - } - - } -} - -Tile* Tiling::findAdjacentTile(Tile *ref, int d) -{ - QRect reference = ref->geometry(); - QPoint origin = reference.center(); - - Tile *closest = NULL; - int minDist = -1; - - QList tiles = m_tilingLayouts[ ref->client()->desktop()]->tiles(); - - foreach (Tile * t, tiles) { - if (t->client() == ref->client() || t->ignoreGeometry()) - continue; - - bool consider = false; - - QRect other = t->geometry(); - QPoint otherCenter = other.center(); - - switch(d) { - case Tile::Top: - consider = otherCenter.y() < origin.y() - && other.bottom() < reference.top(); - break; - - case Tile::Right: - consider = otherCenter.x() > origin.x() - && other.left() > reference.right(); - break; - - case Tile::Bottom: - consider = otherCenter.y() > origin.y() - && other.top() > reference.bottom(); - break; - - case Tile::Left: - consider = otherCenter.x() < origin.x() - && other.right() < reference.left(); - break; - - default: - abort(); - } - - if (consider) { - int dist = (otherCenter - origin).manhattanLength(); - if (minDist > dist || minDist < 0) { - minDist = dist; - closest = t; - } - } - } - return closest; -} - -void Tiling::focusTile(int d) -{ - Tile *t = getNiceTile(); - if (t) { - Tile *adj = findAdjacentTile(t, d); - if (adj) - m_workspace->activateClient(adj->client()); - } -} - -void Tiling::moveTile(int d) -{ - Tile *t = getNiceTile(); - if (t) { - Tile* adj = findAdjacentTile(t, d); - - m_tilingLayouts[ t->client()->desktop()]->swapTiles(t, adj); - } -} - -void Tiling::slotFocusTileLeft() -{ - focusTile(Tile::Left); -} - -void Tiling::slotFocusTileRight() -{ - focusTile(Tile::Right); -} - -void Tiling::slotFocusTileTop() -{ - focusTile(Tile::Top); -} - -void Tiling::slotFocusTileBottom() -{ - focusTile(Tile::Bottom); -} - -void Tiling::slotMoveTileLeft() -{ - moveTile(Tile::Left); -} - -void Tiling::slotMoveTileRight() -{ - moveTile(Tile::Right); -} - -void Tiling::slotMoveTileTop() -{ - moveTile(Tile::Top); -} - -void Tiling::slotMoveTileBottom() -{ - moveTile(Tile::Bottom); -} - -void Tiling::slotToggleFloating() -{ - Client *c = m_workspace->activeClient(); - if (!c) - return; - if (m_tilingLayouts.value(c->desktop())) { - m_tilingLayouts[ c->desktop()]->toggleFloatTile(c); - } -} - -void Tiling::slotNextTileLayout() -{ - if (m_tilingLayouts.value(m_workspace->currentDesktop())) { - - m_tilingLayouts.replace(m_workspace->currentDesktop(), TilingLayoutFactory::nextLayout(m_tilingLayouts[m_workspace->currentDesktop()])); - - m_tilingLayouts[m_workspace->currentDesktop()]->commit(); - } -} - -void Tiling::slotPreviousTileLayout() -{ - if (m_tilingLayouts.value(m_workspace->currentDesktop())) { - - m_tilingLayouts.replace(m_workspace->currentDesktop(), TilingLayoutFactory::previousLayout(m_tilingLayouts[m_workspace->currentDesktop()])); - - m_tilingLayouts[m_workspace->currentDesktop()]->commit(); - } -} - -KDecorationDefines::Position Tiling::supportedTilingResizeMode(Client *c, KDecorationDefines::Position currentMode) -{ - if (m_tilingLayouts.value(c->desktop())) { - return m_tilingLayouts[c->desktop()]->resizeMode(c, currentMode); - } - return currentMode; -} - -void Tiling::dumpTiles() const -{ - foreach (TilingLayout * t, m_tilingLayouts) { - if (!t) { - kDebug(1212) << "EMPTY DESKTOP"; - continue; - } - kDebug(1212) << "Desktop" << m_tilingLayouts.indexOf(t); - foreach (Tile * tile, t->tiles()) { - tile->dumpTile("--"); - } - } -} - -const QVector< TilingLayout* >& Tiling::tilingLayouts() const -{ - return m_tilingLayouts; -} - -void Tiling::slotResizeTilingLayouts() -{ - m_tilingLayouts.resize(m_workspace->numberOfDesktops() + 1); -} - -} diff --git a/tiling/tiling.h b/tiling/tiling.h deleted file mode 100644 index 01b5ff031e..0000000000 --- a/tiling/tiling.h +++ /dev/null @@ -1,112 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe -Copyright (C) 2011 Arthur Arlt - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#ifndef KWIN_TILING_H -#define KWIN_TILING_H - -#include - -#include "client.h" - -#include - -namespace KWin { - -class Tile; -class TilingLayout; - -class Tiling : public QObject { - Q_OBJECT -public: - Tiling(Workspace *w); - ~Tiling(); - bool isEnabled() const; - void setEnabled(bool tiling); - bool tileable(Client *c); - const QVector< TilingLayout* >& tilingLayouts() const; - void initShortcuts(KActionCollection* keys); - - // The notification functions are called from - // various points in existing code so that - // tiling can take any action if required. - // They are defined in tiling.cpp - void notifyTilingWindowResize(Client *c, const QRect &moveResizeGeom, const QRect &orig); - void notifyTilingWindowMove(Client *c, const QRect &moveResizeGeom, const QRect &orig); - void notifyTilingWindowResizeDone(Client *c, const QRect &moveResizeGeom, const QRect &orig, bool canceled); - void notifyTilingWindowMoveDone(Client *c, const QRect &moveResizeGeom, const QRect &orig, bool canceled); - void notifyTilingWindowDesktopChanged(Client *c, int old_desktop); - void notifyTilingWindowMaximized(Client *c, KDecorationDefines::WindowOperation op); - - KDecorationDefines::Position supportedTilingResizeMode(Client *c, KDecorationDefines::Position currentMode); - -public Q_SLOTS: - void createTile(KWin::Client *c); - void removeTile(KWin::Client *c); - // user actions, usually bound to shortcuts - // and also provided through the D-BUS interface. - void slotToggleTiling(); - void slotToggleFloating(); - void slotNextTileLayout(); - void slotPreviousTileLayout(); - - // Changes the focused client - void slotFocusTileLeft(); - void slotFocusTileRight(); - void slotFocusTileTop(); - void slotFocusTileBottom(); - // swaps active and adjacent client. - void slotMoveTileLeft(); - void slotMoveTileRight(); - void slotMoveTileTop(); - void slotMoveTileBottom(); - void belowCursor(); - - // NOTE: debug method - void dumpTiles() const; - - void notifyTilingWindowActivated(KWin::Client *c); -private: - // try to get a decent tile, either the one with - // focus or the one below the mouse. - Tile* getNiceTile() const; - // int, and not Tile::Direction because - // we are using a forward declaration for Tile - Tile* findAdjacentTile(Tile *ref, int d); - void focusTile(int d); - void moveTile(int d); - - Workspace* m_workspace; - bool m_enabled; - // Each tilingLayout is for one virtual desktop. - // The length is always one more than the number of - // virtual desktops so that we can quickly index them - // without having to remember to subtract one. - QVector m_tilingLayouts; -private Q_SLOTS: - void slotResizeTilingLayouts(); - void notifyTilingWindowMinimizeToggled(KWin::Client *c); - // updates geometry of tiles on all desktops, - // this rearranges the tiles. - void updateAllTiles(); -}; -} - -#endif // KWIN_TILING_H diff --git a/tiling/tilinglayout.cpp b/tiling/tilinglayout.cpp deleted file mode 100644 index c9d9bc696e..0000000000 --- a/tiling/tilinglayout.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#include "tiling/tilinglayout.h" - -#include - -#include "client.h" -#include "tiling/tile.h" -#include "workspace.h" -#include "tiling/tiling.h" - -namespace KWin -{ - -TilingLayout::TilingLayout(Workspace *w) - : QObject() - , m_workspace(w) -{ - connect(m_workspace, SIGNAL(configChanged()), this, SLOT(reconfigureTiling())); -} - -TilingLayout::~TilingLayout() -{ - qDeleteAll(m_tiles); - m_tiles.clear(); -} - -int TilingLayout::findTilePos(Client *c) const -{ - int i = 0; - foreach (Tile * t, m_tiles) { - if (t->client() == c) - return i; - i++; - } - return -1; -} - -Tile* TilingLayout::findTile(Client *c) const -{ - int i = findTilePos(c); - if (i != -1) - return m_tiles[ i ]; - return NULL; -} - -void TilingLayout::clientMinimizeToggled(Client *c) -{ - // just rearrange since that will check for state - Tile *t = findTile(c); - if (t) - arrange(layoutArea(t)); -} - -bool TilingLayout::clientResized(Client *c, const QRect &moveResizeGeom, const QRect &orig) -{ - if (moveResizeGeom == orig) - return true; - - Tile *t = findTile(c); - if (!t || t->ignoreGeometry()) { - c->setGeometry(moveResizeGeom); - return true; - } - - return false; -} - -// tries to swap the tile with the one in the new position right now -void TilingLayout::clientMoved(Client *c, const QRect &moveResizeGeom, const QRect &orig) -{ - if (moveResizeGeom == orig) - return; - - Tile *t = findTile(c); - if (!t) { - c->setGeometry(moveResizeGeom); - return; - } - if (t->floating()) { - t->setGeometry(moveResizeGeom); - t->commit(); - return; - } - - Tile *r = findTileBelowPoint(QCursor::pos()); - // TODO: if the client moved in from another desktop, don't swap, add - if (r && t) { - swapTiles(r, t); - } -} - -void TilingLayout::swapTiles(Tile *a, Tile *b) -{ - if (a && b) { - // t is the tile the user requested a move of - // r is the tile below it - int a_index = tiles().indexOf(a); - int b_index = tiles().indexOf(b); - - // use m_tiles since tiles() is const - // not sure how good an idea this is - m_tiles.replace(a_index, b); - m_tiles.replace(b_index, a); - arrange(layoutArea(a)); - } -} - -void TilingLayout::addTileNoArrange(Tile * t) -{ - if (findTile(t->client())) - return; - m_tiles.append(t); - postAddTile(t); -} - -void TilingLayout::addTile(Tile *t) -{ - addTileNoArrange(t); - arrange(layoutArea(t)); -} - -void TilingLayout::addTile(Client *c) -{ - Q_UNUSED(c) -} - -void TilingLayout::removeTileNoArrange(Tile * t) -{ - if (t == NULL) - return; - preRemoveTile(t); - m_tiles.removeOne(t); -} - -const QRect TilingLayout::layoutArea(Tile *t) const -{ - return m_workspace->clientArea(PlacementArea, t->client()); -} - -void TilingLayout::removeTile(Tile *t) -{ - if (t == NULL) - return; - removeTileNoArrange(t); - if (!m_tiles.empty()) - arrange(layoutArea(m_tiles.first())); -} - -void TilingLayout::removeTile(Client *c) -{ - removeTile(findTile(c)); -} - -void TilingLayout::toggleFloatTile(Client *c) -{ - Tile *t = findTile(c); - if (t && t->floating()) - t->unfloatTile(); - else if (t) - t->floatTile(); - - if (t) - arrange(layoutArea(t)); -} - -void TilingLayout::reconfigureTiling() -{ - //TODO also check 'untiled' windows to see if they are now requesting tiling - foreach (Tile * t, tiles()) { - if (t->client()->rules()->checkTilingOption(t->floating() ? 1 : 0) == 1) - t->floatTile(); - else - t->unfloatTile(); - } - - if (tiles().length() > 0) - arrange(layoutArea(tiles().first())); - - foreach (Toplevel * t, workspace()->stackingOrder()) { - if (Client *c = qobject_cast(t)) { - if (c->rules()->checkTilingOption(0) == 1) - workspace()->tiling()->createTile(c); - } - } - -} - -Tile* TilingLayout::findTileBelowPoint(const QPoint &p) const -{ - foreach (Tile * t, tiles()) { - if (t->floating()) - continue; - if (t->geometry().contains(p)) - return t; - } - - return NULL; -} - -void TilingLayout::commit() -{ - foreach (Tile * t, m_tiles) - t->commit(); -} - -/* - * Default is to allow no resizing - */ -KDecorationDefines::Position TilingLayout::resizeMode(Client *c, KDecorationDefines::Position currentMode) const -{ - Tile *t = findTile(c); - // if not tiled, allow resize - if (!t) - return currentMode; - - if (t && t->floating()) - return currentMode; - // We return PositionCenter since it makes - // no sense in resizing. - return KDecorationDefines::PositionCenter; -} - -} // end namespace - diff --git a/tiling/tilinglayout.h b/tiling/tilinglayout.h deleted file mode 100644 index 677db1aa00..0000000000 --- a/tiling/tilinglayout.h +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#ifndef KWIN_TILINGLAYOUT_H -#define KWIN_TILINGLAYOUT_H - -#include -#include - -#include - -namespace KWin -{ - -class Workspace; -class Client; -class Tile; - -class TilingLayout : public QObject -{ - Q_OBJECT -public: - TilingLayout(Workspace *w); - virtual ~TilingLayout(); - - /** - * Reimplement this to decide how the client(s) should - * be resized. - * Return true if an actual resize was attempted, false if not ( for whatever reason ) - */ - virtual bool clientResized(Client *c, const QRect &moveResizeGeom, const QRect &orig); - void clientMoved(Client *c, const QRect &moveResizeGeom, const QRect &orig); - void clientMinimizeToggled(Client *c); - - void commit(); - - void setLayoutType(int t); - int layoutType() const; - - void addTile(Tile *t); - void addTile(Client *c); - void removeTile(Tile *t); - void removeTile(Client *c); - void toggleFloatTile(Client *c); - void swapTiles(Tile *a, Tile *b); - - /** - * All tiling layouts do not allow the user to manually - * resize clients. This method will be called when the user - * attempts a resize. Return any valid position to allow - * resizing in that direction. currentMode will be the direction - * of resize attempted by the user. You do not have to return the same value. - * If you do not want to allow resizing at all, or you do not - * want to allow resizing for this client, then return KDecorationDefines::PositionCenter. - */ - virtual KDecorationDefines::Position resizeMode(Client *c, KDecorationDefines::Position currentMode) const; - - const QList& tiles() const; - Tile* findTile(Client *c) const; - -protected: - /** - * Get a pointer to the Workspace. - */ - Workspace * workspace() const; - /** - * Get a area in which the Tile can be placed. - */ - const QRect layoutArea(Tile *t) const; - /** - * Hooks called after a tile is added to - * layout and before it is removed. - */ - // currently only required by floating layout - virtual void postAddTile(Tile *t); - virtual void preRemoveTile(Tile *t); - -protected Q_SLOTS: - void reconfigureTiling(); - -private: - int findTilePos(Client *c) const; - virtual void arrange(QRect wgeom) = 0; - - void addTileNoArrange(Tile *t); - void removeTileNoArrange(Tile *t); - - Tile* findTileBelowPoint(const QPoint &p) const; - - - QList m_tiles; - int m_layoutType; - Workspace *m_workspace; - - - friend class TilingLayoutFactory; -}; - -inline void TilingLayout::setLayoutType(int t) -{ - m_layoutType = t; -} - -inline int TilingLayout::layoutType() const -{ - return m_layoutType; -} - -inline const QList& TilingLayout::tiles() const -{ - return m_tiles; -} - -inline Workspace* TilingLayout::workspace() const -{ - return m_workspace; -} - -inline void TilingLayout::postAddTile(Tile *t) -{ - Q_UNUSED(t) -} - -inline void TilingLayout::preRemoveTile(Tile *t) -{ - Q_UNUSED(t) -} - -} // end namespace - -#endif diff --git a/tilinglayoutfactory.cpp b/tilinglayoutfactory.cpp deleted file mode 100644 index 56a53c80fe..0000000000 --- a/tilinglayoutfactory.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#include "tilinglayoutfactory.h" - -#include -#include -#include -#include - -#include "notifications.h" -#include "tiling/tile.h" -#include "client.h" - -#include "tilinglayouts/spiral/spiral.h" -#include "tilinglayouts/columns/columns.h" -#include "tilinglayouts/floating/floating.h" - -// w is the workspace pointer -#define ADD_LAYOUT( lay, ctxt_name ) \ - case lay##Layout:\ - kDebug(1212) << #lay;\ - layout = new lay( w );\ - layout->setLayoutType( lay##Layout );\ - Notify::raise( Notify::TilingLayoutChanged, \ - i18n( "Layout changed to %1", i18nc( ctxt_name ) ) ); \ - break - -namespace KWin -{ - -TilingLayout* TilingLayoutFactory::createLayout(int type, Workspace *w) -{ - Q_ASSERT(type != FirstLayout && type != LastLayout); - TilingLayout *layout; - - /* For new layouts, make a case entry here */ - switch(type) { - case DefaultLayout: // NOTE: fall through makes first layout default - layout = createLayout(indexToLayoutIndex(options->tilingLayout()), w); - break; - - ADD_LAYOUT(Spiral, I18N_NOOP2_NOSTRIP("Spiral tiling layout", "Spiral")); - ADD_LAYOUT(Columns, I18N_NOOP2_NOSTRIP("Two-column horizontal tiling layout", "Columns")); - ADD_LAYOUT(Floating, I18N_NOOP2_NOSTRIP("Floating layout, windows aren't tiled at all", "Floating")); - - default: - kDebug(1212) << "INVALID LAYOUT!"; - return NULL; - } - return layout; -} - -// if next, goes next, otherwise previous -TilingLayout* TilingLayoutFactory::cycleLayout(TilingLayout *curr, bool next) -{ - int type = curr->layoutType(); - - if (next) { - type++; - - if (type >= LastLayout) - type = FirstLayout + 1; - } else { - type--; - - if (type <= FirstLayout) - type = LastLayout - 1; - } - - QList tiles = curr->tiles(); - - TilingLayout *l = createLayout(type, curr->workspace()); - - foreach (Tile * t, tiles) { - curr->removeTileNoArrange(t); - } - - if (tiles.length() == 0) - return l; - - // so that we don't rearrange after every call - Tile *last = tiles.takeLast(); - foreach (Tile * t, tiles) { - l->addTileNoArrange(t); - } - l->addTile(last); - - return l; -} - -/** - * Returns the appropriate layout enum item - * Meant to be used with a combo box. - * This function handles the issues of DefaultL and First and Last layouts - */ -int TilingLayoutFactory::indexToLayoutIndex(int index) -{ - int layout = DefaultLayout + index + 1; - if (layout >= LastLayout) - layout = DefaultLayout + 1; - if (layout <= FirstLayout) - layout = LastLayout - 1; - return layout; -} -} // end namespace diff --git a/tilinglayoutfactory.h b/tilinglayoutfactory.h deleted file mode 100644 index ad418e4016..0000000000 --- a/tilinglayoutfactory.h +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#ifndef KWIN_TILINGLAYOUTFACTORY_H -#define KWIN_TILINGLAYOUTFACTORY_H - -namespace KWin -{ - -class Workspace; -class TilingLayout; -class Tile; - -/** - * The tiling layout factory is used to create tiling layouts. - * To add a new layout, include the appropriate header in tilinglayoutfactory.cpp - * and use the ADD_LAYOUT macro to create a case entry. - * Also insert your layout in the Layouts enumeration. Do NOT - * change the position of FirstLayout and LastLayout - */ -class TilingLayoutFactory -{ -public: - /** When adding your own layout, edit this - * Remember to suffix an L for now - */ - enum Layouts { - FirstLayout, // special, do not modify/move - DefaultLayout, - - /* Actual layouts */ - SpiralLayout, - ColumnsLayout, - FloatingLayout, - /* Put your layout above this line ^^^ */ - - LastLayout // special, do not modify/move - }; - - static TilingLayout* createLayout(int type, Workspace *); - static TilingLayout* nextLayout(TilingLayout *curr); - static TilingLayout* previousLayout(TilingLayout *curr); - - static int indexToLayoutIndex(int index); - -private: - static TilingLayout* cycleLayout(TilingLayout *curr, bool next); - -}; - -inline TilingLayout* TilingLayoutFactory::nextLayout(TilingLayout *curr) -{ - return cycleLayout(curr, true); -} - -inline TilingLayout* TilingLayoutFactory::previousLayout(TilingLayout *curr) -{ - return cycleLayout(curr, false); -} -} // end namespace - -#endif diff --git a/tilinglayouts/columns/columns.cpp b/tilinglayouts/columns/columns.cpp deleted file mode 100644 index d0e1e1b5ec..0000000000 --- a/tilinglayouts/columns/columns.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#include "columns.h" - -#include "client.h" -#include "tiling/tile.h" - -#include - -namespace KWin -{ - -// TODO: caching of actually tiled windows -// Columns is doing a lot of looping -// checking which tiles are actually *tiled* -// ( ie. not floating or minimized ) -// This can probably be moved to TilingLayout -// and cached. But remember to preserve order! - -Columns::Columns(Workspace *w) - : TilingLayout(w) - , m_leftWidth(0) -{ -} - -KDecorationDefines::Position Columns::resizeMode(Client *c, KDecorationDefines::Position currentMode) const -{ - Tile *t = findTile(c); - - if (!t) - return currentMode; - - if (t && t->floating()) - return currentMode; - - QList tiled(tiles()); - - QMutableListIterator i(tiled); - while (i.hasNext()) { - Tile *tile = i.next(); - if (tile->ignoreGeometry()) - i.remove(); - } - - if (tiled.first() == t - && (currentMode == KDecorationDefines::PositionRight - || currentMode == KDecorationDefines::PositionTopRight - || currentMode == KDecorationDefines::PositionBottomRight)) { - return KDecorationDefines::PositionRight; - } - - // in right column so only left resize allowed - if (tiled.contains(t) - && (tiled.first() != t) - && (currentMode == KDecorationDefines::PositionLeft - || currentMode == KDecorationDefines::PositionTopLeft - || currentMode == KDecorationDefines::PositionBottomLeft)) { - return KDecorationDefines::PositionLeft; - } - - return KDecorationDefines::PositionCenter; -} - -bool Columns::clientResized(Client *c, const QRect &moveResizeGeom, const QRect &orig) -{ - if (TilingLayout::clientResized(c, moveResizeGeom, orig)) - return true; - - Tile *t = findTile(c); - - QList tiled(tiles()); - - QMutableListIterator i(tiled); - while (i.hasNext()) { - Tile *tile = i.next(); - if (tile->ignoreGeometry()) - i.remove(); - } - - if (tiled.first() == t) { - m_leftWidth = moveResizeGeom.width(); - } else { - m_leftWidth = layoutArea(t).width() - moveResizeGeom.width(); - } - - arrange(layoutArea(t)); - return true; -} - -void Columns::arrange(QRect wgeom) -{ - QList tiled(tiles()); - - QMutableListIterator i(tiled); - while (i.hasNext()) { - Tile *t = i.next(); - if (t->ignoreGeometry()) - i.remove(); - } - - int n = tiled.length(); - if (n < 1) - return; - if (n == 1) { - tiled.first()->setGeometry(wgeom); - tiled.first()->commit(); - return; - } - - // save the original before we mangle it - int totalWidth = wgeom.width(); - if (m_leftWidth == 0) - m_leftWidth = wgeom.width() / 2; - - if (n > 1) - wgeom.setWidth(m_leftWidth); - tiled.first()->setGeometry(wgeom); - tiled.first()->commit(); - - wgeom.moveLeft(wgeom.x() + m_leftWidth); - wgeom.setWidth(totalWidth - m_leftWidth); - int ht = wgeom.height() / (n - 1); - wgeom.setHeight(ht); - - int mult = 0; - int originalTop = wgeom.y(); - for (QList::const_iterator it = ++tiled.constBegin() ; it != tiled.constEnd() ; ++it) { - if ((*it)->floating()) - continue; - (*it)->setGeometry(wgeom); - (*it)->commit(); - mult++; - wgeom.moveTop(originalTop + mult * ht); - } -} -} diff --git a/tilinglayouts/columns/columns.h b/tilinglayouts/columns/columns.h deleted file mode 100644 index b8bb1f5469..0000000000 --- a/tilinglayouts/columns/columns.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#ifndef COLUMNS_H -#define COLUMNS_H - -#include - -#include "tiling/tilinglayout.h" - -namespace KWin -{ -class Workspace; -class Tile; -class Client; - -// simulates a 2 column right layout for now, make it arbitrary -// in columns and direction -class Columns : public TilingLayout -{ -public: - Columns(Workspace *); - KDecorationDefines::Position resizeMode(Client *c, KDecorationDefines::Position currentMode) const; - bool clientResized(Client *c, const QRect &moveResizeGeom, const QRect &orig); - -private: - void arrange(QRect wgeom); - int m_leftWidth; // width of left column -}; -} // end namespace - -#endif diff --git a/tilinglayouts/floating/floating.cpp b/tilinglayouts/floating/floating.cpp deleted file mode 100644 index e6623b649c..0000000000 --- a/tilinglayouts/floating/floating.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#include "floating.h" - -#include "tiling/tile.h" -#include "client.h" - -namespace KWin -{ - -Floating::Floating(Workspace *w) - : TilingLayout(w) -{ -} - -void Floating::postAddTile(Tile *t) -{ - if (t->floating()) - was_floating.insert(t); -} - -void Floating::arrange(QRect wgeom) -{ - foreach (Tile * t, tiles()) { - if (!t->floating()) - t->floatTile(); - workspace()->place(t->client(), wgeom); - t->setGeometry(t->client()->geometry()); - } -} - -void Floating::preRemoveTile(Tile *t) -{ - if (! was_floating.contains(t)) - t->unfloatTile(); -} - -Floating::~Floating() -{ -} - -} diff --git a/tilinglayouts/floating/floating.h b/tilinglayouts/floating/floating.h deleted file mode 100644 index 1c007cbfab..0000000000 --- a/tilinglayouts/floating/floating.h +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#ifndef FLOATING_H -#define FLOATING_H - -#include -#include - -#include "tiling/tilinglayout.h" -#include "tiling/tile.h" - -namespace KWin -{ -class Workspace; -class Floating : public TilingLayout -{ -public: - Floating(Workspace *); - ~Floating(); - -private: - void arrange(QRect wgeom); - void postAddTile(Tile *t); - void preRemoveTile(Tile *t); - - Tile::Direction m_dir; - Tile *m_split; - - /* - * Tiles are added to was_floating if they - * were floating before being added to this layout - * - * When the layout is changed, was_floating is - * referred to, to restore the final state of the - * Tile - */ - QSet was_floating; -}; -} // end namespace - -#endif diff --git a/tilinglayouts/spiral/spiral.cpp b/tilinglayouts/spiral/spiral.cpp deleted file mode 100644 index b70be995e6..0000000000 --- a/tilinglayouts/spiral/spiral.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#include "spiral.h" - -#include "client.h" -#include "tiling/tile.h" - -namespace KWin -{ - -Spiral::Spiral(Workspace *w) - : TilingLayout(w) -{ -} - -Spiral::~Spiral() -{ -} - -void Spiral::arrange(QRect wgeom) -{ - QList tiled(tiles()); - - QMutableListIterator it(tiled); - while (it.hasNext()) { - Tile *t = it.next(); - if (t->ignoreGeometry()) - it.remove(); - } - - int n = tiled.length(); - int i = 1; - - foreach (Tile * t, tiled) { - if (t->floating()) - continue; - - if (i < n) { - if (i % 2 == 0) - wgeom.setHeight(wgeom.height() / 2); - else - wgeom.setWidth(wgeom.width() / 2); - } - - if (i % 4 == 0) - wgeom.moveLeft(wgeom.x() - wgeom.width()); - else if (i % 2 == 0 || (i % 4 == 3 && i < n)) - wgeom.moveLeft(wgeom.x() + wgeom.width()); - - if (i % 4 == 1 && i != 1) - wgeom.moveTop(wgeom.y() - wgeom.height()); - else if ((i % 2 == 1 && i != 1) - || (i % 4 == 0 && i < n)) - wgeom.moveTop(wgeom.y() + wgeom.height()); - - t->setGeometry(wgeom); - t->commit(); - i++; - } -} -} diff --git a/tilinglayouts/spiral/spiral.h b/tilinglayouts/spiral/spiral.h deleted file mode 100644 index 4621fb06fa..0000000000 --- a/tilinglayouts/spiral/spiral.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Nikhil Marathe - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#ifndef SPIRAL_H -#define SPIRAL_H - -#include - -#include "tiling/tilinglayout.h" - -namespace KWin -{ -class Workspace; -class Tile; -class Client; - -class Spiral : public TilingLayout -{ -public: - Spiral(Workspace *); - ~Spiral(); - - void addTile(Tile *t); - void removeTile(Tile *t); - -private: - void arrange(QRect wgeom); - -}; -} // end namespace - -#endif diff --git a/useractions.cpp b/useractions.cpp index 2aec51e4ce..7c0fd1e660 100755 --- a/useractions.cpp +++ b/useractions.cpp @@ -34,11 +34,6 @@ along with this program. If not, see . #include "client.h" #include "workspace.h" #include "effects.h" -#ifdef KWIN_BUILD_TILING -#include "tiling/tile.h" -#include "tiling/tilinglayout.h" -#include "tiling/tiling.h" -#endif #ifdef KWIN_BUILD_ACTIVITIES #include @@ -197,21 +192,6 @@ QMenu* Workspace::clientPopup() popup->addSeparator(); } - // create it anyway - mTilingStateOpAction = popup->addAction(i18nc("When in tiling mode, toggle's the window's floating/tiled state", "&Float Window")); - // then hide it - mTilingStateOpAction->setVisible(false); -#ifdef KWIN_BUILD_TILING - // actions for window tiling - if (m_tiling->isEnabled()) { - kaction = qobject_cast(keys->action("Toggle Floating")); - mTilingStateOpAction->setCheckable(true); - mTilingStateOpAction->setData(Options::ToggleClientTiledStateOp); - if (kaction != 0) - mTilingStateOpAction->setShortcut(kaction->globalShortcut().primary()); - } -#endif - popup->addSeparator(); action = popup->addMenu(advanced_popup); @@ -290,18 +270,6 @@ void Workspace::clientPopupAboutToShow() mMinimizeOpAction->setEnabled(active_popup_client->isMinimizable()); mCloseOpAction->setEnabled(active_popup_client->isCloseable()); -#ifdef KWIN_BUILD_TILING - if (m_tiling->isEnabled()) { - int desktop = active_popup_client->desktop(); - if (m_tiling->tilingLayouts().value(desktop)) { - Tile *t = m_tiling->tilingLayouts()[desktop]->findTile(active_popup_client); - if (t) - mTilingStateOpAction->setChecked(t->floating()); - } - } - mTilingStateOpAction->setVisible(m_tiling->isEnabled()); -#endif - if (decorationSupportsTabbing()) { initTabbingPopups(); } else { @@ -570,11 +538,6 @@ void Workspace::initShortcuts() if (tab_box) { tab_box->initShortcuts(actionCollection); } -#endif -#ifdef KWIN_BUILD_TILING - if (m_tiling) { - m_tiling->initShortcuts(actionCollection); - } #endif discardPopup(); // so that it's recreated next time } @@ -673,16 +636,6 @@ void Workspace::performWindowOperation(Client* c, Options::WindowOperation op) { if (!c) return; -#ifdef KWIN_BUILD_TILING - // Allows us to float a window when it is maximized, if it is tiled. - if (m_tiling->isEnabled() - && (op == Options::MaximizeOp - || op == Options::HMaximizeOp - || op == Options::VMaximizeOp - || op == Options::RestoreOp)) { - m_tiling->notifyTilingWindowMaximized(c, op); - } -#endif if (op == Options::MoveOp || op == Options::UnrestrictedMoveOp) QCursor::setPos(c->geometry().center()); if (op == Options::ResizeOp || op == Options::UnrestrictedResizeOp) @@ -781,14 +734,6 @@ void Workspace::performWindowOperation(Client* c, Options::WindowOperation op) case Options::CloseTabGroupOp: c->tabGroup()->closeAll(); break; - case Options::ToggleClientTiledStateOp: { -#ifdef KWIN_BUILD_TILING - int desktop = c->desktop(); - if (m_tiling->tilingLayouts().value(desktop)) { - m_tiling->tilingLayouts()[desktop]->toggleFloatTile(c); - } -#endif - } } } diff --git a/workspace.cpp b/workspace.cpp index d973a89a1e..ecf0d76cfc 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -64,11 +64,6 @@ along with this program. If not, see . #ifdef KWIN_BUILD_SCRIPTING #include "scripting/scripting.h" #endif -#ifdef KWIN_BUILD_TILING -#include "tiling/tile.h" -#include "tiling/tilinglayout.h" -#include "tiling/tiling.h" -#endif #include #include @@ -203,10 +198,6 @@ Workspace::Workspace(bool restore) delayFocusTimer = 0; -#ifdef KWIN_BUILD_TILING - m_tiling = new Tiling(this); -#endif - if (restore) loadSessionInfo(); @@ -488,11 +479,6 @@ void Workspace::init() if (new_active_client != NULL) activateClient(new_active_client); -#ifdef KWIN_BUILD_TILING - // Enable/disable tiling - m_tiling->setEnabled(options->isTilingOn()); -#endif - #ifdef KWIN_BUILD_SCRIPTING m_scripting = new Scripting(this); @@ -513,9 +499,6 @@ Workspace::~Workspace() { finishCompositing(); blockStackingUpdates(true); -#ifdef KWIN_BUILD_TILING - delete m_tiling; -#endif // TODO: grabXServer(); @@ -572,9 +555,6 @@ Client* Workspace::createClient(Window w, bool is_mapped) return NULL; } addClient(c, Allowed); -#ifdef KWIN_BUILD_TILING - m_tiling->createTile(c); -#endif return c; } @@ -1045,11 +1025,6 @@ void Workspace::slotReconfigure() } } -#ifdef KWIN_BUILD_TILING - m_tiling->setEnabled(options->isTilingOn()); - // just so that we reset windows in the right manner, 'activate' the current active window - m_tiling->notifyTilingWindowActivated(activeClient()); -#endif if (hasDecorationPlugin()) { rootInfo->setSupported(NET::WM2FrameOverlap, mgr->factory()->supports(AbilityExtendIntoClientArea)); } else { @@ -1327,19 +1302,8 @@ bool Workspace::setCurrentDesktop(int new_desktop) // Now propagate the change, after hiding, before showing rootInfo->setCurrentDesktop(currentDesktop()); - // if the client is moved to another desktop, that desktop may - // not have an existing layout. In addition this tiling layout - // will require rearrangement, so notify about desktop changes. if (movingClient && !movingClient->isOnDesktop(new_desktop)) { - int old_desktop = movingClient->desktop(); movingClient->setDesktop(new_desktop); -#ifdef KWIN_BUILD_TILING - if (m_tiling->isEnabled()) { - m_tiling->notifyTilingWindowDesktopChanged(movingClient, old_desktop); - } -#else - Q_UNUSED(old_desktop) -#endif } for (int i = stacking_order.size() - 1; i >= 0 ; --i) { @@ -1557,13 +1521,7 @@ void Workspace::updateCurrentActivity(const QString &new_activity) /* TODO someday enable dragging windows to other activities if ( movingClient && !movingClient->isOnDesktop( new_desktop )) { - int old_desktop = movingClient->desktop(); movingClient->setDesktop( new_desktop ); - if ( tilingEnabled() ) - { - notifyWindowDesktopChanged( movingClient, old_desktop ); - } - } */ for (int i = stacking_order.size() - 1; i >= 0 ; --i) { @@ -1780,9 +1738,6 @@ void Workspace::sendClientToDesktop(Client* c, int desk, bool dont_activate) } else raiseClient(c); -#ifdef KWIN_BUILD_TILING - m_tiling->notifyTilingWindowDesktopChanged(c, old_desktop); -#endif c->checkWorkspacePosition( QRect(), old_desktop ); ClientList transients_stacking_order = ensureStackingOrder(c->transients()); @@ -1821,7 +1776,6 @@ void Workspace::toggleClientOnActivity(Client* c, const QString &activity, bool raiseClient(c); //notifyWindowDesktopChanged( c, old_desktop ); - //FIXME does tiling break? ClientList transients_stacking_order = ensureStackingOrder(c->transients()); for (ClientList::ConstIterator it = transients_stacking_order.constBegin(); @@ -2262,57 +2216,6 @@ TabBox::TabBox* Workspace::tabBox() const } #endif -#ifdef KWIN_BUILD_TILING -Tiling* Workspace::tiling() -{ - return m_tiling; -} -#endif - -/* - * Called from D-BUS - */ -void Workspace::toggleTiling() -{ -#ifdef KWIN_BUILD_TILING - if (m_tiling) { - m_tiling->slotToggleTiling(); - } -#endif -} - -/* - * Called from D-BUS - */ -void Workspace::nextTileLayout() -{ -#ifdef KWIN_BUILD_TILING - if (m_tiling) { - m_tiling->slotNextTileLayout(); - } -#endif -} - -/* - * Called from D-BUS - */ -void Workspace::previousTileLayout() -{ -#ifdef KWIN_BUILD_TILING - if (m_tiling) { - m_tiling->slotPreviousTileLayout(); - } -#endif -} - -void Workspace::dumpTiles() const { -#ifdef KWIN_BUILD_TILING - if (m_tiling) { - m_tiling->dumpTiles(); - } -#endif -} - QString Workspace::supportInformation() const { QString support; diff --git a/workspace.h b/workspace.h index 2f7fe19429..5f281b88f8 100644 --- a/workspace.h +++ b/workspace.h @@ -72,11 +72,6 @@ class TabBox; #endif class Client; -#ifdef KWIN_BUILD_TILING -class Tile; -class Tiling; -class TilingLayout; -#endif class Outline; class RootInfo; class PluginMgr; @@ -197,10 +192,6 @@ public: return unmanaged; } -#ifdef KWIN_BUILD_TILING - Tiling* tiling(); -#endif - Outline* outline(); #ifdef KWIN_BUILD_SCREENEDGES ScreenEdge* screenEdge(); @@ -312,9 +303,6 @@ private: KActivities::Controller activityController_; #endif -#ifdef KWIN_BUILD_TILING - Tiling* m_tiling; -#endif Outline* m_outline; #ifdef KWIN_BUILD_SCREENEDGES ScreenEdge m_screenEdge; @@ -445,9 +433,6 @@ public: void circulateDesktopApplications(); bool compositingActive(); bool waitForCompositingSetup(); - void toggleTiling(); - void nextTileLayout(); - void previousTileLayout(); bool stopActivity(const QString &id); bool startActivity(const QString &id); QStringList activeEffects() const; @@ -637,9 +622,6 @@ public slots: void suspendCompositing(); void suspendCompositing(bool suspend); - // NOTE: debug method - void dumpTiles() const; - void slotActivateNextTab(); // Slot to move left the active Client. void slotActivatePrevTab(); // Slot to move right the active Client. void slotUntab(); // Slot to remove the active client from its group. @@ -873,7 +855,6 @@ private: QAction* mMoveOpAction; QAction* mMaximizeOpAction; QAction* mShadeOpAction; - QAction* mTilingStateOpAction; QAction* mKeepAboveOpAction; QAction* mKeepBelowOpAction; QAction* mFullScreenOpAction;