aboutsummaryrefslogtreecommitdiff
path: root/src/Gnome.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-15 11:17:29 (GMT)
committerfluxgen <fluxgen>2003-05-15 11:17:29 (GMT)
commitcbce8634dde14fd7000fde92e86f4bd4bf3525c2 (patch)
treeb3be6c129906ecb67114616d761184cf3375c891 /src/Gnome.cc
parent93220b5f1abee3057b292abb958a437ebbc707b4 (diff)
downloadfluxbox-cbce8634dde14fd7000fde92e86f4bd4bf3525c2.zip
fluxbox-cbce8634dde14fd7000fde92e86f4bd4bf3525c2.tar.bz2
cleaning in FluxboxWindow interface
Diffstat (limited to 'src/Gnome.cc')
-rw-r--r--src/Gnome.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Gnome.cc b/src/Gnome.cc
index 72e8ddd..004e95a 100644
--- a/src/Gnome.cc
+++ b/src/Gnome.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Gnome.cc,v 1.22 2003/05/11 17:11:58 fluxgen Exp $ 22// $Id: Gnome.cc,v 1.23 2003/05/15 11:17:27 fluxgen Exp $
23 23
24#include "Gnome.hh" 24#include "Gnome.hh"
25 25
@@ -92,7 +92,7 @@ void Gnome::setupWindow(FluxboxWindow &win) {
92 unsigned long nitems, bytes_after; 92 unsigned long nitems, bytes_after;
93 long flags, *data = 0; 93 long flags, *data = 0;
94 94
95 if (XGetWindowProperty(disp, win.getClientWindow(), 95 if (XGetWindowProperty(disp, win.clientWindow(),
96 m_gnome_wm_win_state, 0, 1, False, XA_CARDINAL, 96 m_gnome_wm_win_state, 0, 1, False, XA_CARDINAL,
97 &ret_type, &fmt, &nitems, &bytes_after, 97 &ret_type, &fmt, &nitems, &bytes_after,
98 (unsigned char **) &data) == Success && data) { 98 (unsigned char **) &data) == Success && data) {
@@ -102,7 +102,7 @@ void Gnome::setupWindow(FluxboxWindow &win) {
102 } 102 }
103 103
104 // load gnome layer atom 104 // load gnome layer atom
105 if (XGetWindowProperty(disp, win.getClientWindow(), 105 if (XGetWindowProperty(disp, win.clientWindow(),
106 m_gnome_wm_win_layer, 0, 1, False, XA_CARDINAL, 106 m_gnome_wm_win_layer, 0, 1, False, XA_CARDINAL,
107 &ret_type, &fmt, &nitems, &bytes_after, 107 &ret_type, &fmt, &nitems, &bytes_after,
108 (unsigned char **) &data) == Success && data) { 108 (unsigned char **) &data) == Success && data) {
@@ -112,12 +112,12 @@ void Gnome::setupWindow(FluxboxWindow &win) {
112 } 112 }
113 113
114 // load gnome workspace atom 114 // load gnome workspace atom
115 if (XGetWindowProperty(disp, win.getClientWindow(), 115 if (XGetWindowProperty(disp, win.clientWindow(),
116 m_gnome_wm_win_workspace, 0, 1, False, XA_CARDINAL, 116 m_gnome_wm_win_workspace, 0, 1, False, XA_CARDINAL,
117 &ret_type, &fmt, &nitems, &bytes_after, 117 &ret_type, &fmt, &nitems, &bytes_after,
118 (unsigned char **) &data) == Success && data) { 118 (unsigned char **) &data) == Success && data) {
119 unsigned int workspace_num = *data; 119 unsigned int workspace_num = *data;
120 if (win.getWorkspaceNumber() != workspace_num) 120 if (win.workspaceNumber() != workspace_num)
121 win.screen().reassociateWindow(&win, workspace_num, false); 121 win.screen().reassociateWindow(&win, workspace_num, false);
122 XFree (data); 122 XFree (data);
123 } 123 }
@@ -222,12 +222,12 @@ void Gnome::updateWorkspaceCount(BScreen &screen) {
222} 222}
223 223
224void Gnome::updateWorkspace(FluxboxWindow &win) { 224void Gnome::updateWorkspace(FluxboxWindow &win) {
225 int val = win.getWorkspaceNumber(); 225 int val = win.workspaceNumber();
226#ifdef DEBUG 226#ifdef DEBUG
227 cerr<<__FILE__<<"("<<__LINE__<<"): setting workspace("<<val<< 227 cerr<<__FILE__<<"("<<__LINE__<<"): setting workspace("<<val<<
228 ") for window("<<&win<<")"<<endl; 228 ") for window("<<&win<<")"<<endl;
229#endif // DEBUG 229#endif // DEBUG
230 XChangeProperty(FbTk::App::instance()->display(), win.getClientWindow(), 230 XChangeProperty(FbTk::App::instance()->display(), win.clientWindow(),
231 m_gnome_wm_win_workspace, 231 m_gnome_wm_win_workspace,
232 XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&val, 1); 232 XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&val, 1);
233} 233}
@@ -242,7 +242,7 @@ void Gnome::updateState(FluxboxWindow &win) {
242 if (win.isShaded()) 242 if (win.isShaded())
243 state |= WIN_STATE_SHADED; 243 state |= WIN_STATE_SHADED;
244 244
245 XChangeProperty(FbTk::App::instance()->display(), win.getClientWindow(), 245 XChangeProperty(FbTk::App::instance()->display(), win.clientWindow(),
246 m_gnome_wm_win_state, 246 m_gnome_wm_win_state,
247 XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&state, 1); 247 XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&state, 1);
248} 248}
@@ -250,8 +250,8 @@ void Gnome::updateState(FluxboxWindow &win) {
250void Gnome::updateLayer(FluxboxWindow &win) { 250void Gnome::updateLayer(FluxboxWindow &win) {
251 //TODO - map from flux layers to gnome ones 251 //TODO - map from flux layers to gnome ones
252 // our layers are in the opposite direction to GNOME 252 // our layers are in the opposite direction to GNOME
253 int layernum = Fluxbox::instance()->getDesktopLayer() - win.getLayerNum(); 253 int layernum = Fluxbox::instance()->getDesktopLayer() - win.layerNum();
254 XChangeProperty(FbTk::App::instance()->display(), win.getClientWindow(), 254 XChangeProperty(FbTk::App::instance()->display(), win.clientWindow(),
255 m_gnome_wm_win_layer, 255 m_gnome_wm_win_layer,
256 XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&layernum, 1); 256 XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&layernum, 1);
257 257