Active Property
Emit proper signal when the Client's active status changes.
This commit is contained in:
parent
f47e7bb5ef
commit
08ad6c953f
3 changed files with 7 additions and 16 deletions
|
@ -257,9 +257,6 @@ void Workspace::setActiveClient(Client* c, allowed_t)
|
|||
updateColormap();
|
||||
|
||||
emit clientActivated(active_client);
|
||||
if (active_client) {
|
||||
active_client->sl_activated();
|
||||
}
|
||||
--set_active_client_recursion;
|
||||
}
|
||||
|
||||
|
@ -861,6 +858,7 @@ void Client::setActive(bool act)
|
|||
workspace()->updateClientLayer(*it);
|
||||
if (decoration != NULL)
|
||||
decoration->activeChange();
|
||||
emit activeChanged();
|
||||
updateMouseGrab();
|
||||
updateUrgency(); // demand attention again if it's still urgent
|
||||
workspace()->checkUnredirect();
|
||||
|
|
|
@ -1968,11 +1968,6 @@ void Client::getWMHints()
|
|||
updateAllowedActions(); // Group affects isMinimizable()
|
||||
}
|
||||
|
||||
void Client::sl_activated()
|
||||
{
|
||||
emit s_activated();
|
||||
}
|
||||
|
||||
void Client::getMotifHints()
|
||||
{
|
||||
bool mgot_noborder, mnoborder, mresize, mmove, mminimize, mmaximize, mclose;
|
||||
|
|
14
client.h
14
client.h
|
@ -71,8 +71,11 @@ class Client
|
|||
: public Toplevel
|
||||
{
|
||||
Q_OBJECT
|
||||
// TODO: notify signal
|
||||
Q_PROPERTY(bool active READ isActive)
|
||||
/**
|
||||
* Whether this Client is active or not. Use Workspace::activateClient() to activate a Client.
|
||||
* @see Workspace::activateClient
|
||||
**/
|
||||
Q_PROPERTY(bool active READ isActive NOTIFY activeChanged)
|
||||
// TODO: notify signal
|
||||
Q_PROPERTY(QString caption READ caption)
|
||||
// TODO: notify signal
|
||||
|
@ -512,7 +515,6 @@ signals:
|
|||
void s_minimized();
|
||||
void s_unminimized();
|
||||
void maximizeSet(QPair<bool, bool>);
|
||||
void s_activated();
|
||||
void s_fullScreenSet(bool, bool);
|
||||
void clientMaximizedStateChanged(KWin::Client*, KDecorationDefines::MaximizeMode);
|
||||
void clientMinimized(KWin::Client* client, bool animate);
|
||||
|
@ -520,11 +522,7 @@ signals:
|
|||
void clientStartUserMovedResized(KWin::Client*);
|
||||
void clientStepUserMovedResized(KWin::Client *, const QRect&);
|
||||
void clientFinishUserMovedResized(KWin::Client*);
|
||||
|
||||
// To make workspace-client calls, a few slots are also
|
||||
// required
|
||||
public slots:
|
||||
void sl_activated();
|
||||
void activeChanged();
|
||||
|
||||
private:
|
||||
void exportMappingState(int s); // ICCCM 4.1.3.1, 4.1.4, NETWM 2.5.1
|
||||
|
|
Loading…
Reference in a new issue