Skip to content

Commit

Permalink
Do not set _NET_NUMBER_OF_DESKTOPS in standalone mode #1
Browse files Browse the repository at this point in the history
  • Loading branch information
jaelpark committed Jun 8, 2021
1 parent 30b40d6 commit d7a2913
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ void X11Client::Kill(){
X11Container::X11Container(X11Backend *_pbackend, bool _noComp) : WManager::Container(), pbackend(_pbackend), noComp(_noComp){
//
uint values[1] = {WManager::Container::rootQueue.size()};
xcb_change_property(pbackend->pcon,XCB_PROP_MODE_REPLACE,pbackend->pscr->root,pbackend->ewmh._NET_NUMBER_OF_DESKTOPS,XCB_ATOM_CARDINAL,32,1,values);
if(!pbackend->standaloneComp)
xcb_change_property(pbackend->pcon,XCB_PROP_MODE_REPLACE,pbackend->pscr->root,pbackend->ewmh._NET_NUMBER_OF_DESKTOPS,XCB_ATOM_CARDINAL,32,1,values);
}

X11Container::X11Container(WManager::Container *_pParent, const WManager::Container::Setup &_setup, X11Backend *_pbackend) : WManager::Container(_pParent,_setup), pbackend(_pbackend), noComp(false){
Expand Down Expand Up @@ -414,7 +415,7 @@ void X11Container::SetClient(X11Client *_pclient11){
pclient = pclient11;
}

X11Backend::X11Backend() : lastTime(XCB_CURRENT_TIME){
X11Backend::X11Backend(bool _standaloneComp) : lastTime(XCB_CURRENT_TIME), standaloneComp(_standaloneComp){
//
}

Expand Down Expand Up @@ -621,7 +622,7 @@ const char *X11Backend::pcursorStrs[CURSOR_COUNT] = {
"left_ptr"
};

Default::Default(bool _standaloneComp) : X11Backend(), pdragClient(0), standaloneComp(_standaloneComp){
Default::Default(bool _standaloneComp) : X11Backend(_standaloneComp), pdragClient(0){
//
clock_gettime(CLOCK_MONOTONIC,&eventTimer);
pollTimer.tv_sec = 0;
Expand Down Expand Up @@ -1860,7 +1861,7 @@ void DebugContainer::SetClient(DebugClient *_pdebugClient){
pclient = _pdebugClient;
}

Debug::Debug() : X11Backend(){
Debug::Debug() : X11Backend(false){
//
}

Expand Down
4 changes: 2 additions & 2 deletions src/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ friend class Compositor::X11Compositor;
friend class Compositor::X11DebugCompositor;
friend class Compositor::TexturePixmap;
public:
X11Backend();
X11Backend(bool);
virtual ~X11Backend();
bool QueryExtension(const char *, sint *, sint *) const;
xcb_atom_t GetAtom(const char *) const;
Expand Down Expand Up @@ -206,6 +206,7 @@ friend class Compositor::TexturePixmap;
WManager::Client *pfocusInClient; //from XCB_FOCUS_IN events (uncontained clients)
protected:
std::deque<std::pair<const WManager::Client *, WManager::Client *>> appendixQueue; //no need to store, rather keep it here to avoid repeated construction
bool standaloneComp;

enum ATOM{
//ATOM_CHAMFER_ALARM,
Expand Down Expand Up @@ -261,7 +262,6 @@ class Default : public X11Backend{
std::vector<xcb_window_t> netClientList; //used only to update the property - not maintained
X11Client *pdragClient;
sint dragRootX, dragRootY;
bool standaloneComp;
};

class DebugClient : public WManager::Client{
Expand Down

0 comments on commit d7a2913

Please sign in to comment.