diff --git a/activation.cpp b/activation.cpp index 62920f032a..91b1a1b755 100644 --- a/activation.cpp +++ b/activation.cpp @@ -304,8 +304,7 @@ void Workspace::activateClient(Client* c, bool force) // E.g. typing URL in minicli which will show kio_uiserver dialog (with workaround), // and then kdesktop shows dialog about SSL certificate. // This needs also avoiding user creation time in Client::readUserTimeMapTimestamp(). - if (!c->ignoreFocusStealing()) - c->updateUserTime(); + c->updateUserTime(); } /*! @@ -565,8 +564,6 @@ bool Workspace::allowClientActivation(const Client* c, Time time, bool focus_in, return false; if (!ignore_desktop && !c->isOnCurrentDesktop()) return false; // allow only with level == 0 - if (c->ignoreFocusStealing()) - return true; if (ac == NULL || ac->isDesktop()) { kDebug(1212) << "Activation: No client active, allowing"; return true; // no active client -> always allow @@ -613,8 +610,6 @@ bool Workspace::allowFullClientRaising(const Client* c, Time time) kDebug(1212) << "Raising: No client active, allowing"; return true; // no active client -> always allow } - if (c->ignoreFocusStealing()) - return true; // TODO window urgency -> return true? if (Client::belongToSameApplication(c, ac, true)) { kDebug(1212) << "Raising: Belongs to active application"; @@ -804,10 +799,7 @@ Time Client::readUserTimeMapTimestamp(const KStartupInfoId* asn_id, const KStart // this check will be done in manage(). if (session) return -1U; - if (ignoreFocusStealing() && act != NULL) - time = act->userTime(); - else - time = readUserCreationTime(); + time = readUserCreationTime(); } kDebug(1212) << "User timestamp, final:" << this << ":" << time; return time; diff --git a/client.h b/client.h index b39468724a..2677f30dc9 100644 --- a/client.h +++ b/client.h @@ -495,7 +495,6 @@ public: void updateUserTime(Time time = CurrentTime); Time userTime() const; bool hasUserTimeSupport() const; - bool ignoreFocusStealing() const; /// Does 'delete c;' static void deleteClient(Client* c, allowed_t); @@ -912,7 +911,6 @@ private: KShortcut _shortcut; int sm_stacking_order; friend struct FetchNameInternalPredicate; - friend struct CheckIgnoreFocusStealingProcedure; friend struct ResetupRulesProcedure; friend class GeometryUpdatesBlocker; QTimer* demandAttentionKNotifyTimer; @@ -1193,18 +1191,11 @@ inline bool Client::hasUserTimeSupport() const return info->userTime() != -1U; } -inline bool Client::ignoreFocusStealing() const -{ - return ignore_focus_stealing; -} - inline const WindowRules* Client::rules() const { return &client_rules; } -KWIN_PROCEDURE(CheckIgnoreFocusStealingProcedure, Client, cl->ignore_focus_stealing = options->checkIgnoreFocusStealing(cl)); - inline Window Client::moveResizeGrabWindow() const { return move_resize_grab_window; diff --git a/manage.cpp b/manage.cpp index 4583a97a6f..e494be5b5b 100644 --- a/manage.cpp +++ b/manage.cpp @@ -107,7 +107,6 @@ bool Client::manage(Window w, bool isMapped) // and also relies on rules already existing cap_normal = readName(); setupWindowRules(false); - ignore_focus_stealing = options->checkIgnoreFocusStealing(this); // TODO: Change to rules setCaption(cap_normal, true); if (Extensions::shapeAvailable()) @@ -274,10 +273,7 @@ bool Client::manage(Window w, bool isMapped) else usePosition = true; if (!rules()->checkIgnoreGeometry(!usePosition)) { - bool ignorePPosition = options->ignorePositionClasses().contains( - QString::fromLatin1(resourceClass())); - - if (((xSizeHint.flags & PPosition) && !ignorePPosition) || + if (((xSizeHint.flags & PPosition)) || (xSizeHint.flags & USPosition)) { placementDone = true; // Disobey xinerama placement option for now (#70943) diff --git a/options.cpp b/options.cpp index f17a4214e2..717a82d90a 100644 --- a/options.cpp +++ b/options.cpp @@ -190,19 +190,6 @@ unsigned long Options::updateSettings() setOpMaxButtonMiddleClick(windowOperation(config.readEntry("MaximizeButtonMiddleClickCommand", "Maximize (vertical only)"), true)); setOpMaxButtonRightClick(windowOperation(config.readEntry("MaximizeButtonRightClickCommand", "Maximize (horizontal only)"), true)); - m_ignorePositionClasses = config.readEntry("IgnorePositionClasses", QStringList()); - ignoreFocusStealingClasses = config.readEntry("IgnoreFocusStealingClasses", QStringList()); - // Qt3.2 and older had resource class all lowercase, but Qt3.3 has it capitalized - // therefore Client::resourceClass() forces lowercase, force here lowercase as well - for (QStringList::Iterator it = m_ignorePositionClasses.begin(); - it != m_ignorePositionClasses.end(); - ++it) - (*it) = (*it).toLower(); - for (QStringList::Iterator it = ignoreFocusStealingClasses.begin(); - it != ignoreFocusStealingClasses.end(); - ++it) - (*it) = (*it).toLower(); - m_killPingTimeout = config.readEntry("KillPingTimeout", 5000); m_hideUtilityWindowsForInactive = config.readEntry("HideUtilityWindowsForInactive", true); m_inactiveTabsSkipTaskbar = config.readEntry("InactiveTabsSkipTaskbar", false); @@ -460,11 +447,6 @@ int Options::electricBorderCooldown() const return electric_border_cooldown; } -bool Options::checkIgnoreFocusStealing(const Client* c) const -{ - return ignoreFocusStealingClasses.contains(QString::fromLatin1(c->resourceClass())); -} - Options::MouseCommand Options::wheelToMouseCommand(MouseWheelCommand com, int delta) const { switch(com) { diff --git a/options.h b/options.h index c0ab6b2a2e..855ed78ccc 100644 --- a/options.h +++ b/options.h @@ -115,10 +115,6 @@ class Options : public QObject, public KDecorationOptions * 0 - 4 , see Workspace::allowClientActivation() **/ Q_PROPERTY(int focusStealingPreventionLevel READ focusStealingPreventionLevel NOTIFY configChanged) - /** - * List of window classes to ignore PPosition size hint - */ - Q_PROPERTY(QStringList ignorePositionClasses READ ignorePositionClasses NOTIFY configChanged) /** * support legacy fullscreen windows hack: borderless non-netwm windows with screen geometry */ @@ -372,13 +368,6 @@ public: return m_focusStealingPreventionLevel; } - /** - * List of window classes to ignore PPosition size hint - */ - const QStringList &ignorePositionClasses() const { - return m_ignorePositionClasses; - } - /** * support legacy fullscreen windows hack: borderless non-netwm windows with screen geometry */ @@ -386,8 +375,6 @@ public: return m_legacyFullscreenSupport; } - bool checkIgnoreFocusStealing(const Client* c) const; - WindowOperation operationTitlebarDblClick() const { return OpTitlebarDblClick; } @@ -625,7 +612,6 @@ private: bool m_showDesktopIsMinimizeAll; bool m_rollOverDesktops; int m_focusStealingPreventionLevel; - QStringList m_ignorePositionClasses; bool m_legacyFullscreenSupport; int m_killPingTimeout; bool m_hideUtilityWindowsForInactive; @@ -683,8 +669,6 @@ private: bool electric_border_tiling; bool borderless_maximized_windows; bool show_geometry_tip; - // List of window classes for which not to use focus stealing prevention - QStringList ignoreFocusStealingClasses; int animationSpeed; // 0 - instant, 5 - very slow MouseCommand wheelToMouseCommand(MouseWheelCommand com, int delta) const; diff --git a/workspace.cpp b/workspace.cpp index 66fb50c84a..21ae09365f 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -932,7 +932,6 @@ void Workspace::slotReconfigure() emit configChanged(); initPositioning->reinitCascading(0); discardPopup(); - forEachClient(CheckIgnoreFocusStealingProcedure()); updateToolWindows(true); if (hasDecorationPlugin() && mgr->reset(changed)) {