[kwin] NETWinInfo2 becomes NETWinInfo
And takes a xcb_connection_t instead of Display. Also our own class is adjusted to no longer need the connection being passed in.
This commit is contained in:
parent
4a4ec0decd
commit
ba66fd9ef6
11 changed files with 15 additions and 15 deletions
|
@ -2277,7 +2277,7 @@ void Client::updateCompositeBlocking(bool readProperty)
|
||||||
{
|
{
|
||||||
if (readProperty) {
|
if (readProperty) {
|
||||||
const unsigned long properties[2] = {0, NET::WM2BlockCompositing};
|
const unsigned long properties[2] = {0, NET::WM2BlockCompositing};
|
||||||
NETWinInfo2 i(display(), window(), rootWindow(), properties, 2);
|
NETWinInfo i(connection(), window(), rootWindow(), properties, 2);
|
||||||
setBlockingCompositing(i.isBlockingCompositing());
|
setBlockingCompositing(i.isBlockingCompositing());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -301,7 +301,7 @@ void Compositor::finish()
|
||||||
++it) {
|
++it) {
|
||||||
// forward all opacity values to the frame in case there'll be other CM running
|
// forward all opacity values to the frame in case there'll be other CM running
|
||||||
if ((*it)->opacity() != 1.0) {
|
if ((*it)->opacity() != 1.0) {
|
||||||
NETWinInfo2 i(display(), (*it)->frameId(), rootWindow(), 0);
|
NETWinInfo i(connection(), (*it)->frameId(), rootWindow(), 0);
|
||||||
i.setOpacity(static_cast< unsigned long >((*it)->opacity() * 0xffffffff));
|
i.setOpacity(static_cast< unsigned long >((*it)->opacity() * 0xffffffff));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -510,7 +510,7 @@ bool Client::windowEvent(xcb_generic_event_t *e)
|
||||||
emit opacityChanged(this, old_opacity);
|
emit opacityChanged(this, old_opacity);
|
||||||
} else {
|
} else {
|
||||||
// forward to the frame if there's possibly another compositing manager running
|
// forward to the frame if there's possibly another compositing manager running
|
||||||
NETWinInfo2 i(display(), frameId(), rootWindow(), 0);
|
NETWinInfo i(connection(), frameId(), rootWindow(), 0);
|
||||||
i.setOpacity(info->opacity());
|
i.setOpacity(info->opacity());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -816,7 +816,7 @@ void Workspace::setClientIsMoving(Client *c)
|
||||||
// (the property with the size of the frame remains on the window after the crash).
|
// (the property with the size of the frame remains on the window after the crash).
|
||||||
void Workspace::fixPositionAfterCrash(xcb_window_t w, const xcb_get_geometry_reply_t *geometry)
|
void Workspace::fixPositionAfterCrash(xcb_window_t w, const xcb_get_geometry_reply_t *geometry)
|
||||||
{
|
{
|
||||||
NETWinInfo i(display(), w, rootWindow(), NET::WMFrameExtents);
|
NETWinInfo i(connection(), w, rootWindow(), NET::WMFrameExtents);
|
||||||
NETStrut frame = i.frameExtents();
|
NETStrut frame = i.frameExtents();
|
||||||
|
|
||||||
if (frame.left != 0 || frame.top != 0) {
|
if (frame.left != 0 || frame.top != 0) {
|
||||||
|
|
|
@ -204,7 +204,7 @@ Group::Group(Window leader_P)
|
||||||
if (leader_P != None) {
|
if (leader_P != None) {
|
||||||
leader_client = workspace()->findClient(WindowMatchPredicate(leader_P));
|
leader_client = workspace()->findClient(WindowMatchPredicate(leader_P));
|
||||||
unsigned long properties[ 2 ] = { 0, NET::WM2StartupId };
|
unsigned long properties[ 2 ] = { 0, NET::WM2StartupId };
|
||||||
leader_info = new NETWinInfo2(display(), leader_P, rootWindow(),
|
leader_info = new NETWinInfo(connection(), leader_P, rootWindow(),
|
||||||
properties, 2);
|
properties, 2);
|
||||||
}
|
}
|
||||||
effect_group = new EffectWindowGroupImpl(this);
|
effect_group = new EffectWindowGroupImpl(this);
|
||||||
|
|
2
group.h
2
group.h
|
@ -60,7 +60,7 @@ private:
|
||||||
ClientList _members;
|
ClientList _members;
|
||||||
Client* leader_client;
|
Client* leader_client;
|
||||||
Window leader_wid;
|
Window leader_wid;
|
||||||
NETWinInfo2* leader_info;
|
NETWinInfo* leader_info;
|
||||||
Time user_time;
|
Time user_time;
|
||||||
int refcount;
|
int refcount;
|
||||||
EffectWindowGroupImpl* effect_group;
|
EffectWindowGroupImpl* effect_group;
|
||||||
|
|
|
@ -100,7 +100,7 @@ bool Client::manage(xcb_window_t w, bool isMapped)
|
||||||
NET::WM2FrameOverlap |
|
NET::WM2FrameOverlap |
|
||||||
0;
|
0;
|
||||||
|
|
||||||
info = new WinInfo(this, display(), m_client, rootWindow(), properties, 2);
|
info = new WinInfo(this, m_client, rootWindow(), properties, 2);
|
||||||
|
|
||||||
m_colormap = attr.colormap;
|
m_colormap = attr.colormap;
|
||||||
|
|
||||||
|
|
|
@ -249,9 +249,9 @@ void RootInfo::changeShowingDesktop(bool showing)
|
||||||
// WinInfo
|
// WinInfo
|
||||||
// ****************************************
|
// ****************************************
|
||||||
|
|
||||||
WinInfo::WinInfo(Client * c, Display * display, Window window,
|
WinInfo::WinInfo(Client * c, xcb_window_t window,
|
||||||
Window rwin, const unsigned long pr[], int pr_size)
|
xcb_window_t rwin, const unsigned long pr[], int pr_size)
|
||||||
: NETWinInfo2(display, window, rwin, pr, pr_size, NET::WindowManager), m_client(c)
|
: NETWinInfo(connection(), window, rwin, pr, pr_size, NET::WindowManager), m_client(c)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,14 +71,14 @@ inline RootInfo *rootInfo()
|
||||||
/**
|
/**
|
||||||
* NET WM Protocol handler class
|
* NET WM Protocol handler class
|
||||||
*/
|
*/
|
||||||
class WinInfo : public NETWinInfo2
|
class WinInfo : public NETWinInfo
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef KWin::Client Client; // Because of NET::Client
|
typedef KWin::Client Client; // Because of NET::Client
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WinInfo(Client* c, Display * display, Window window,
|
WinInfo(Client* c, xcb_window_t window,
|
||||||
Window rwin, const unsigned long pr[], int pr_size);
|
xcb_window_t rwin, const unsigned long pr[], int pr_size);
|
||||||
virtual void changeDesktop(int desktop) override;
|
virtual void changeDesktop(int desktop) override;
|
||||||
virtual void changeFullscreenMonitors(NETFullscreenMonitors topology) override;
|
virtual void changeFullscreenMonitors(NETFullscreenMonitors topology) override;
|
||||||
virtual void changeState(unsigned long state, unsigned long mask) override;
|
virtual void changeState(unsigned long state, unsigned long mask) override;
|
||||||
|
|
|
@ -380,7 +380,7 @@ protected:
|
||||||
QRect geom;
|
QRect geom;
|
||||||
Visual* vis;
|
Visual* vis;
|
||||||
int bit_depth;
|
int bit_depth;
|
||||||
NETWinInfo2* info;
|
NETWinInfo* info;
|
||||||
bool ready_for_painting;
|
bool ready_for_painting;
|
||||||
QRegion repaints_region; // updating, repaint just requires repaint of that area
|
QRegion repaints_region; // updating, repaint just requires repaint of that area
|
||||||
QRegion layer_repaints_region;
|
QRegion layer_repaints_region;
|
||||||
|
|
|
@ -71,7 +71,7 @@ bool Unmanaged::track(Window w)
|
||||||
properties[ NETWinInfo::PROTOCOLS2 ] =
|
properties[ NETWinInfo::PROTOCOLS2 ] =
|
||||||
NET::WM2Opacity |
|
NET::WM2Opacity |
|
||||||
0;
|
0;
|
||||||
info = new NETWinInfo2(display(), w, rootWindow(), properties, 2);
|
info = new NETWinInfo(connection(), w, rootWindow(), properties, 2);
|
||||||
getResourceClass();
|
getResourceClass();
|
||||||
getWindowRole();
|
getWindowRole();
|
||||||
getWmClientLeader();
|
getWmClientLeader();
|
||||||
|
|
Loading…
Reference in a new issue