aboutsummaryrefslogtreecommitdiff
path: root/src/Ewmh.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2006-06-11 13:09:44 (GMT)
committerfluxgen <fluxgen>2006-06-11 13:09:44 (GMT)
commit331a52115dfa5c681b065d226ee796e52b48fed0 (patch)
tree1bd1282d6374431369e5b1fabda314f7ae7298ec /src/Ewmh.cc
parent9699cda56e0877d361a0a79df3a8ebeea5b36f33 (diff)
downloadfluxbox-331a52115dfa5c681b065d226ee796e52b48fed0.zip
fluxbox-331a52115dfa5c681b065d226ee796e52b48fed0.tar.bz2
support for _NET_WM_MOVERESIZE
Diffstat (limited to 'src/Ewmh.cc')
-rw-r--r--src/Ewmh.cc20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index e034aa9..af9343f 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -166,7 +166,7 @@ void Ewmh::initForScreen(BScreen &screen) {
166 m_net_workarea, 166 m_net_workarea,
167 m_net_restack_window, 167 m_net_restack_window,
168 168
169 // m_net_wm_moveresize, 169 m_net_wm_moveresize,
170 170
171 171
172 // desktop properties 172 // desktop properties
@@ -672,7 +672,9 @@ void Ewmh::updateHints(FluxboxWindow &win) {
672} 672}
673 673
674void Ewmh::updateWorkspace(FluxboxWindow &win) { 674void Ewmh::updateWorkspace(FluxboxWindow &win) {
675 long workspace = win.isInitialized() ? win.workspaceNumber() : win.screen().currentWorkspaceID(); 675 long workspace = win.isInitialized() ?
676 win.workspaceNumber() :
677 win.screen().currentWorkspaceID();
676 678
677 if (win.isStuck()) 679 if (win.isStuck())
678 workspace = -1; // appear on all desktops/workspaces 680 workspace = -1; // appear on all desktops/workspaces
@@ -713,7 +715,8 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
713 // which doesn't apply here (so borrow the variable :) ) 715 // which doesn't apply here (so borrow the variable :) )
714 screen = &fbwin->screen(); 716 screen = &fbwin->screen();
715 // valid workspace number? 717 // valid workspace number?
716 if (static_cast<unsigned int>(ce.data.l[0]) < screen->numberOfWorkspaces()) 718 if (static_cast<unsigned int>
719 (ce.data.l[0]) < screen->numberOfWorkspaces())
717 screen->sendToWorkspace(ce.data.l[0], fbwin, false); 720 screen->sendToWorkspace(ce.data.l[0], fbwin, false);
718 721
719 return true; 722 return true;
@@ -846,8 +849,7 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
846 849
847 return true; 850 return true;
848 851
849 } /* Still in progress... 852 } else if (ce.message_type == m_net_wm_moveresize) {
850 else if (ce.message_type == m_net_wm_moveresize) {
851 if (winclient == 0 || winclient->fbwindow() == 0) 853 if (winclient == 0 || winclient->fbwindow() == 0)
852 return true; 854 return true;
853 // data.l[0] = x_root 855 // data.l[0] = x_root
@@ -855,10 +857,6 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
855 // data.l[2] = direction 857 // data.l[2] = direction
856 // data.l[3] = button 858 // data.l[3] = button
857 // data.l[4] = source indication 859 // data.l[4] = source indication
858 cerr<<"("<<ce.data.l[0]<<", "<<ce.data.l[1]<<")"<<endl;
859 cerr<<"dir="<<ce.data.l[2]<<endl;
860 cerr<<"button="<<ce.data.l[3]<<endl;
861 cerr<<"source="<<ce.data.l[4]<<endl;
862 switch (ce.data.l[2] ) { 860 switch (ce.data.l[2] ) {
863 case _NET_WM_MOVERESIZE_SIZE_TOPLEFT: 861 case _NET_WM_MOVERESIZE_SIZE_TOPLEFT:
864 case _NET_WM_MOVERESIZE_SIZE_TOP: 862 case _NET_WM_MOVERESIZE_SIZE_TOP:
@@ -883,7 +881,7 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
883 } 881 }
884 return true; 882 return true;
885 } 883 }
886 */ 884
887 // we didn't handle the ce.message_type here 885 // we didn't handle the ce.message_type here
888 return false; 886 return false;
889} 887}
@@ -929,7 +927,7 @@ void Ewmh::createAtoms() {
929 m_net_moveresize_window = XInternAtom(disp, "_NET_MOVERESIZE_WINDOW", False); 927 m_net_moveresize_window = XInternAtom(disp, "_NET_MOVERESIZE_WINDOW", False);
930 m_net_restack_window = XInternAtom(disp, "_NET_RESTACK_WINDOW", False); 928 m_net_restack_window = XInternAtom(disp, "_NET_RESTACK_WINDOW", False);
931 929
932 // TODO: implement this one 930
933 m_net_wm_moveresize = XInternAtom(disp, "_NET_WM_MOVERESIZE", False); 931 m_net_wm_moveresize = XInternAtom(disp, "_NET_WM_MOVERESIZE", False);
934 932
935 m_net_properties = XInternAtom(disp, "_NET_PROPERTIES", False); 933 m_net_properties = XInternAtom(disp, "_NET_PROPERTIES", False);