[kwin] Adjust to changes in NETRootInfo ctor
Takes flag types.
This commit is contained in:
parent
b0c0e81661
commit
b38722dc04
3 changed files with 19 additions and 28 deletions
|
@ -246,8 +246,7 @@ void KWinDesktopConfig::load()
|
||||||
|
|
||||||
if (QX11Info::isPlatformX11()) {
|
if (QX11Info::isPlatformX11()) {
|
||||||
// get number of desktops
|
// get number of desktops
|
||||||
unsigned long properties[] = {NET::NumberOfDesktops | NET::DesktopNames, NET::WM2DesktopLayout };
|
NETRootInfo info(QX11Info::connection(), NET::NumberOfDesktops | NET::DesktopNames, NET::WM2DesktopLayout);
|
||||||
NETRootInfo info(QX11Info::connection(), properties, 2);
|
|
||||||
|
|
||||||
for (int i = 1; i <= maxDesktops; i++) {
|
for (int i = 1; i <= maxDesktops; i++) {
|
||||||
QString name = QString::fromUtf8(info.desktopName(i));
|
QString name = QString::fromUtf8(info.desktopName(i));
|
||||||
|
@ -308,8 +307,7 @@ void KWinDesktopConfig::save()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QX11Info::isPlatformX11()) {
|
if (QX11Info::isPlatformX11()) {
|
||||||
unsigned long properties[] = {NET::NumberOfDesktops | NET::DesktopNames, NET::WM2DesktopLayout };
|
NETRootInfo info(QX11Info::connection(), NET::NumberOfDesktops | NET::DesktopNames, NET::WM2DesktopLayout);
|
||||||
NETRootInfo info(QX11Info::connection(), properties, 2);
|
|
||||||
// set desktop names
|
// set desktop names
|
||||||
for (int i = 1; i <= maxDesktops; i++) {
|
for (int i = 1; i <= maxDesktops; i++) {
|
||||||
QString desktopName = m_desktopNames[ i -1 ];
|
QString desktopName = m_desktopNames[ i -1 ];
|
||||||
|
|
37
netinfo.cpp
37
netinfo.cpp
|
@ -53,8 +53,7 @@ RootInfo *RootInfo::create()
|
||||||
qDebug() << "Error occurred while lowering support window: " << error->error_code;
|
qDebug() << "Error occurred while lowering support window: " << error->error_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long protocols[5] = {
|
const NET::Properties properties = NET::Supported |
|
||||||
NET::Supported |
|
|
||||||
NET::SupportingWMCheck |
|
NET::SupportingWMCheck |
|
||||||
NET::ClientList |
|
NET::ClientList |
|
||||||
NET::ClientListStacking |
|
NET::ClientListStacking |
|
||||||
|
@ -76,9 +75,8 @@ RootInfo *RootInfo::create()
|
||||||
NET::WMPid |
|
NET::WMPid |
|
||||||
NET::WMMoveResize |
|
NET::WMMoveResize |
|
||||||
NET::WMFrameExtents |
|
NET::WMFrameExtents |
|
||||||
NET::WMPing
|
NET::WMPing;
|
||||||
,
|
const NET::WindowTypes types = NET::NormalMask |
|
||||||
NET::NormalMask |
|
|
||||||
NET::DesktopMask |
|
NET::DesktopMask |
|
||||||
NET::DockMask |
|
NET::DockMask |
|
||||||
NET::ToolbarMask |
|
NET::ToolbarMask |
|
||||||
|
@ -86,10 +84,8 @@ RootInfo *RootInfo::create()
|
||||||
NET::DialogMask |
|
NET::DialogMask |
|
||||||
NET::OverrideMask |
|
NET::OverrideMask |
|
||||||
NET::UtilityMask |
|
NET::UtilityMask |
|
||||||
NET::SplashMask
|
NET::SplashMask; // No compositing window types here unless we support them also as managed window types
|
||||||
// No compositing window types here unless we support them also as managed window types
|
const NET::States states = NET::Modal |
|
||||||
,
|
|
||||||
NET::Modal |
|
|
||||||
//NET::Sticky | // Large desktops not supported (and probably never will be)
|
//NET::Sticky | // Large desktops not supported (and probably never will be)
|
||||||
NET::MaxVert |
|
NET::MaxVert |
|
||||||
NET::MaxHoriz |
|
NET::MaxHoriz |
|
||||||
|
@ -101,9 +97,8 @@ RootInfo *RootInfo::create()
|
||||||
NET::Hidden |
|
NET::Hidden |
|
||||||
NET::FullScreen |
|
NET::FullScreen |
|
||||||
NET::KeepBelow |
|
NET::KeepBelow |
|
||||||
NET::DemandsAttention
|
NET::DemandsAttention;
|
||||||
,
|
NET::Properties2 properties2 = NET::WM2UserTime |
|
||||||
NET::WM2UserTime |
|
|
||||||
NET::WM2StartupId |
|
NET::WM2StartupId |
|
||||||
NET::WM2AllowedActions |
|
NET::WM2AllowedActions |
|
||||||
NET::WM2RestackWindow |
|
NET::WM2RestackWindow |
|
||||||
|
@ -114,9 +109,8 @@ RootInfo *RootInfo::create()
|
||||||
NET::WM2DesktopLayout |
|
NET::WM2DesktopLayout |
|
||||||
NET::WM2FullPlacement |
|
NET::WM2FullPlacement |
|
||||||
NET::WM2FullscreenMonitors |
|
NET::WM2FullscreenMonitors |
|
||||||
NET::WM2KDEShadow
|
NET::WM2KDEShadow;
|
||||||
,
|
const NET::Actions actions = NET::ActionMove |
|
||||||
NET::ActionMove |
|
|
||||||
NET::ActionResize |
|
NET::ActionResize |
|
||||||
NET::ActionMinimize |
|
NET::ActionMinimize |
|
||||||
NET::ActionShade |
|
NET::ActionShade |
|
||||||
|
@ -125,15 +119,13 @@ RootInfo *RootInfo::create()
|
||||||
NET::ActionMaxHoriz |
|
NET::ActionMaxHoriz |
|
||||||
NET::ActionFullScreen |
|
NET::ActionFullScreen |
|
||||||
NET::ActionChangeDesktop |
|
NET::ActionChangeDesktop |
|
||||||
NET::ActionClose
|
NET::ActionClose;
|
||||||
,
|
|
||||||
};
|
|
||||||
|
|
||||||
DecorationPlugin *deco = DecorationPlugin::self();
|
DecorationPlugin *deco = DecorationPlugin::self();
|
||||||
if (!deco->isDisabled() && deco->factory()->supports(KDecorationDefines::AbilityExtendIntoClientArea))
|
if (!deco->isDisabled() && deco->factory()->supports(KDecorationDefines::AbilityExtendIntoClientArea))
|
||||||
protocols[ NETRootInfo::PROTOCOLS2 ] |= NET::WM2FrameOverlap;
|
properties2 |= NET::WM2FrameOverlap;
|
||||||
|
|
||||||
s_self = new RootInfo(supportWindow, "KWin", protocols, 5, screen_number);
|
s_self = new RootInfo(supportWindow, "KWin", properties, types, states, properties2, actions, screen_number);
|
||||||
return s_self;
|
return s_self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,8 +138,9 @@ void RootInfo::destroy()
|
||||||
xcb_destroy_window(connection(), supportWindow);
|
xcb_destroy_window(connection(), supportWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
RootInfo::RootInfo(xcb_window_t w, const char *name, unsigned long pr[], int pr_num, int scr)
|
RootInfo::RootInfo(xcb_window_t w, const char *name, NET::Properties properties, NET::WindowTypes types,
|
||||||
: NETRootInfo(connection(), w, name, pr, pr_num, scr)
|
NET::States states, NET::Properties2 properties2, NET::Actions actions, int scr)
|
||||||
|
: NETRootInfo(connection(), w, name, properties, types, states, properties2, actions, scr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ protected:
|
||||||
virtual void changeShowingDesktop(bool showing) override;
|
virtual void changeShowingDesktop(bool showing) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RootInfo(xcb_window_t w, const char* name, unsigned long pr[],
|
RootInfo(xcb_window_t w, const char* name, NET::Properties properties, NET::WindowTypes types,
|
||||||
int pr_num, int scr = -1);
|
NET::States states, NET::Properties2 properties2, NET::Actions actions, int scr = -1);
|
||||||
static RootInfo *s_self;
|
static RootInfo *s_self;
|
||||||
friend RootInfo *rootInfo();
|
friend RootInfo *rootInfo();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue