aboutsummaryrefslogtreecommitdiff
path: root/src/Gnome.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gnome.cc')
-rw-r--r--src/Gnome.cc30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/Gnome.cc b/src/Gnome.cc
index 91a0aef..0c3b6f1 100644
--- a/src/Gnome.cc
+++ b/src/Gnome.cc
@@ -98,40 +98,30 @@ void Gnome::initForScreen(BScreen &screen) {
98 98
99void Gnome::setupFrame(FluxboxWindow &win) { 99void Gnome::setupFrame(FluxboxWindow &win) {
100 // load gnome state (take queues from the main window of the frame) 100 // load gnome state (take queues from the main window of the frame)
101 Atom ret_type; 101 long flags;
102 int fmt; 102 bool exists;
103 unsigned long nitems, bytes_after; 103 flags=win.winClient().cardinalProperty(m_gnome_wm_win_state,&exists);
104 long flags, *data = 0; 104 if (exists) {
105
106 if (win.winClient().property(m_gnome_wm_win_state, 0, 1, False, XA_CARDINAL,
107 &ret_type, &fmt, &nitems, &bytes_after,
108 (unsigned char **) &data) && data) {
109 flags = *data;
110 setState(&win, flags); 105 setState(&win, flags);
111 XFree (data);
112 } else { 106 } else {
113 updateState(win); 107 updateState(win);
114 } 108 }
115 109
116 // load gnome layer atom 110 // load gnome layer atom
117 if (win.winClient().property(m_gnome_wm_win_layer, 0, 1, False, XA_CARDINAL, 111 flags=win.winClient().cardinalProperty(m_gnome_wm_win_layer,&exists);
118 &ret_type, &fmt, &nitems, &bytes_after, 112 if (exists) {
119 (unsigned char **) &data) && data) {
120 flags = *data;
121 setLayer(&win, flags); 113 setLayer(&win, flags);
122 XFree (data);
123 } else { 114 } else {
124 updateLayer(win); 115 updateLayer(win);
125 } 116 }
126 117
127 // load gnome workspace atom 118 // load gnome workspace atom
128 if (win.winClient().property(m_gnome_wm_win_workspace, 0, 1, False, XA_CARDINAL, 119 flags=win.winClient().cardinalProperty(m_gnome_wm_win_workspace,&exists);
129 &ret_type, &fmt, &nitems, &bytes_after, 120 if (exists)
130 (unsigned char **) &data) && data) { 121 {
131 unsigned int workspace_num = *data; 122 unsigned int workspace_num = flags;
132 if (win.workspaceNumber() != workspace_num) 123 if (win.workspaceNumber() != workspace_num)
133 win.setWorkspace(workspace_num); 124 win.setWorkspace(workspace_num);
134 XFree (data);
135 } else { 125 } else {
136 updateWorkspace(win); 126 updateWorkspace(win);
137 } 127 }