From 12d3b354fccc41002b81ffd811f4ad4eee9f1837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 21 May 2011 21:15:06 +0200 Subject: [PATCH] Remove drawbound move/resize functionality Drawbound was nowadays only used when compositing is disabled. For the composited case, the drawbound was replaced by the resize effect and in fact we should always just use the resize effect. REVIEW: 101411 --- activation.cpp | 26 -------- client.cpp | 1 - client.h | 6 -- geometry.cpp | 106 ++---------------------------- kcmkwin/kwinoptions/windows.cpp | 65 ------------------ kcmkwin/kwinoptions/windows.h | 12 ---- kcmkwin/kwinrules/ruleswidget.cpp | 15 ----- kcmkwin/kwinrules/ruleswidget.h | 1 - libkdecorations/kdecoration.h | 23 +------ options.cpp | 12 ---- options.h | 11 ---- rules.cpp | 8 --- rules.h | 4 -- useractions.cpp | 2 - workspace.h | 2 - 15 files changed, 8 insertions(+), 286 deletions(-) diff --git a/activation.cpp b/activation.cpp index b43f6ab14c..0a0185d703 100644 --- a/activation.cpp +++ b/activation.cpp @@ -626,32 +626,6 @@ void Workspace::clientAttentionChanged(Client* c, bool set) attention_chain.removeAll(c); } -// This is used when a client should be shown active immediately after requestFocus(), -// without waiting for the matching FocusIn that will really make the window the active one. -// Used only in special cases, e.g. for MouseActivateRaiseandMove with transparent windows, -bool Workspace::fakeRequestedActivity(Client* c) -{ - if (should_get_focus.count() > 0 && should_get_focus.last() == c) { - if (c->isActive()) - return false; - c->setActive(true); - return true; - } - return false; -} - -void Workspace::unfakeActivity(Client* c) -{ - if (should_get_focus.count() > 0 && should_get_focus.last() == c) { - // TODO this will cause flicker, and probably is not needed - if (last_active_client != NULL) - last_active_client->setActive(true); - else - c->setActive(false); - } -} - - //******************************************** // Client //******************************************** diff --git a/client.cpp b/client.cpp index b4cc949549..73f662ceb9 100644 --- a/client.cpp +++ b/client.cpp @@ -91,7 +91,6 @@ Client::Client(Workspace* ws) , wrapper(None) , decoration(NULL) , bridge(new Bridge(this)) - , move_faked_activity(false) , move_resize_grab_window(None) , move_resize_has_keyboard_grab(false) , transient_for (NULL) diff --git a/client.h b/client.h index 3b42c2963e..7838fcbd83 100644 --- a/client.h +++ b/client.h @@ -439,11 +439,6 @@ private: Position mousePosition(const QPoint&) const; void updateCursor(); - // Transparent stuff - void drawbound(const QRect& geom); - void clearbound(); - void doDrawbound(const QRect& geom, bool clear); - // Handlers for X11 events bool mapRequestEvent(XMapRequestEvent* e); void unmapNotifyEvent(XUnmapEvent* e); @@ -581,7 +576,6 @@ private: QStringList activityList; bool buttonDown; bool moveResizeMode; - bool move_faked_activity; Window move_resize_grab_window; bool move_resize_has_keyboard_grab; bool unrestrictedMoveResize; diff --git a/geometry.cpp b/geometry.cpp index 2bc059c96f..86747453f2 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2505,53 +2505,8 @@ void Client::updateFullScreenHack(const QRect& geom) workspace()->updateClientLayer(this); // active fullscreens get different layer } -static QRect* visible_bound = 0; static GeometryTip* geometryTip = 0; -void Client::drawbound(const QRect& geom) -{ - assert(visible_bound == NULL); - visible_bound = new QRect(geom); - doDrawbound(*visible_bound, false); -} - -void Client::clearbound() -{ - if (visible_bound == NULL) - return; - doDrawbound(*visible_bound, true); - delete visible_bound; - visible_bound = 0; -} - -void Client::doDrawbound(const QRect& geom, bool clear) -{ - if (effects && static_cast(effects)->provides(Effect::Resize)) - return; // done by effect - if (decoration != NULL && decoration->drawbound(geom, clear)) - return; // done by decoration - XGCValues xgc; - xgc.function = GXxor; - xgc.foreground = WhitePixel(display(), DefaultScreen(display())); - xgc.line_width = 5; - xgc.subwindow_mode = IncludeInferiors; - GC gc = XCreateGC(display(), DefaultRootWindow(display()), - GCFunction | GCForeground | GCLineWidth | GCSubwindowMode, &xgc); - // the line is 5 pixel thick, so compensate for the extra two pixels - // on outside (#88657) - QRect g = geom; - if (g.width() > 5) { - g.setLeft(g.left() + 2); - g.setRight(g.right() - 2); - } - if (g.height() > 5) { - g.setTop(g.top() + 2); - g.setBottom(g.bottom() - 2); - } - XDrawRectangle(display(), DefaultRootWindow(display()), gc, g.x(), g.y(), g.width(), g.height()); - XFreeGC(display(), gc); -} - void Client::positionGeometryTip() { assert(isMove() || isResize()); @@ -2560,10 +2515,7 @@ void Client::positionGeometryTip() return; // some effect paints this for us if (options->showGeometryTip()) { if (!geometryTip) { - // save under is not necessary with opaque, and seem to make things slower - bool save_under = (isMove() && rules()->checkMoveResizeMode(options->moveMode) != Options::Opaque) - || (isResize() && rules()->checkMoveResizeMode(options->resizeMode) != Options::Opaque); - geometryTip = new GeometryTip(&xSizeHint, save_under); + geometryTip = new GeometryTip(&xSizeHint, false); } QRect wgeom(moveResizeGeom); // position of the frame, size of the window itself wgeom.setWidth(wgeom.width() - (width() - clientSize().width())); @@ -2577,17 +2529,6 @@ void Client::positionGeometryTip() } } -class EatAllPaintEvents - : public QObject -{ -protected: - virtual bool eventFilter(QObject* o, QEvent* e) { - return e->type() == QEvent::Paint && o != geometryTip; - } -}; - -static EatAllPaintEvents* eater = 0; - bool Client::startMoveResize() { assert(!moveResizeMode); @@ -2643,18 +2584,6 @@ bool Client::startMoveResize() workspace()->setClientIsMoving(this); initialMoveResizeGeom = moveResizeGeom = geometry(); checkUnrestrictedMoveResize(); - if ((isMove() && rules()->checkMoveResizeMode(options->moveMode) != Options::Opaque) - || (isResize() && rules()->checkMoveResizeMode(options->resizeMode) != Options::Opaque)) { - grabXServer(); - kapp->sendPostedEvents(); - // we have server grab -> nothing should cause paint events - // unfortunately, that's not completely true, Qt may generate - // paint events on some widgets due to FocusIn(?) - // eat them, otherwise XOR painting will be broken (#58054) - // paint events for the geometrytip need to be allowed, though - eater = new EatAllPaintEvents; -// not needed anymore? kapp->installEventFilter( eater ); - } Notify::raise(isResize() ? Notify::ResizeStart : Notify::MoveStart); emit clientStartUserMovedResized(this); if (options->electricBorders() == Options::ElectricMoveOnly || @@ -2737,15 +2666,11 @@ void Client::finishMoveResize(bool cancel) void Client::leaveMoveResize() { - clearbound(); if (geometryTip) { geometryTip->hide(); delete geometryTip; geometryTip = NULL; } - if ((isMove() && rules()->checkMoveResizeMode(options->moveMode) != Options::Opaque) - || (isResize() && rules()->checkMoveResizeMode(options->resizeMode) != Options::Opaque)) - ungrabXServer(); if (move_resize_has_keyboard_grab) ungrabXKeyboard(); move_resize_has_keyboard_grab = false; @@ -2753,12 +2678,7 @@ void Client::leaveMoveResize() XDestroyWindow(display(), move_resize_grab_window); move_resize_grab_window = None; workspace()->setClientIsMoving(0); - if (move_faked_activity) - workspace()->unfakeActivity(this); - move_faked_activity = false; moveResizeMode = false; - delete eater; - eater = 0; delete sync_timeout; sync_timeout = NULL; if (options->electricBorders() == Options::ElectricMoveOnly || @@ -3093,16 +3013,8 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root) void Client::performMoveResize() { - bool haveResizeEffect = false; - bool transparent = false; - if (isResize()) { - haveResizeEffect = effects && static_cast(effects)->provides(Effect::Resize); - transparent = haveResizeEffect || rules()->checkMoveResizeMode(options->resizeMode) != Options::Opaque; - } else if (isMove()) - transparent = rules()->checkMoveResizeMode(options->moveMode) != Options::Opaque; - #ifdef HAVE_XSYNC - if (isResize() && !transparent && sync_counter != None && !sync_resize_pending) { + if (isResize() && sync_counter != None && !sync_resize_pending) { sync_timeout = new QTimer(this); connect(sync_timeout, SIGNAL(timeout()), SLOT(syncTimeout())); sync_timeout->setSingleShot(true); @@ -3110,17 +3022,9 @@ void Client::performMoveResize() sendSyncRequest(); } #endif - if (transparent) { - if (!haveResizeEffect) - clearbound(); // it's necessary to move the geometry tip when there's no outline - positionGeometryTip(); // shown, otherwise it would cause repaint problems in case - if (!haveResizeEffect) - drawbound(moveResizeGeom); // they overlap; the paint event will come after this, - } else { - if (!workspace()->tilingEnabled()) - setGeometry(moveResizeGeom); - positionGeometryTip(); - } + if (!workspace()->tilingEnabled()) + setGeometry(moveResizeGeom); + positionGeometryTip(); emit clientStepUserMovedResized(this, moveResizeGeom); } diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp index 10b7579cd3..ad20a8acdc 100644 --- a/kcmkwin/kwinoptions/windows.cpp +++ b/kcmkwin/kwinoptions/windows.cpp @@ -48,8 +48,6 @@ // kwin config keywords #define KWIN_FOCUS "FocusPolicy" #define KWIN_PLACEMENT "Placement" -#define KWIN_MOVE "MoveMode" -#define KWIN_RESIZE_OPAQUE "ResizeMode" #define KWIN_GEOMETRY "GeometryTip" #define KWIN_AUTORAISE_INTERVAL "AutoRaiseInterval" #define KWIN_AUTORAISE "AutoRaise" @@ -935,18 +933,6 @@ KMovingConfig::KMovingConfig(bool _standAlone, KConfig *_config, const KComponen QBoxLayout *bLay = new QVBoxLayout; wLay->addLayout(bLay); - opaque = new QCheckBox(i18n("Di&splay content in moving windows"), windowsBox); - bLay->addWidget(opaque); - opaque->setWhatsThis(i18n("Enable this option if you want a window's content to be fully shown" - " while moving it, instead of just showing a window 'skeleton'. The result may not be satisfying" - " on slow machines without graphic acceleration.")); - - resizeOpaqueOn = new QCheckBox(i18n("Display content in &resizing windows"), windowsBox); - bLay->addWidget(resizeOpaqueOn); - resizeOpaqueOn->setWhatsThis(i18n("Enable this option if you want a window's content to be shown" - " while resizing it, instead of just showing a window 'skeleton'. The result may not be satisfying" - " on slow machines.")); - geometryTipOn = new QCheckBox(i18n("Display window &geometry when moving or resizing"), windowsBox); bLay->addWidget(geometryTipOn); geometryTipOn->setWhatsThis(i18n("Enable this option if you want a window's geometry to be displayed" @@ -1039,8 +1025,6 @@ KMovingConfig::KMovingConfig(bool _standAlone, KConfig *_config, const KComponen load(); // Any changes goes to slotChanged() - connect(opaque, SIGNAL(clicked()), SLOT(changed())); - connect(resizeOpaqueOn, SIGNAL(clicked()), SLOT(changed())); connect(geometryTipOn, SIGNAL(clicked()), SLOT(changed())); connect(moveResizeMaximized, SIGNAL(toggled(bool)), SLOT(changed())); connect(BrdrSnap, SIGNAL(valueChanged(int)), SLOT(changed())); @@ -1057,16 +1041,6 @@ KMovingConfig::KMovingConfig(bool _standAlone, KConfig *_config, const KComponen slotCntrSnapChanged(CntrSnap->value()); } -int KMovingConfig::getMove() -{ - return (opaque->isChecked()) ? OPAQUE : TRANSPARENT; -} - -void KMovingConfig::setMove(int trans) -{ - opaque->setChecked(trans == OPAQUE); -} - void KMovingConfig::setGeometryTip(bool showGeometryTip) { geometryTipOn->setChecked(showGeometryTip); @@ -1077,16 +1051,6 @@ bool KMovingConfig::getGeometryTip() return geometryTipOn->isChecked(); } -int KMovingConfig::getResizeOpaque() -{ - return (resizeOpaqueOn->isChecked()) ? RESIZE_OPAQUE : RESIZE_TRANSPARENT; -} - -void KMovingConfig::setResizeOpaque(int opaque) -{ - resizeOpaqueOn->setChecked(opaque == RESIZE_OPAQUE); -} - void KMovingConfig::setMoveResizeMaximized(bool a) { moveResizeMaximized->setChecked(a); @@ -1122,19 +1086,6 @@ void KMovingConfig::load(void) KConfigGroup cg(config, "Windows"); - key = cg.readEntry(KWIN_MOVE, "Opaque"); - if (key == "Transparent") - setMove(TRANSPARENT); - else if (key == "Opaque") - setMove(OPAQUE); - - // DF: please keep the default consistent with kwin (options.cpp line 145) - key = cg.readEntry(KWIN_RESIZE_OPAQUE, "Opaque"); - if (key == "Opaque") - setResizeOpaque(RESIZE_OPAQUE); - else if (key == "Transparent") - setResizeOpaque(RESIZE_TRANSPARENT); - //KS 10Jan2003 - Geometry Tip during window move/resize bool showGeomTip = cg.readEntry(KWIN_GEOMETRY, false); setGeometryTip(showGeomTip); @@ -1169,20 +1120,6 @@ void KMovingConfig::save(void) KConfigGroup cg(config, "Windows"); - v = getMove(); - if (v == TRANSPARENT) - cg.writeEntry(KWIN_MOVE, "Transparent"); - else - cg.writeEntry(KWIN_MOVE, "Opaque"); - - cg.writeEntry(KWIN_GEOMETRY, getGeometryTip()); - - v = getResizeOpaque(); - if (v == RESIZE_OPAQUE) - cg.writeEntry(KWIN_RESIZE_OPAQUE, "Opaque"); - else - cg.writeEntry(KWIN_RESIZE_OPAQUE, "Transparent"); - cg.writeEntry(KWIN_MOVE_RESIZE_MAXIMIZED, moveResizeMaximized->isChecked()); @@ -1205,8 +1142,6 @@ void KMovingConfig::save(void) void KMovingConfig::defaults() { - setMove(OPAQUE); - setResizeOpaque(RESIZE_TRANSPARENT); setGeometryTip(false); setMoveResizeMaximized(false); diff --git a/kcmkwin/kwinoptions/windows.h b/kcmkwin/kwinoptions/windows.h index dd2b619d3d..f7a8658f54 100644 --- a/kcmkwin/kwinoptions/windows.h +++ b/kcmkwin/kwinoptions/windows.h @@ -39,18 +39,12 @@ class KButtonGroup; class KColorButton; class KIntNumInput; -#define TRANSPARENT 0 -#define OPAQUE 1 - #define CLICK_TO_FOCUS 0 #define FOCUS_FOLLOW_MOUSE 1 #define TITLEBAR_PLAIN 0 #define TITLEBAR_SHADED 1 -#define RESIZE_TRANSPARENT 0 -#define RESIZE_OPAQUE 1 - #define SMART_PLACEMENT 0 #define MAXIMIZING_PLACEMENT 1 #define CASCADE_PLACEMENT 2 @@ -149,18 +143,12 @@ private slots: void slotCntrSnapChanged(int); private: - int getMove(void); - int getResizeOpaque(void); bool getGeometryTip(void); //KS - void setMove(int); - void setResizeOpaque(int); void setGeometryTip(bool); //KS void setMoveResizeMaximized(bool); KButtonGroup *windowsBox; - QCheckBox *opaque; - QCheckBox *resizeOpaqueOn; QCheckBox *geometryTipOn; QCheckBox *moveResizeMaximized; diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index 300191e0f9..c3a44df185 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -108,7 +108,6 @@ RulesWidget::RulesWidget(QWidget* parent) SETUP(shortcut, force); // workarounds tab SETUP(fsplevel, force); - SETUP(moveresizemode, force); SETUP(type, force); SETUP(ignoreposition, force); SETUP(minsize, force); @@ -165,7 +164,6 @@ void RulesWidget::updateEnableshortcut() } // workarounds tab UPDATE_ENABLE_SLOT(fsplevel) -UPDATE_ENABLE_SLOT(moveresizemode) UPDATE_ENABLE_SLOT(type) UPDATE_ENABLE_SLOT(ignoreposition) UPDATE_ENABLE_SLOT(minsize) @@ -319,16 +317,6 @@ static Placement::Policy comboToPlacement(int val) return conv[ val ]; } -static int moveresizeToCombo(Options::MoveResizeMode mode) -{ - return mode == Options::Opaque ? 0 : 1; -} - -static Options::MoveResizeMode comboToMoveResize(int val) -{ - return val == 0 ? Options::Opaque : Options::Transparent; -} - static int typeToCombo(NET::WindowType type) { if (type < NET::Normal || type > NET::Splash || @@ -450,7 +438,6 @@ void RulesWidget::setRules(Rules* rules) COMBOBOX_FORCE_RULE(tilingoption, tilingToCombo); LINEEDIT_SET_RULE(shortcut,); COMBOBOX_FORCE_RULE(fsplevel,); - COMBOBOX_FORCE_RULE(moveresizemode, moveresizeToCombo); COMBOBOX_FORCE_RULE(type, typeToCombo); CHECKBOX_FORCE_RULE(ignoreposition,); LINEEDIT_FORCE_RULE(minsize, sizeToStr); @@ -547,7 +534,6 @@ Rules* RulesWidget::rules() const COMBOBOX_FORCE_RULE(tilingoption, comboToTiling); LINEEDIT_SET_RULE(shortcut,); COMBOBOX_FORCE_RULE(fsplevel,); - COMBOBOX_FORCE_RULE(moveresizemode, comboToMoveResize); COMBOBOX_FORCE_RULE(type, comboToType); CHECKBOX_FORCE_RULE(ignoreposition,); LINEEDIT_FORCE_RULE(minsize, strToSize); @@ -668,7 +654,6 @@ void RulesWidget::prefillUnusedValues(const KWindowInfo& info) COMBOBOX_PREFILL(tilingoption, tilingToCombo, 0); //LINEEDIT_PREFILL( shortcut, ); //COMBOBOX_PREFILL( fsplevel, ); - //COMBOBOX_PREFILL( moveresizemode, moveresizeToCombo ); COMBOBOX_PREFILL(type, typeToCombo, info.windowType(SUPPORTED_MANAGED_WINDOW_TYPES_MASK)); //CHECKBOX_PREFILL( ignoreposition, ); LINEEDIT_PREFILL(minsize, sizeToStr, info.frameGeometry().size()); diff --git a/kcmkwin/kwinrules/ruleswidget.h b/kcmkwin/kwinrules/ruleswidget.h index 6972e523d6..cb7b1f9195 100644 --- a/kcmkwin/kwinrules/ruleswidget.h +++ b/kcmkwin/kwinrules/ruleswidget.h @@ -81,7 +81,6 @@ private slots: void updateEnabletilingoption(); // workarounds tab void updateEnablefsplevel(); - void updateEnablemoveresizemode(); void updateEnabletype(); void updateEnableignoreposition(); void updateEnableminsize(); diff --git a/libkdecorations/kdecoration.h b/libkdecorations/kdecoration.h index 12612bcdd7..86b5ce2a26 100644 --- a/libkdecorations/kdecoration.h +++ b/libkdecorations/kdecoration.h @@ -731,32 +731,15 @@ Q_SIGNALS: public: /** - * This function may be reimplemented to provide custom bound drawing - * for transparent moving or resizing of the window. - * @a False should be returned if the default implementation should be used. - * Note that if you e.g. paint the outline using a 5 pixels wide line, - * you should compensate for the 2 pixels that would make the window - * look larger. - * It is the decoration's responsibility to do the painting, using - * e.g. code like: - * @code - * Display* dpy = QX11Info::display(); - * XGCValues xgc; - * xgc.function = GXxor; - * xgc.foreground = WhitePixel( dpy, DefaultScreen( dpy )); - * xgc.line_width = width; - * xgc.subwindow_mode = IncludeInferiors; - * GC gc = XCreateGC( dpy, DefaultRootWindow( dpy ), - * GCFunction | GCForeground | GCLineWidth | GCSubwindowMode, &xgc ); - * XDrawRectangle( dpy, DefaultRootWindow( dpy ), gc, r.x(), r.y(), r.width(), r.height()); - * XFreeGC( dpy, gc ); - * @endcode + * This method is not any more invoked from KWin core since version 4.8. + * There is no need to implement it. * * @param geom The geometry at this the bound should be drawn * @param clear @a true if the bound should be cleared (when doing the usual XOR * painting this argument can be simply ignored) * * @see geometry() + * @deprecated */ virtual bool drawbound(const QRect& geom, bool clear); /** diff --git a/options.cpp b/options.cpp index a4cee3c38e..f3218af79e 100644 --- a/options.cpp +++ b/options.cpp @@ -114,8 +114,6 @@ unsigned long Options::updateSettings() changed |= KDecorationOptions::updateSettings(_config.data()); // read decoration settings KConfigGroup config(_config, "Windows"); - moveMode = stringToMoveResizeMode(config.readEntry("MoveMode", "Opaque")); - resizeMode = stringToMoveResizeMode(config.readEntry("ResizeMode", "Opaque")); show_geometry_tip = config.readEntry("GeometryTip", false); QString val; @@ -510,16 +508,6 @@ Options::MouseCommand Options::wheelToMouseCommand(MouseWheelCommand com, int de } #endif -Options::MoveResizeMode Options::stringToMoveResizeMode(const QString& s) -{ - return s == "Opaque" ? Opaque : Transparent; -} - -const char* Options::moveResizeModeToString(MoveResizeMode mode) -{ - return mode == Opaque ? "Opaque" : "Transparent"; -} - double Options::animationTimeFactor() const { const double factors[] = { 0, 0.2, 0.5, 1, 2, 4, 20 }; diff --git a/options.h b/options.h index 0ef0b9206d..d4e7d1bf2e 100644 --- a/options.h +++ b/options.h @@ -149,17 +149,6 @@ public: // number, or -1 = active screen (Workspace::activeScreen()) int xineramaPlacementScreen; - /** - MoveResizeMode, either Tranparent or Opaque. - */ - enum MoveResizeMode { Transparent, Opaque }; - - MoveResizeMode resizeMode; - MoveResizeMode moveMode; - - static MoveResizeMode stringToMoveResizeMode(const QString& s); - static const char* moveResizeModeToString(MoveResizeMode mode); - Placement::Policy placement; bool focusPolicyIsReasonable() { diff --git a/rules.cpp b/rules.cpp index 1587064d2b..e9a6560857 100644 --- a/rules.cpp +++ b/rules.cpp @@ -69,7 +69,6 @@ Rules::Rules() , blockcompositingrule(UnusedForceRule) , fsplevelrule(UnusedForceRule) , acceptfocusrule(UnusedForceRule) - , moveresizemoderule(UnusedForceRule) , closeablerule(UnusedForceRule) , autogrouprule(UnusedForceRule) , autogroupfgrule(UnusedForceRule) @@ -177,7 +176,6 @@ void Rules::readFromCfg(const KConfigGroup& cfg) READ_FORCE_RULE(blockcompositing, , false); READ_FORCE_RULE(fsplevel, limit0to4, 0); // fsp is 0-4 READ_FORCE_RULE(acceptfocus, , false); - READ_FORCE_RULE(moveresizemode, Options::stringToMoveResizeMode, QString()); READ_FORCE_RULE(closeable, , false); READ_FORCE_RULE(autogroup, , false); READ_FORCE_RULE(autogroupfg, , true); @@ -267,7 +265,6 @@ void Rules::write(KConfigGroup& cfg) const WRITE_FORCE_RULE(blockcompositing,); WRITE_FORCE_RULE(fsplevel,); WRITE_FORCE_RULE(acceptfocus,); - WRITE_FORCE_RULE(moveresizemode, Options::moveResizeModeToString); WRITE_FORCE_RULE(closeable,); WRITE_FORCE_RULE(autogroup,); WRITE_FORCE_RULE(autogroupfg,); @@ -309,7 +306,6 @@ bool Rules::isEmpty() const && blockcompositingrule == UnusedForceRule && fsplevelrule == UnusedForceRule && acceptfocusrule == UnusedForceRule - && moveresizemoderule == UnusedForceRule && closeablerule == UnusedForceRule && autogrouprule == UnusedForceRule && autogroupfgrule == UnusedForceRule @@ -619,7 +615,6 @@ APPLY_RULE(noborder, NoBorder, bool) APPLY_FORCE_RULE(blockcompositing, BlockCompositing, bool) APPLY_FORCE_RULE(fsplevel, FSP, int) APPLY_FORCE_RULE(acceptfocus, AcceptFocus, bool) -APPLY_FORCE_RULE(moveresizemode, MoveResizeMode, Options::MoveResizeMode) APPLY_FORCE_RULE(closeable, Closeable, bool) APPLY_FORCE_RULE(autogroup, Autogrouping, bool) APPLY_FORCE_RULE(autogroupfg, AutogroupInForeground, bool) @@ -686,7 +681,6 @@ void Rules::discardUsed(bool withdrawn) DISCARD_USED_FORCE_RULE(blockcompositing); DISCARD_USED_FORCE_RULE(fsplevel); DISCARD_USED_FORCE_RULE(acceptfocus); - DISCARD_USED_FORCE_RULE(moveresizemode); DISCARD_USED_FORCE_RULE(closeable); DISCARD_USED_FORCE_RULE(autogroup); DISCARD_USED_FORCE_RULE(autogroupfg); @@ -810,7 +804,6 @@ CHECK_RULE(NoBorder, bool) CHECK_FORCE_RULE(BlockCompositing, bool) CHECK_FORCE_RULE(FSP, int) CHECK_FORCE_RULE(AcceptFocus, bool) -CHECK_FORCE_RULE(MoveResizeMode, Options::MoveResizeMode) CHECK_FORCE_RULE(Closeable, bool) CHECK_FORCE_RULE(Autogrouping, bool) CHECK_FORCE_RULE(AutogroupInForeground, bool) @@ -866,7 +859,6 @@ void Client::applyWindowRules() if (workspace()->mostRecentlyActivatedClient() == this && !client_rules.checkAcceptFocus(true)) workspace()->activateNextClient(this); - // MoveResizeMode // Closeable QSize s = adjustedSize(); if (s != size()) diff --git a/rules.h b/rules.h index 84a8df16be..9cda1cac65 100644 --- a/rules.h +++ b/rules.h @@ -78,7 +78,6 @@ public: bool checkBlockCompositing(bool block) const; int checkFSP(int fsp) const; bool checkAcceptFocus(bool focus) const; - Options::MoveResizeMode checkMoveResizeMode(Options::MoveResizeMode mode) const; bool checkCloseable(bool closeable) const; bool checkAutogrouping(bool autogroup) const; bool checkAutogroupInForeground(bool fg) const; @@ -136,7 +135,6 @@ public: bool applyBlockCompositing(bool& block) const; bool applyFSP(int& fsp) const; bool applyAcceptFocus(bool& focus) const; - bool applyMoveResizeMode(Options::MoveResizeMode& mode) const; bool applyCloseable(bool& closeable) const; bool applyAutogrouping(bool& autogroup) const; bool applyAutogroupInForeground(bool& fg) const; @@ -252,8 +250,6 @@ private: ForceRule fsplevelrule; bool acceptfocus; ForceRule acceptfocusrule; - Options::MoveResizeMode moveresizemode; - ForceRule moveresizemoderule; bool closeable; ForceRule closeablerule; bool autogroup; diff --git a/useractions.cpp b/useractions.cpp index d969def142..1d07ca4ee0 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -943,8 +943,6 @@ bool Client::performMouseCommand(Options::MouseCommand command, const QPoint &gl workspace()->raiseClient(this); workspace()->requestFocus(this); workspace()->setActiveScreenMouse(globalPos); - if (options->moveMode == Options::Transparent && isMovableAcrossScreens()) - move_faked_activity = workspace()->fakeRequestedActivity(this); // fallthrough case Options::MouseMove: case Options::MouseUnrestrictedMove: { diff --git a/workspace.h b/workspace.h index 2be4c3505d..52d3f7e5df 100644 --- a/workspace.h +++ b/workspace.h @@ -140,8 +140,6 @@ public: void restoreFocus(); void gotFocusIn(const Client*); void setShouldGetFocus(Client*); - bool fakeRequestedActivity(Client* c); - void unfakeActivity(Client* c); bool activateNextClient(Client* c); bool focusChangeEnabled() { return block_focus == 0;