mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kwin and plasma tasks applet activities cleanup
This commit is contained in:
parent
39738a730f
commit
adc2ea8512
31 changed files with 24 additions and 330 deletions
|
@ -400,7 +400,7 @@ void Workspace::handleTakeActivity(KWin::Client *c, xcb_timestamp_t /*timestamp*
|
||||||
*/
|
*/
|
||||||
void Workspace::clientHidden(Client* c)
|
void Workspace::clientHidden(Client* c)
|
||||||
{
|
{
|
||||||
assert(!c->isShown(true) || !c->isOnCurrentDesktop() || !c->isOnCurrentActivity());
|
assert(!c->isShown(true) || !c->isOnCurrentDesktop());
|
||||||
activateNextClient(c);
|
activateNextClient(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ Client *Workspace::clientUnderMouse(int screen) const
|
||||||
// rule out clients which are not really visible.
|
// rule out clients which are not really visible.
|
||||||
// the screen test is rather superfluous for xrandr & twinview since the geometry would differ -> TODO: might be dropped
|
// the screen test is rather superfluous for xrandr & twinview since the geometry would differ -> TODO: might be dropped
|
||||||
if (!(client->isShown(false) && client->isOnCurrentDesktop() &&
|
if (!(client->isShown(false) && client->isOnCurrentDesktop() &&
|
||||||
client->isOnCurrentActivity() && client->isOnScreen(screen)))
|
client->isOnScreen(screen)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (client->geometry().contains(Cursor::pos())) {
|
if (client->geometry().contains(Cursor::pos())) {
|
||||||
|
|
|
@ -90,8 +90,6 @@ Client::Client()
|
||||||
, m_wrapper()
|
, m_wrapper()
|
||||||
, decoration(NULL)
|
, decoration(NULL)
|
||||||
, bridge(new Bridge(this))
|
, bridge(new Bridge(this))
|
||||||
, m_activityUpdatesBlocked(false)
|
|
||||||
, m_blockedActivityUpdatesRequireTransients(false)
|
|
||||||
, m_moveResizeGrabWindow()
|
, m_moveResizeGrabWindow()
|
||||||
, move_resize_has_keyboard_grab(false)
|
, move_resize_has_keyboard_grab(false)
|
||||||
, m_managed(false)
|
, m_managed(false)
|
||||||
|
@ -130,7 +128,6 @@ Client::Client()
|
||||||
, paintRedirector(0)
|
, paintRedirector(0)
|
||||||
, m_firstInTabBox(false)
|
, m_firstInTabBox(false)
|
||||||
, electricMaximizing(false)
|
, electricMaximizing(false)
|
||||||
, activitiesDefined(false)
|
|
||||||
, needsSessionInteract(false)
|
, needsSessionInteract(false)
|
||||||
, needsXWindowMove(false)
|
, needsXWindowMove(false)
|
||||||
#ifdef KWIN_BUILD_KAPPMENU
|
#ifdef KWIN_BUILD_KAPPMENU
|
||||||
|
@ -1093,13 +1090,6 @@ void Client::updateVisibility()
|
||||||
internalHide();
|
internalHide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!isOnCurrentActivity()) {
|
|
||||||
if (compositing() && options->hiddenPreviews() != HiddenPreviewsNever)
|
|
||||||
internalKeep();
|
|
||||||
else
|
|
||||||
internalHide();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (isManaged())
|
if (isManaged())
|
||||||
resetShowingDesktop(true);
|
resetShowingDesktop(true);
|
||||||
internalShow();
|
internalShow();
|
||||||
|
@ -1489,59 +1479,6 @@ void Client::setDesktop(int desktop)
|
||||||
emit desktopPresenceChanged(this, was_desk);
|
emit desktopPresenceChanged(this, was_desk);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets whether the client is on @p activity.
|
|
||||||
* If you remove it from its last activity, then it's on all activities.
|
|
||||||
*
|
|
||||||
* Note: If it was on all activities and you try to remove it from one, nothing will happen;
|
|
||||||
* I don't think that's an important enough use case to handle here.
|
|
||||||
*/
|
|
||||||
void Client::setOnActivity(const QString &activity, bool enable)
|
|
||||||
{
|
|
||||||
Q_UNUSED(activity)
|
|
||||||
Q_UNUSED(enable)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* set exactly which activities this client is on
|
|
||||||
*/
|
|
||||||
void Client::setOnActivities(QStringList newActivitiesList)
|
|
||||||
{
|
|
||||||
Q_UNUSED(newActivitiesList)
|
|
||||||
}
|
|
||||||
|
|
||||||
void Client::blockActivityUpdates(bool b)
|
|
||||||
{
|
|
||||||
if (b) {
|
|
||||||
++m_activityUpdatesBlocked;
|
|
||||||
} else {
|
|
||||||
Q_ASSERT(m_activityUpdatesBlocked);
|
|
||||||
--m_activityUpdatesBlocked;
|
|
||||||
if (!m_activityUpdatesBlocked)
|
|
||||||
updateActivities(m_blockedActivityUpdatesRequireTransients);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* update after activities changed
|
|
||||||
*/
|
|
||||||
void Client::updateActivities(bool includeTransients)
|
|
||||||
{
|
|
||||||
if (m_activityUpdatesBlocked) {
|
|
||||||
m_blockedActivityUpdatesRequireTransients |= includeTransients;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
emit activitiesChanged(this);
|
|
||||||
m_blockedActivityUpdatesRequireTransients = false; // reset
|
|
||||||
FocusChain::self()->update(this, FocusChain::MakeFirst);
|
|
||||||
updateVisibility();
|
|
||||||
updateWindowRules(Rules::Activity);
|
|
||||||
|
|
||||||
// Update states of all other windows in this group
|
|
||||||
if (tabGroup())
|
|
||||||
tabGroup()->updateStates(this, TabGroup::Activity);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the virtual desktop within the workspace() the client window
|
* Returns the virtual desktop within the workspace() the client window
|
||||||
* is located in, 0 if it isn't located on any special desktop (not mapped yet),
|
* is located in, 0 if it isn't located on any special desktop (not mapped yet),
|
||||||
|
@ -1556,19 +1493,6 @@ int Client::desktop() const
|
||||||
return desk;
|
return desk;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the list of activities the client window is on.
|
|
||||||
* if it's on all activities, the list will be empty.
|
|
||||||
* Don't use this, use isOnActivity() and friends (from class Toplevel)
|
|
||||||
*/
|
|
||||||
QStringList Client::activities() const
|
|
||||||
{
|
|
||||||
if (needsSessionInteract) {
|
|
||||||
return QStringList();
|
|
||||||
}
|
|
||||||
return activityList;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Client::setOnAllDesktops(bool b)
|
void Client::setOnAllDesktops(bool b)
|
||||||
{
|
{
|
||||||
if ((b && isOnAllDesktops()) ||
|
if ((b && isOnAllDesktops()) ||
|
||||||
|
@ -1584,14 +1508,6 @@ void Client::setOnAllDesktops(bool b)
|
||||||
tabGroup()->updateStates(this, TabGroup::Desktop);
|
tabGroup()->updateStates(this, TabGroup::Desktop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* if @p on is true, sets on all activities.
|
|
||||||
* if it's false, sets it to only be on the current activity
|
|
||||||
*/
|
|
||||||
void Client::setOnAllActivities(bool on)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs activation and/or raising of the window
|
* Performs activation and/or raising of the window
|
||||||
*/
|
*/
|
||||||
|
@ -2064,10 +1980,10 @@ void Client::getWindowProtocols()
|
||||||
Pdeletewindow = 1;
|
Pdeletewindow = 1;
|
||||||
else if (p[i] == atoms->wm_take_focus)
|
else if (p[i] == atoms->wm_take_focus)
|
||||||
Ptakefocus = 1;
|
Ptakefocus = 1;
|
||||||
else if (p[i] == atoms->net_wm_take_activity)
|
|
||||||
Ptakeactivity = 1;
|
|
||||||
else if (p[i] == atoms->net_wm_context_help)
|
else if (p[i] == atoms->net_wm_context_help)
|
||||||
Pcontexthelp = 1;
|
Pcontexthelp = 1;
|
||||||
|
else if (p[i] == atoms->net_wm_take_activity)
|
||||||
|
Ptakeactivity = 1;
|
||||||
else if (p[i] == atoms->net_wm_ping)
|
else if (p[i] == atoms->net_wm_ping)
|
||||||
Pping = 1;
|
Pping = 1;
|
||||||
}
|
}
|
||||||
|
@ -2322,10 +2238,6 @@ QPixmap* kwin_get_menu_pix_hack()
|
||||||
return &p;
|
return &p;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::checkActivities()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Client::setSessionInteract(bool needed)
|
void Client::setSessionInteract(bool needed)
|
||||||
{
|
{
|
||||||
needsSessionInteract = needed;
|
needsSessionInteract = needed;
|
||||||
|
|
|
@ -348,13 +348,6 @@ public:
|
||||||
|
|
||||||
void sendToScreen(int screen);
|
void sendToScreen(int screen);
|
||||||
|
|
||||||
virtual QStringList activities() const;
|
|
||||||
void setOnActivity(const QString &activity, bool enable);
|
|
||||||
void setOnAllActivities(bool set);
|
|
||||||
void setOnActivities(QStringList newActivitiesList);
|
|
||||||
void updateActivities(bool includeTransients);
|
|
||||||
void blockActivityUpdates(bool b = true);
|
|
||||||
|
|
||||||
/// Is not minimized and not hidden. I.e. normally visible on some virtual desktop.
|
/// Is not minimized and not hidden. I.e. normally visible on some virtual desktop.
|
||||||
bool isShown(bool shaded_is_shown) const;
|
bool isShown(bool shaded_is_shown) const;
|
||||||
bool isHiddenInternal() const; // For compositing
|
bool isHiddenInternal() const; // For compositing
|
||||||
|
@ -841,9 +834,6 @@ private:
|
||||||
KDecoration* decoration;
|
KDecoration* decoration;
|
||||||
Bridge* bridge;
|
Bridge* bridge;
|
||||||
int desk;
|
int desk;
|
||||||
QStringList activityList;
|
|
||||||
int m_activityUpdatesBlocked;
|
|
||||||
bool m_blockedActivityUpdatesRequireTransients;
|
|
||||||
bool buttonDown;
|
bool buttonDown;
|
||||||
bool moveResizeMode;
|
bool moveResizeMode;
|
||||||
Xcb::Window m_moveResizeGrabWindow;
|
Xcb::Window m_moveResizeGrabWindow;
|
||||||
|
@ -984,9 +974,6 @@ private:
|
||||||
|
|
||||||
friend bool performTransiencyCheck();
|
friend bool performTransiencyCheck();
|
||||||
|
|
||||||
void checkActivities();
|
|
||||||
bool activitiesDefined; //whether the x property was actually set
|
|
||||||
|
|
||||||
bool needsSessionInteract;
|
bool needsSessionInteract;
|
||||||
bool needsXWindowMove;
|
bool needsXWindowMove;
|
||||||
|
|
||||||
|
|
|
@ -126,16 +126,6 @@ WRAP(bool, waitForCompositingSetup)
|
||||||
|
|
||||||
#undef WRAP
|
#undef WRAP
|
||||||
|
|
||||||
bool DBusInterface::startActivity(const QString &in0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DBusInterface::stopActivity(const QString &in0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DBusInterface::doNotManage(const QString &name)
|
void DBusInterface::doNotManage(const QString &name)
|
||||||
{
|
{
|
||||||
Q_UNUSED(name)
|
Q_UNUSED(name)
|
||||||
|
|
|
@ -78,8 +78,6 @@ public Q_SLOTS: // METHODS
|
||||||
* @deprecated
|
* @deprecated
|
||||||
**/
|
**/
|
||||||
void showWindowMenuAt(qlonglong winId, int x, int y);
|
void showWindowMenuAt(qlonglong winId, int x, int y);
|
||||||
bool startActivity(const QString &in0);
|
|
||||||
bool stopActivity(const QString &in0);
|
|
||||||
QString supportInformation();
|
QString supportInformation();
|
||||||
Q_NOREPLY void unclutterDesktop();
|
Q_NOREPLY void unclutterDesktop();
|
||||||
// from compositor
|
// from compositor
|
||||||
|
|
|
@ -74,7 +74,6 @@ void Deleted::copyToDeleted(Toplevel* c)
|
||||||
assert(dynamic_cast< Deleted* >(c) == NULL);
|
assert(dynamic_cast< Deleted* >(c) == NULL);
|
||||||
Toplevel::copyToDeleted(c);
|
Toplevel::copyToDeleted(c);
|
||||||
desk = c->desktop();
|
desk = c->desktop();
|
||||||
activityList = c->activities();
|
|
||||||
contentsRect = QRect(c->clientPos(), c->clientSize());
|
contentsRect = QRect(c->clientPos(), c->clientSize());
|
||||||
transparent_rect = c->transparentRect();
|
transparent_rect = c->transparentRect();
|
||||||
m_layer = c->layer();
|
m_layer = c->layer();
|
||||||
|
@ -125,11 +124,6 @@ int Deleted::desktop() const
|
||||||
return desk;
|
return desk;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList Deleted::activities() const
|
|
||||||
{
|
|
||||||
return activityList;
|
|
||||||
}
|
|
||||||
|
|
||||||
QPoint Deleted::clientPos() const
|
QPoint Deleted::clientPos() const
|
||||||
{
|
{
|
||||||
return contentsRect.topLeft();
|
return contentsRect.topLeft();
|
||||||
|
|
|
@ -40,7 +40,6 @@ public:
|
||||||
void unrefWindow();
|
void unrefWindow();
|
||||||
void discard();
|
void discard();
|
||||||
virtual int desktop() const;
|
virtual int desktop() const;
|
||||||
virtual QStringList activities() const;
|
|
||||||
virtual QPoint clientPos() const;
|
virtual QPoint clientPos() const;
|
||||||
virtual QSize clientSize() const;
|
virtual QSize clientSize() const;
|
||||||
virtual QRect transparentRect() const;
|
virtual QRect transparentRect() const;
|
||||||
|
@ -81,7 +80,6 @@ private:
|
||||||
int delete_refcount;
|
int delete_refcount;
|
||||||
double window_opacity;
|
double window_opacity;
|
||||||
int desk;
|
int desk;
|
||||||
QStringList activityList;
|
|
||||||
QRect contentsRect; // for clientPos()/clientSize()
|
QRect contentsRect; // for clientPos()/clientSize()
|
||||||
QRect transparent_rect;
|
QRect transparent_rect;
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,6 @@ effects['desktopChanged(int,int)'].connect(function(oldDesktop, newDesktop) {
|
||||||
if (w.minimized) {
|
if (w.minimized) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!w.isOnActivity(effects.currentActivity)){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (w.desktop == oldDesktop) {
|
if (w.desktop == oldDesktop) {
|
||||||
effect.animate(w, Effect.Opacity, duration, 0.0);
|
effect.animate(w, Effect.Opacity, duration, 0.0);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -719,8 +719,6 @@ void Client::propertyNotifyEvent(XPropertyEvent* e)
|
||||||
getMotifHints();
|
getMotifHints();
|
||||||
else if (e->atom == atoms->net_wm_sync_request_counter)
|
else if (e->atom == atoms->net_wm_sync_request_counter)
|
||||||
getSyncCounter();
|
getSyncCounter();
|
||||||
else if (e->atom == atoms->activities)
|
|
||||||
checkActivities();
|
|
||||||
else if (e->atom == atoms->kde_net_wm_block_compositing)
|
else if (e->atom == atoms->kde_net_wm_block_compositing)
|
||||||
updateCompositeBlocking(true);
|
updateCompositeBlocking(true);
|
||||||
else if (e->atom == atoms->kde_first_in_window_list)
|
else if (e->atom == atoms->kde_first_in_window_list)
|
||||||
|
|
|
@ -70,15 +70,6 @@ Client *FocusChain::getForActivation(uint desktop, int screen) const
|
||||||
if (it == m_desktopFocusChains.constEnd()) {
|
if (it == m_desktopFocusChains.constEnd()) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
const QList<Client*> &chain = it.value();
|
|
||||||
for (int i = chain.size() - 1; i >= 0; --i) {
|
|
||||||
Client *tmp = chain.at(i);
|
|
||||||
// TODO: move the check into Client
|
|
||||||
if (tmp->isShown(false) && tmp->isOnCurrentActivity()
|
|
||||||
&& ( !m_separateScreenFocus || tmp->screen() == screen)) {
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +203,7 @@ Client *FocusChain::nextMostRecentlyUsed(Client *reference) const
|
||||||
bool FocusChain::isUsableFocusCandidate(Client *c, Client *prev) const
|
bool FocusChain::isUsableFocusCandidate(Client *c, Client *prev) const
|
||||||
{
|
{
|
||||||
return c != prev &&
|
return c != prev &&
|
||||||
c->isShown(false) && c->isOnCurrentDesktop() && c->isOnCurrentActivity() &&
|
c->isShown(false) && c->isOnCurrentDesktop() &&
|
||||||
(!m_separateScreenFocus || c->isOnScreen(prev ? prev->screen() : screens()->current()));
|
(!m_separateScreenFocus || c->isOnScreen(prev ? prev->screen() : screens()->current()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -476,8 +476,6 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted,
|
||||||
continue; // is not active tab
|
continue; // is not active tab
|
||||||
if (!((*l)->isOnDesktop(c->desktop()) || c->isOnDesktop((*l)->desktop())))
|
if (!((*l)->isOnDesktop(c->desktop()) || c->isOnDesktop((*l)->desktop())))
|
||||||
continue; // wrong virtual desktop
|
continue; // wrong virtual desktop
|
||||||
if (!(*l)->isOnCurrentActivity())
|
|
||||||
continue; // wrong activity
|
|
||||||
if ((*l)->isDesktop() || (*l)->isSplash())
|
if ((*l)->isDesktop() || (*l)->isSplash())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ Client* Workspace::topClientOnDesktop(int desktop, int screen, bool unconstraine
|
||||||
if (!c) {
|
if (!c) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (c->isOnDesktop(desktop) && c->isShown(false) && c->isOnCurrentActivity()) {
|
if (c->isOnDesktop(desktop) && c->isShown(false)) {
|
||||||
if (screen != -1 && c->screen() != screen)
|
if (screen != -1 && c->screen() != screen)
|
||||||
continue;
|
continue;
|
||||||
if (!only_normal)
|
if (!only_normal)
|
||||||
|
@ -382,7 +382,6 @@ void Workspace::raiseClient(Client* c, bool nogroup)
|
||||||
|
|
||||||
if (!c->isSpecialWindow()) {
|
if (!c->isSpecialWindow()) {
|
||||||
most_recently_raised = c;
|
most_recently_raised = c;
|
||||||
pending_take_activity = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,7 +742,7 @@ void Client::restackWindow(xcb_window_t above, int detail, NET::RequestSource sr
|
||||||
Client *c = qobject_cast<Client*>(*it);
|
Client *c = qobject_cast<Client*>(*it);
|
||||||
|
|
||||||
if (!c || !( (*it)->isNormalWindow() && c->isShown(true) &&
|
if (!c || !( (*it)->isNormalWindow() && c->isShown(true) &&
|
||||||
(*it)->isOnCurrentDesktop() && (*it)->isOnCurrentActivity() && (*it)->isOnScreen(screen()) ))
|
(*it)->isOnCurrentDesktop() && (*it)->isOnScreen(screen()) ))
|
||||||
continue; // irrelevant clients
|
continue; // irrelevant clients
|
||||||
|
|
||||||
if (*(it - 1) == other)
|
if (*(it - 1) == other)
|
||||||
|
|
|
@ -709,7 +709,6 @@ WINDOW_HELPER(bool, isManaged, "managed")
|
||||||
WINDOW_HELPER(bool, isDeleted, "deleted")
|
WINDOW_HELPER(bool, isDeleted, "deleted")
|
||||||
WINDOW_HELPER(bool, hasOwnShape, "shaped")
|
WINDOW_HELPER(bool, hasOwnShape, "shaped")
|
||||||
WINDOW_HELPER(QString, windowRole, "windowRole")
|
WINDOW_HELPER(QString, windowRole, "windowRole")
|
||||||
WINDOW_HELPER(QStringList, activities, "activities")
|
|
||||||
WINDOW_HELPER(bool, skipsCloseAnimation, "skipsCloseAnimation")
|
WINDOW_HELPER(bool, skipsCloseAnimation, "skipsCloseAnimation")
|
||||||
|
|
||||||
QString EffectWindow::windowClass() const
|
QString EffectWindow::windowClass() const
|
||||||
|
@ -727,17 +726,6 @@ NET::WindowType EffectWindow::windowType() const
|
||||||
return static_cast<NET::WindowType>(parent()->property("windowType").toInt());
|
return static_cast<NET::WindowType>(parent()->property("windowType").toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EffectWindow::isOnActivity(QString activity) const
|
|
||||||
{
|
|
||||||
const QStringList activities = parent()->property("activities").toStringList();
|
|
||||||
return activities.isEmpty() || activities.contains(activity);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EffectWindow::isOnAllActivities() const
|
|
||||||
{
|
|
||||||
return parent()->property("activities").toStringList().isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef WINDOW_HELPER
|
#undef WINDOW_HELPER
|
||||||
|
|
||||||
#define WINDOW_HELPER_DEFAULT( rettype, prototype, propertyname, defaultValue ) \
|
#define WINDOW_HELPER_DEFAULT( rettype, prototype, propertyname, defaultValue ) \
|
||||||
|
@ -822,10 +810,6 @@ void EffectWindow::addLayerRepaint(const QRect &r)
|
||||||
QMetaObject::invokeMethod(parent(), "addLayerRepaint", Q_ARG(const QRect&, r));
|
QMetaObject::invokeMethod(parent(), "addLayerRepaint", Q_ARG(const QRect&, r));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EffectWindow::isOnCurrentActivity() const
|
|
||||||
{
|
|
||||||
return isOnActivity(effects->currentActivity());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EffectWindow::isOnCurrentDesktop() const
|
bool EffectWindow::isOnCurrentDesktop() const
|
||||||
{
|
{
|
||||||
|
@ -849,9 +833,7 @@ bool EffectWindow::hasDecoration() const
|
||||||
|
|
||||||
bool EffectWindow::isVisible() const
|
bool EffectWindow::isVisible() const
|
||||||
{
|
{
|
||||||
return !isMinimized()
|
return !isMinimized() && isOnCurrentDesktop();
|
||||||
&& isOnCurrentDesktop()
|
|
||||||
&& isOnCurrentActivity();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -599,7 +599,6 @@ class KWIN_EXPORT EffectsHandler : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int currentDesktop READ currentDesktop WRITE setCurrentDesktop NOTIFY desktopChanged)
|
Q_PROPERTY(int currentDesktop READ currentDesktop WRITE setCurrentDesktop NOTIFY desktopChanged)
|
||||||
Q_PROPERTY(QString currentActivity READ currentActivity NOTIFY currentActivityChanged)
|
|
||||||
Q_PROPERTY(KWin::EffectWindow *activeWindow READ activeWindow WRITE activateWindow NOTIFY windowActivated)
|
Q_PROPERTY(KWin::EffectWindow *activeWindow READ activeWindow WRITE activateWindow NOTIFY windowActivated)
|
||||||
Q_PROPERTY(QSize desktopGridSize READ desktopGridSize)
|
Q_PROPERTY(QSize desktopGridSize READ desktopGridSize)
|
||||||
Q_PROPERTY(int desktopGridWidth READ desktopGridWidth)
|
Q_PROPERTY(int desktopGridWidth READ desktopGridWidth)
|
||||||
|
@ -698,12 +697,6 @@ public:
|
||||||
Q_SCRIPTABLE virtual void windowToScreen(KWin::EffectWindow* w, int screen) = 0;
|
Q_SCRIPTABLE virtual void windowToScreen(KWin::EffectWindow* w, int screen) = 0;
|
||||||
virtual void setShowingDesktop(bool showing) = 0;
|
virtual void setShowingDesktop(bool showing) = 0;
|
||||||
|
|
||||||
|
|
||||||
// Activities
|
|
||||||
/**
|
|
||||||
* @returns The ID of the current activity.
|
|
||||||
*/
|
|
||||||
virtual QString currentActivity() const = 0;
|
|
||||||
// Desktops
|
// Desktops
|
||||||
/**
|
/**
|
||||||
* @returns The ID of the current desktop.
|
* @returns The ID of the current desktop.
|
||||||
|
@ -1181,26 +1174,6 @@ Q_SIGNALS:
|
||||||
**/
|
**/
|
||||||
void screenGeometryChanged(const QSize &size);
|
void screenGeometryChanged(const QSize &size);
|
||||||
|
|
||||||
/**
|
|
||||||
* This signal is emitted when the global
|
|
||||||
* activity is changed
|
|
||||||
* @param id id of the new current activity
|
|
||||||
* @since 4.9
|
|
||||||
**/
|
|
||||||
void currentActivityChanged(const QString &id);
|
|
||||||
/**
|
|
||||||
* This signal is emitted when a new activity is added
|
|
||||||
* @param id id of the new activity
|
|
||||||
* @since 4.9
|
|
||||||
*/
|
|
||||||
void activityAdded(const QString &id);
|
|
||||||
/**
|
|
||||||
* This signal is emitted when the activity
|
|
||||||
* is removed
|
|
||||||
* @param id id of the removed activity
|
|
||||||
* @since 4.9
|
|
||||||
*/
|
|
||||||
void activityRemoved(const QString &id);
|
|
||||||
/**
|
/**
|
||||||
* This signal is emitted when the screen got locked or unlocked.
|
* This signal is emitted when the screen got locked or unlocked.
|
||||||
* @param locked @c true if the screen is now locked, @c false if it is now unlocked
|
* @param locked @c true if the screen is now locked, @c false if it is now unlocked
|
||||||
|
@ -1422,9 +1395,6 @@ class KWIN_EXPORT EffectWindow : public QObject
|
||||||
*/
|
*/
|
||||||
Q_PROPERTY(QRect decorationInnerRect READ decorationInnerRect)
|
Q_PROPERTY(QRect decorationInnerRect READ decorationInnerRect)
|
||||||
Q_PROPERTY(bool hasDecoration READ hasDecoration)
|
Q_PROPERTY(bool hasDecoration READ hasDecoration)
|
||||||
Q_PROPERTY(QStringList activities READ activities)
|
|
||||||
Q_PROPERTY(bool onCurrentActivity READ isOnCurrentActivity)
|
|
||||||
Q_PROPERTY(bool onAllActivities READ isOnAllActivities)
|
|
||||||
/**
|
/**
|
||||||
* Whether the decoration currently uses an alpha channel.
|
* Whether the decoration currently uses an alpha channel.
|
||||||
* @since 4.10
|
* @since 4.10
|
||||||
|
@ -1435,7 +1405,6 @@ class KWIN_EXPORT EffectWindow : public QObject
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Not minimized</li>
|
* <li>Not minimized</li>
|
||||||
* <li>On current desktop</li>
|
* <li>On current desktop</li>
|
||||||
* <li>On current activity</li>
|
|
||||||
* </ul>
|
* </ul>
|
||||||
* @since 4.11
|
* @since 4.11
|
||||||
**/
|
**/
|
||||||
|
@ -1460,8 +1429,6 @@ public:
|
||||||
PAINT_DISABLED_BY_MINIMIZE = 1 << 3,
|
PAINT_DISABLED_BY_MINIMIZE = 1 << 3,
|
||||||
/** Window will not be painted because it is not the active window in a client group */
|
/** Window will not be painted because it is not the active window in a client group */
|
||||||
PAINT_DISABLED_BY_TAB_GROUP = 1 << 4,
|
PAINT_DISABLED_BY_TAB_GROUP = 1 << 4,
|
||||||
/** Window will not be painted because it's not on the current activity */
|
|
||||||
PAINT_DISABLED_BY_ACTIVITY = 1 << 5
|
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit EffectWindow(QObject *parent = NULL);
|
explicit EffectWindow(QObject *parent = NULL);
|
||||||
|
@ -1484,11 +1451,6 @@ public:
|
||||||
double opacity() const;
|
double opacity() const;
|
||||||
bool hasAlpha() const;
|
bool hasAlpha() const;
|
||||||
|
|
||||||
bool isOnCurrentActivity() const;
|
|
||||||
Q_SCRIPTABLE bool isOnActivity(QString id) const;
|
|
||||||
bool isOnAllActivities() const;
|
|
||||||
QStringList activities() const;
|
|
||||||
|
|
||||||
bool isOnDesktop(int d) const;
|
bool isOnDesktop(int d) const;
|
||||||
bool isOnCurrentDesktop() const;
|
bool isOnCurrentDesktop() const;
|
||||||
bool isOnAllDesktops() const;
|
bool isOnAllDesktops() const;
|
||||||
|
|
|
@ -157,14 +157,11 @@ bool Client::manage(xcb_window_t w, bool isMapped)
|
||||||
init_minimize = rules()->checkMinimize(init_minimize, !isMapped);
|
init_minimize = rules()->checkMinimize(init_minimize, !isMapped);
|
||||||
noborder = rules()->checkNoBorder(noborder, !isMapped);
|
noborder = rules()->checkNoBorder(noborder, !isMapped);
|
||||||
|
|
||||||
checkActivities();
|
|
||||||
|
|
||||||
// Initial desktop placement
|
// Initial desktop placement
|
||||||
if (session) {
|
if (session) {
|
||||||
desk = session->desktop;
|
desk = session->desktop;
|
||||||
if (session->onAllDesktops)
|
if (session->onAllDesktops)
|
||||||
desk = NET::OnAllDesktops;
|
desk = NET::OnAllDesktops;
|
||||||
setOnActivities(session->activities);
|
|
||||||
} else {
|
} else {
|
||||||
// If this window is transient, ensure that it is opened on the
|
// If this window is transient, ensure that it is opened on the
|
||||||
// same window as its parent. this is necessary when an application
|
// same window as its parent. this is necessary when an application
|
||||||
|
@ -192,9 +189,6 @@ bool Client::manage(xcb_window_t w, bool isMapped)
|
||||||
desk = VirtualDesktopManager::self()->current();
|
desk = VirtualDesktopManager::self()->current();
|
||||||
else if (maincl != NULL)
|
else if (maincl != NULL)
|
||||||
desk = maincl->desktop();
|
desk = maincl->desktop();
|
||||||
|
|
||||||
if (maincl)
|
|
||||||
setOnActivities(maincl->activities());
|
|
||||||
}
|
}
|
||||||
if (info->desktop())
|
if (info->desktop())
|
||||||
desk = info->desktop(); // Window had the initial desktop property, force it
|
desk = info->desktop(); // Window had the initial desktop property, force it
|
||||||
|
@ -211,11 +205,6 @@ bool Client::manage(xcb_window_t w, bool isMapped)
|
||||||
workspace()->updateOnAllDesktopsOfTransients(this); // SELI TODO
|
workspace()->updateOnAllDesktopsOfTransients(this); // SELI TODO
|
||||||
//onAllDesktopsChange(); // Decoration doesn't exist here yet
|
//onAllDesktopsChange(); // Decoration doesn't exist here yet
|
||||||
|
|
||||||
QString activitiesList;
|
|
||||||
activitiesList = rules()->checkActivity(activitiesList, !isMapped);
|
|
||||||
if (!activitiesList.isEmpty())
|
|
||||||
setOnActivities(activitiesList.split(','));
|
|
||||||
|
|
||||||
QRect geom(attr.x, attr.y, attr.width, attr.height);
|
QRect geom(attr.x, attr.y, attr.width, attr.height);
|
||||||
bool placementDone = false;
|
bool placementDone = false;
|
||||||
|
|
||||||
|
@ -319,7 +308,7 @@ bool Client::manage(xcb_window_t w, bool isMapped)
|
||||||
foreach (Client *other, workspace()->clientList()) {
|
foreach (Client *other, workspace()->clientList()) {
|
||||||
if (other->maximizeMode() != MaximizeFull &&
|
if (other->maximizeMode() != MaximizeFull &&
|
||||||
geom == QRect(other->pos(), other->clientSize()) &&
|
geom == QRect(other->pos(), other->clientSize()) &&
|
||||||
desk == other->desktop() && activities() == other->activities()) {
|
desk == other->desktop()) {
|
||||||
|
|
||||||
tabBehind(other, autogroupInFg);
|
tabBehind(other, autogroupInFg);
|
||||||
break;
|
break;
|
||||||
|
@ -567,9 +556,6 @@ bool Client::manage(xcb_window_t w, bool isMapped)
|
||||||
if (!isOnCurrentDesktop() && options->focusPolicyIsReasonable()) {
|
if (!isOnCurrentDesktop() && options->focusPolicyIsReasonable()) {
|
||||||
VirtualDesktopManager::self()->setCurrent(desktop());
|
VirtualDesktopManager::self()->setCurrent(desktop());
|
||||||
}
|
}
|
||||||
/*if (!isOnCurrentActivity()) {
|
|
||||||
workspace()->setCurrentActivity( activities().first() );
|
|
||||||
} FIXME no such method*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -715,8 +701,6 @@ Client* Client::findAutogroupCandidate() const
|
||||||
QString wGId = rules()->checkAutogroupById(QString());
|
QString wGId = rules()->checkAutogroupById(QString());
|
||||||
if (!wGId.isEmpty()) {
|
if (!wGId.isEmpty()) {
|
||||||
foreach (Client *c, workspace()->clientList()) {
|
foreach (Client *c, workspace()->clientList()) {
|
||||||
if (activities() != c->activities())
|
|
||||||
continue; // don't cross activities
|
|
||||||
if (wGId == c->rules()->checkAutogroupById(QString())) {
|
if (wGId == c->rules()->checkAutogroupById(QString())) {
|
||||||
if (found && found->tabGroup() != c->tabGroup()) { // We've found two, ignore both
|
if (found && found->tabGroup() != c->tabGroup()) { // We've found two, ignore both
|
||||||
found = NULL;
|
found = NULL;
|
||||||
|
@ -737,7 +721,7 @@ Client* Client::findAutogroupCandidate() const
|
||||||
if (rules()->checkAutogrouping(options->isAutogroupSimilarWindows())) {
|
if (rules()->checkAutogrouping(options->isAutogroupSimilarWindows())) {
|
||||||
QByteArray wRole = truncatedWindowRole(windowRole());
|
QByteArray wRole = truncatedWindowRole(windowRole());
|
||||||
foreach (Client *c, workspace()->clientList()) {
|
foreach (Client *c, workspace()->clientList()) {
|
||||||
if (desktop() != c->desktop() || activities() != c->activities())
|
if (desktop() != c->desktop())
|
||||||
continue;
|
continue;
|
||||||
QByteArray wRoleB = truncatedWindowRole(c->windowRole());
|
QByteArray wRoleB = truncatedWindowRole(c->windowRole());
|
||||||
if (resourceClass() == c->resourceClass() && // Same resource class
|
if (resourceClass() == c->resourceClass() && // Same resource class
|
||||||
|
|
|
@ -73,14 +73,6 @@
|
||||||
<arg type="ai" direction="out"/>
|
<arg type="ai" direction="out"/>
|
||||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<int>"/>
|
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<int>"/>
|
||||||
</method>
|
</method>
|
||||||
<method name="stopActivity">
|
|
||||||
<arg type="s" direction="in"/>
|
|
||||||
<arg type="b" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="startActivity">
|
|
||||||
<arg type="s" direction="in"/>
|
|
||||||
<arg type="b" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="activeEffects">
|
<method name="activeEffects">
|
||||||
<arg type="as" direction="out"/>
|
<arg type="as" direction="out"/>
|
||||||
</method>
|
</method>
|
||||||
|
|
|
@ -178,8 +178,6 @@ static inline bool isIrrelevant(const Client *client, const Client *regarding, i
|
||||||
return true;
|
return true;
|
||||||
if (!client->isOnDesktop(desktop))
|
if (!client->isOnDesktop(desktop))
|
||||||
return true;
|
return true;
|
||||||
if (!client->isOnCurrentActivity())
|
|
||||||
return true;
|
|
||||||
if (client->isDesktop())
|
if (client->isDesktop())
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -470,12 +470,6 @@ bool Rules::update(Client* c, int selection)
|
||||||
updated = updated || screen != c->screen();
|
updated = updated || screen != c->screen();
|
||||||
screen = c->screen();
|
screen = c->screen();
|
||||||
}
|
}
|
||||||
if NOW_REMEMBER(Activity, activity) {
|
|
||||||
// TODO: ivan - multiple activities support
|
|
||||||
const QString & joinedActivities = c->activities().join(",");
|
|
||||||
updated = updated || activity != joinedActivities;
|
|
||||||
activity = joinedActivities;
|
|
||||||
}
|
|
||||||
if NOW_REMEMBER(MaximizeVert, maximizevert) {
|
if NOW_REMEMBER(MaximizeVert, maximizevert) {
|
||||||
updated = updated || maximizevert != bool(c->maximizeMode() & MaximizeVertical);
|
updated = updated || maximizevert != bool(c->maximizeMode() & MaximizeVertical);
|
||||||
maximizevert = c->maximizeMode() & MaximizeVertical;
|
maximizevert = c->maximizeMode() & MaximizeVertical;
|
||||||
|
@ -860,7 +854,6 @@ void Client::applyWindowRules()
|
||||||
// IgnoreGeometry
|
// IgnoreGeometry
|
||||||
setDesktop(desktop());
|
setDesktop(desktop());
|
||||||
workspace()->sendClientToScreen(this, screen());
|
workspace()->sendClientToScreen(this, screen());
|
||||||
setOnActivities(activities());
|
|
||||||
// Type
|
// Type
|
||||||
maximize(maximizeMode());
|
maximize(maximizeMode());
|
||||||
// Minimize : functions don't check, and there are two functions
|
// Minimize : functions don't check, and there are two functions
|
||||||
|
|
|
@ -717,8 +717,6 @@ bool Scene::Window::isVisible() const
|
||||||
return false;
|
return false;
|
||||||
if (!toplevel->isOnCurrentDesktop())
|
if (!toplevel->isOnCurrentDesktop())
|
||||||
return false;
|
return false;
|
||||||
if (!toplevel->isOnCurrentActivity())
|
|
||||||
return false;
|
|
||||||
if (toplevel->isClient())
|
if (toplevel->isClient())
|
||||||
return (static_cast< Client *>(toplevel))->isShown(true);
|
return (static_cast< Client *>(toplevel))->isShown(true);
|
||||||
return true; // Unmanaged is always visible
|
return true; // Unmanaged is always visible
|
||||||
|
@ -747,8 +745,6 @@ void Scene::Window::resetPaintingEnabled()
|
||||||
if (!toplevel->isOnCurrentDesktop())
|
if (!toplevel->isOnCurrentDesktop())
|
||||||
disable_painting |= PAINT_DISABLED_BY_DESKTOP;
|
disable_painting |= PAINT_DISABLED_BY_DESKTOP;
|
||||||
}
|
}
|
||||||
if (!toplevel->isOnCurrentActivity())
|
|
||||||
disable_painting |= PAINT_DISABLED_BY_ACTIVITY;
|
|
||||||
if (toplevel->isClient()) {
|
if (toplevel->isClient()) {
|
||||||
Client *c = static_cast<Client*>(toplevel);
|
Client *c = static_cast<Client*>(toplevel);
|
||||||
if (c->isMinimized())
|
if (c->isMinimized())
|
||||||
|
|
|
@ -217,8 +217,6 @@ public:
|
||||||
PAINT_DISABLED_BY_MINIMIZE = 1 << 3,
|
PAINT_DISABLED_BY_MINIMIZE = 1 << 3,
|
||||||
// Window will not be painted because it is not the active window in a client group
|
// Window will not be painted because it is not the active window in a client group
|
||||||
PAINT_DISABLED_BY_TAB_GROUP = 1 << 4,
|
PAINT_DISABLED_BY_TAB_GROUP = 1 << 4,
|
||||||
// Window will not be painted because it's not on the current activity
|
|
||||||
PAINT_DISABLED_BY_ACTIVITY = 1 << 5
|
|
||||||
};
|
};
|
||||||
void enablePainting(int reason);
|
void enablePainting(int reason);
|
||||||
void disablePainting(int reason);
|
void disablePainting(int reason);
|
||||||
|
|
|
@ -149,7 +149,6 @@ void Workspace::storeClient(KConfigGroup &cg, int num, Client *c)
|
||||||
cg.writeEntry(QString("stackingOrder") + n, unconstrained_stacking_order.indexOf(c));
|
cg.writeEntry(QString("stackingOrder") + n, unconstrained_stacking_order.indexOf(c));
|
||||||
// KConfig doesn't support long so we need to live with less precision on 64-bit systems
|
// KConfig doesn't support long so we need to live with less precision on 64-bit systems
|
||||||
cg.writeEntry(QString("tabGroup") + n, static_cast<int>(reinterpret_cast<long>(c->tabGroup())));
|
cg.writeEntry(QString("tabGroup") + n, static_cast<int>(reinterpret_cast<long>(c->tabGroup())));
|
||||||
cg.writeEntry(QString("activities") + n, c->activities());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Workspace::storeSubSession(const QString &name, QSet<QByteArray> sessionIds)
|
void Workspace::storeSubSession(const QString &name, QSet<QByteArray> sessionIds)
|
||||||
|
@ -229,7 +228,6 @@ void Workspace::addSessionInfo(KConfigGroup &cg)
|
||||||
info->stackingOrder = cg.readEntry(QString("stackingOrder") + n, -1);
|
info->stackingOrder = cg.readEntry(QString("stackingOrder") + n, -1);
|
||||||
info->tabGroup = cg.readEntry(QString("tabGroup") + n, 0);
|
info->tabGroup = cg.readEntry(QString("tabGroup") + n, 0);
|
||||||
info->tabGroupClient = NULL;
|
info->tabGroupClient = NULL;
|
||||||
info->activities = cg.readEntry(QString("activities") + n, QStringList());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,20 +166,6 @@ bool TabBoxHandlerImpl::checkDesktop(TabBoxClient* client, int desktop) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TabBoxHandlerImpl::checkActivity(TabBoxClient* client) const
|
|
||||||
{
|
|
||||||
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
|
|
||||||
|
|
||||||
switch (config().clientActivitiesMode()) {
|
|
||||||
case TabBoxConfig::AllActivitiesClients:
|
|
||||||
return true;
|
|
||||||
case TabBoxConfig::ExcludeCurrentActivityClients:
|
|
||||||
return !current->isOnCurrentActivity();
|
|
||||||
default: // TabBoxConfig::OnlyCurrentActivityClients
|
|
||||||
return current->isOnCurrentActivity();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TabBoxHandlerImpl::checkApplications(TabBoxClient* client) const
|
bool TabBoxHandlerImpl::checkApplications(TabBoxClient* client) const
|
||||||
{
|
{
|
||||||
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
|
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
|
||||||
|
@ -253,7 +239,6 @@ QWeakPointer<TabBoxClient> TabBoxHandlerImpl::clientToAddToList(TabBoxClient* cl
|
||||||
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
|
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
|
||||||
|
|
||||||
bool addClient = checkDesktop(client, desktop)
|
bool addClient = checkDesktop(client, desktop)
|
||||||
&& checkActivity(client)
|
|
||||||
&& checkApplications(client)
|
&& checkApplications(client)
|
||||||
&& checkMinimized(client)
|
&& checkMinimized(client)
|
||||||
&& checkMultiScreen(client);
|
&& checkMultiScreen(client);
|
||||||
|
@ -1253,7 +1238,7 @@ void TabBox::CDEWalkThroughWindows(bool forward)
|
||||||
i >= 0 ;
|
i >= 0 ;
|
||||||
--i) {
|
--i) {
|
||||||
Client* it = qobject_cast<Client*>(Workspace::self()->stackingOrder().at(i));
|
Client* it = qobject_cast<Client*>(Workspace::self()->stackingOrder().at(i));
|
||||||
if (it && it->isOnCurrentActivity() && it->isOnCurrentDesktop() && !it->isSpecialWindow()
|
if (it && it->isOnCurrentDesktop() && !it->isSpecialWindow()
|
||||||
&& it->isShown(false) && it->wantsTabFocus()
|
&& it->isShown(false) && it->wantsTabFocus()
|
||||||
&& !it->keepAbove() && !it->keepBelow()) {
|
&& !it->keepAbove() && !it->keepBelow()) {
|
||||||
c = it;
|
c = it;
|
||||||
|
@ -1281,7 +1266,7 @@ void TabBox::CDEWalkThroughWindows(bool forward)
|
||||||
}
|
}
|
||||||
} while (nc && nc != c &&
|
} while (nc && nc != c &&
|
||||||
((!options_traverse_all && !nc->isOnDesktop(currentDesktop())) ||
|
((!options_traverse_all && !nc->isOnDesktop(currentDesktop())) ||
|
||||||
nc->isMinimized() || !nc->wantsTabFocus() || nc->keepAbove() || nc->keepBelow() || !nc->isOnCurrentActivity()));
|
nc->isMinimized() || !nc->wantsTabFocus() || nc->keepAbove() || nc->keepBelow()));
|
||||||
if (nc) {
|
if (nc) {
|
||||||
if (c && c != nc)
|
if (c && c != nc)
|
||||||
Workspace::self()->lowerClient(c);
|
Workspace::self()->lowerClient(c);
|
||||||
|
|
|
@ -70,7 +70,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool checkDesktop(TabBoxClient* client, int desktop) const;
|
bool checkDesktop(TabBoxClient* client, int desktop) const;
|
||||||
bool checkActivity(TabBoxClient* client) const;
|
|
||||||
bool checkApplications(TabBoxClient* client) const;
|
bool checkApplications(TabBoxClient* client) const;
|
||||||
bool checkMinimized(TabBoxClient* client) const;
|
bool checkMinimized(TabBoxClient* client) const;
|
||||||
bool checkMultiScreen(TabBoxClient* client) const;
|
bool checkMultiScreen(TabBoxClient* client) const;
|
||||||
|
|
|
@ -338,9 +338,6 @@ void TabGroup::updateStates(Client* main, States states, Client* only)
|
||||||
if (c->desktop() != main->desktop())
|
if (c->desktop() != main->desktop())
|
||||||
c->setDesktop(main->desktop());
|
c->setDesktop(main->desktop());
|
||||||
}
|
}
|
||||||
if ((states & Activity) && c->activities() != main->activities()) {
|
|
||||||
c->setOnActivities(main->activities());
|
|
||||||
}
|
|
||||||
if (states & Layer) {
|
if (states & Layer) {
|
||||||
if (c->keepAbove() != main->keepAbove())
|
if (c->keepAbove() != main->keepAbove())
|
||||||
c->setKeepAbove(main->keepAbove());
|
c->setKeepAbove(main->keepAbove());
|
||||||
|
|
|
@ -446,11 +446,6 @@ bool Toplevel::isDeleted() const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Toplevel::isOnCurrentActivity() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Toplevel::elevate(bool elevate)
|
void Toplevel::elevate(bool elevate)
|
||||||
{
|
{
|
||||||
if (!effectWindow()) {
|
if (!effectWindow()) {
|
||||||
|
|
|
@ -149,7 +149,6 @@ class Toplevel
|
||||||
* See http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .
|
* See http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .
|
||||||
*/
|
*/
|
||||||
Q_PROPERTY(int windowType READ windowType)
|
Q_PROPERTY(int windowType READ windowType)
|
||||||
Q_PROPERTY(QStringList activities READ activities NOTIFY activitiesChanged)
|
|
||||||
/**
|
/**
|
||||||
* Whether this Toplevel is managed by KWin (it has control over its placement and other
|
* Whether this Toplevel is managed by KWin (it has control over its placement and other
|
||||||
* aspects, as opposed to override-redirect windows that are entirely handled by the application).
|
* aspects, as opposed to override-redirect windows that are entirely handled by the application).
|
||||||
|
@ -213,13 +212,9 @@ public:
|
||||||
bool isDNDIcon() const;
|
bool isDNDIcon() const;
|
||||||
|
|
||||||
virtual int desktop() const = 0;
|
virtual int desktop() const = 0;
|
||||||
virtual QStringList activities() const = 0;
|
|
||||||
bool isOnDesktop(int d) const;
|
bool isOnDesktop(int d) const;
|
||||||
bool isOnActivity(const QString &activity) const;
|
|
||||||
bool isOnCurrentDesktop() const;
|
bool isOnCurrentDesktop() const;
|
||||||
bool isOnCurrentActivity() const;
|
|
||||||
bool isOnAllDesktops() const;
|
bool isOnAllDesktops() const;
|
||||||
bool isOnAllActivities() const;
|
|
||||||
|
|
||||||
QByteArray windowRole() const;
|
QByteArray windowRole() const;
|
||||||
QByteArray sessionId() const;
|
QByteArray sessionId() const;
|
||||||
|
@ -335,7 +330,6 @@ signals:
|
||||||
* schedule a repaint of the scene.
|
* schedule a repaint of the scene.
|
||||||
**/
|
**/
|
||||||
void needsRepaint();
|
void needsRepaint();
|
||||||
void activitiesChanged(KWin::Toplevel* toplevel);
|
|
||||||
/**
|
/**
|
||||||
* Emitted whenever the Toplevel's screen changes. This can happen either in consequence to
|
* Emitted whenever the Toplevel's screen changes. This can happen either in consequence to
|
||||||
* a screen being removed/added or if the Toplevel's geometry changes.
|
* a screen being removed/added or if the Toplevel's geometry changes.
|
||||||
|
@ -613,21 +607,11 @@ inline bool Toplevel::isOnAllDesktops() const
|
||||||
return desktop() == NET::OnAllDesktops;
|
return desktop() == NET::OnAllDesktops;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool Toplevel::isOnAllActivities() const
|
|
||||||
{
|
|
||||||
return activities().isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool Toplevel::isOnDesktop(int d) const
|
inline bool Toplevel::isOnDesktop(int d) const
|
||||||
{
|
{
|
||||||
return desktop() == d || /*desk == 0 ||*/ isOnAllDesktops();
|
return desktop() == d || /*desk == 0 ||*/ isOnAllDesktops();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool Toplevel::isOnActivity(const QString &activity) const
|
|
||||||
{
|
|
||||||
return activities().isEmpty() || activities().contains(activity);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool Toplevel::isOnCurrentDesktop() const
|
inline bool Toplevel::isOnCurrentDesktop() const
|
||||||
{
|
{
|
||||||
return isOnDesktop(VirtualDesktopManager::self()->current());
|
return isOnDesktop(VirtualDesktopManager::self()->current());
|
||||||
|
|
|
@ -160,13 +160,9 @@ void UserActionsMenu::show(const QRect &pos, const QWeakPointer<Client> &cl)
|
||||||
int x = pos.left();
|
int x = pos.left();
|
||||||
int y = pos.bottom();
|
int y = pos.bottom();
|
||||||
if (y == pos.top()) {
|
if (y == pos.top()) {
|
||||||
m_client.data()->blockActivityUpdates(true);
|
|
||||||
m_menu->exec(QPoint(x, y));
|
m_menu->exec(QPoint(x, y));
|
||||||
if (!m_client.isNull())
|
|
||||||
m_client.data()->blockActivityUpdates(false);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_client.data()->blockActivityUpdates(true);
|
|
||||||
QRect area = ws->clientArea(ScreenArea, QPoint(x, y), VirtualDesktopManager::self()->current());
|
QRect area = ws->clientArea(ScreenArea, QPoint(x, y), VirtualDesktopManager::self()->current());
|
||||||
menuAboutToShow(); // needed for sizeHint() to be correct :-/
|
menuAboutToShow(); // needed for sizeHint() to be correct :-/
|
||||||
int popupHeight = m_menu->sizeHint().height();
|
int popupHeight = m_menu->sizeHint().height();
|
||||||
|
@ -174,8 +170,6 @@ void UserActionsMenu::show(const QRect &pos, const QWeakPointer<Client> &cl)
|
||||||
m_menu->exec(QPoint(x, y));
|
m_menu->exec(QPoint(x, y));
|
||||||
else
|
else
|
||||||
m_menu->exec(QPoint(x, pos.top() - popupHeight));
|
m_menu->exec(QPoint(x, pos.top() - popupHeight));
|
||||||
if (!m_client.isNull())
|
|
||||||
m_client.data()->blockActivityUpdates(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1158,7 +1152,7 @@ bool Client::performMouseCommand(Options::MouseCommand command, const QPoint &gl
|
||||||
Client *c = qobject_cast<Client*>(*it);
|
Client *c = qobject_cast<Client*>(*it);
|
||||||
if (!c || (c->keepAbove() && !keepAbove()) || (keepBelow() && !c->keepBelow()))
|
if (!c || (c->keepAbove() && !keepAbove()) || (keepBelow() && !c->keepBelow()))
|
||||||
continue; // can never raise above "it"
|
continue; // can never raise above "it"
|
||||||
mustReplay = !(c->isOnCurrentDesktop() && c->isOnCurrentActivity() && c->geometry().intersects(geometry()));
|
mustReplay = !(c->isOnCurrentDesktop() && c->geometry().intersects(geometry()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
workspace()->takeActivity(this, ActivityFocus | ActivityRaise, handled && replay);
|
workspace()->takeActivity(this, ActivityFocus | ActivityRaise, handled && replay);
|
||||||
|
@ -1652,7 +1646,7 @@ void Workspace::switchWindow(Direction direction)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (client->wantsTabFocus() && *i != c &&
|
if (client->wantsTabFocus() && *i != c &&
|
||||||
client->desktop() == d && !client->isMinimized() && (*i)->isOnCurrentActivity()) {
|
client->desktop() == d && !client->isMinimized()) {
|
||||||
// Centre of the other window
|
// Centre of the other window
|
||||||
QPoint other(client->pos().x() + client->geometry().width() / 2,
|
QPoint other(client->pos().x() + client->geometry().width() / 2,
|
||||||
client->pos().y() + client->geometry().height() / 2);
|
client->pos().y() + client->geometry().height() / 2);
|
||||||
|
|
|
@ -930,7 +930,7 @@ void Workspace::updateClientVisibilityOnDesktopChange(uint oldDesktop, uint newD
|
||||||
if (!c) {
|
if (!c) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!c->isOnDesktop(newDesktop) && c != movingClient && c->isOnCurrentActivity()) {
|
if (!c->isOnDesktop(newDesktop) && c != movingClient) {
|
||||||
if (c->isShown(true) && c->isOnDesktop(oldDesktop) && !compositing())
|
if (c->isShown(true) && c->isOnDesktop(oldDesktop) && !compositing())
|
||||||
obs_wins.create(c);
|
obs_wins.create(c);
|
||||||
(c)->updateVisibility();
|
(c)->updateVisibility();
|
||||||
|
@ -948,7 +948,7 @@ void Workspace::updateClientVisibilityOnDesktopChange(uint oldDesktop, uint newD
|
||||||
if (!c) {
|
if (!c) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (c->isOnDesktop(newDesktop) && c->isOnCurrentActivity())
|
if (c->isOnDesktop(newDesktop))
|
||||||
c->updateVisibility();
|
c->updateVisibility();
|
||||||
}
|
}
|
||||||
--block_showing_desktop;
|
--block_showing_desktop;
|
||||||
|
@ -999,8 +999,7 @@ Client *Workspace::findClientToActivateOnDesktop(uint desktop)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(client->isShown(false) && client->isOnDesktop(desktop) &&
|
if (!(client->isShown(false) && client->isOnDesktop(desktop)))
|
||||||
client->isOnCurrentActivity() && client->isOnActiveScreen()))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (client->geometry().contains(Cursor::pos())) {
|
if (client->geometry().contains(Cursor::pos())) {
|
||||||
|
@ -1013,18 +1012,6 @@ Client *Workspace::findClientToActivateOnDesktop(uint desktop)
|
||||||
return FocusChain::self()->getForActivation(desktop);
|
return FocusChain::self()->getForActivation(desktop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the current activity when it changes
|
|
||||||
* do *not* call this directly; it does not set the activity.
|
|
||||||
*
|
|
||||||
* Shows/Hides windows according to the stacking order
|
|
||||||
*/
|
|
||||||
|
|
||||||
void Workspace::updateCurrentActivity(const QString &new_activity)
|
|
||||||
{
|
|
||||||
Q_UNUSED(new_activity)
|
|
||||||
}
|
|
||||||
|
|
||||||
void Workspace::moveClientsFromRemovedDesktops()
|
void Workspace::moveClientsFromRemovedDesktops()
|
||||||
{
|
{
|
||||||
for (ClientList::ConstIterator it = clients.constBegin(); it != clients.constEnd(); ++it) {
|
for (ClientList::ConstIterator it = clients.constBegin(); it != clients.constEnd(); ++it) {
|
||||||
|
@ -1127,12 +1114,6 @@ void Workspace::sendPingToWindow(xcb_window_t window, xcb_timestamp_t timestamp)
|
||||||
rootInfo()->sendPing(window, timestamp);
|
rootInfo()->sendPing(window, timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Workspace::sendTakeActivity(KWin::Client *c, xcb_timestamp_t timestamp, long int flags)
|
|
||||||
{
|
|
||||||
rootInfo()->takeActivity(c->window(), timestamp, flags);
|
|
||||||
pending_take_activity = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delayed focus functions
|
* Delayed focus functions
|
||||||
*/
|
*/
|
||||||
|
@ -1172,6 +1153,12 @@ void Workspace::focusToNull()
|
||||||
m_nullFocus->focus();
|
m_nullFocus->focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Workspace::sendTakeActivity(KWin::Client *c, xcb_timestamp_t timestamp, long int flags)
|
||||||
|
{
|
||||||
|
rootInfo()->takeActivity(c->window(), timestamp, flags);
|
||||||
|
pending_take_activity = c;
|
||||||
|
}
|
||||||
|
|
||||||
void Workspace::setShowingDesktop(bool showing)
|
void Workspace::setShowingDesktop(bool showing)
|
||||||
{
|
{
|
||||||
rootInfo()->setShowingDesktop(showing);
|
rootInfo()->setShowingDesktop(showing);
|
||||||
|
@ -1190,7 +1177,7 @@ void Workspace::setShowingDesktop(bool showing)
|
||||||
if (!c) {
|
if (!c) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (c->isOnCurrentActivity() && c->isOnCurrentDesktop() && c->isShown(true) && !c->isSpecialWindow())
|
if (c->isOnCurrentDesktop() && c->isShown(true) && !c->isSpecialWindow())
|
||||||
showing_desktop_clients.prepend(c); // Topmost first to reduce flicker
|
showing_desktop_clients.prepend(c); // Topmost first to reduce flicker
|
||||||
}
|
}
|
||||||
for (ClientList::ConstIterator it = showing_desktop_clients.constBegin();
|
for (ClientList::ConstIterator it = showing_desktop_clients.constBegin();
|
||||||
|
|
|
@ -381,7 +381,6 @@ private slots:
|
||||||
void delayFocus();
|
void delayFocus();
|
||||||
void slotBlockShortcuts(int data);
|
void slotBlockShortcuts(int data);
|
||||||
void slotReloadConfig();
|
void slotReloadConfig();
|
||||||
void updateCurrentActivity(const QString &new_activity);
|
|
||||||
// virtual desktop handling
|
// virtual desktop handling
|
||||||
void moveClientsFromRemovedDesktops();
|
void moveClientsFromRemovedDesktops();
|
||||||
void slotDesktopCountChanged(uint previousCount, uint newCount);
|
void slotDesktopCountChanged(uint previousCount, uint newCount);
|
||||||
|
|
|
@ -256,16 +256,6 @@ public:
|
||||||
*/
|
*/
|
||||||
QRect geometry() const;
|
QRect geometry() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the task's window is on the current activity.
|
|
||||||
*/
|
|
||||||
bool isOnCurrentActivity() const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the task's window is on all activities
|
|
||||||
*/
|
|
||||||
bool isOnAllActivities() const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the activities on which this task's window resides.
|
* Returns the activities on which this task's window resides.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -526,7 +526,6 @@ void Tasks::createConfigurationInterface(KConfigDialog *parent)
|
||||||
m_ui.sortingStrategy->addItem(i18n("Manually"),QVariant(TaskManager::GroupManager::ManualSorting));
|
m_ui.sortingStrategy->addItem(i18n("Manually"),QVariant(TaskManager::GroupManager::ManualSorting));
|
||||||
m_ui.sortingStrategy->addItem(i18n("Alphabetically"),QVariant(TaskManager::GroupManager::AlphaSorting));
|
m_ui.sortingStrategy->addItem(i18n("Alphabetically"),QVariant(TaskManager::GroupManager::AlphaSorting));
|
||||||
m_ui.sortingStrategy->addItem(i18n("By Desktop"),QVariant(TaskManager::GroupManager::DesktopSorting));
|
m_ui.sortingStrategy->addItem(i18n("By Desktop"),QVariant(TaskManager::GroupManager::DesktopSorting));
|
||||||
m_ui.sortingStrategy->addItem(i18n("By Activity"),QVariant(TaskManager::GroupManager::ActivitySorting));
|
|
||||||
|
|
||||||
switch (m_groupManager->sortingStrategy()) {
|
switch (m_groupManager->sortingStrategy()) {
|
||||||
case TaskManager::GroupManager::NoSorting:
|
case TaskManager::GroupManager::NoSorting:
|
||||||
|
|
Loading…
Add table
Reference in a new issue