aboutsummaryrefslogtreecommitdiff
path: root/src/Gnome.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gnome.cc')
-rw-r--r--src/Gnome.cc34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/Gnome.cc b/src/Gnome.cc
index ab08ea1..2059839 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.30 2003/07/17 17:56:28 rathnor Exp $ 22// $Id: Gnome.cc,v 1.31 2003/07/28 15:06:33 rathnor Exp $
23 23
24#include "Gnome.hh" 24#include "Gnome.hh"
25 25
@@ -278,22 +278,22 @@ void Gnome::updateHints(FluxboxWindow &win) {
278 278
279} 279}
280 280
281bool Gnome::checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, FluxboxWindow * const win) { 281bool Gnome::checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, WinClient * const winclient) {
282 if (ce.message_type == m_gnome_wm_win_workspace) { 282 if (ce.message_type == m_gnome_wm_win_workspace) {
283#ifdef DEBUG 283#ifdef DEBUG
284 cerr<<__FILE__<<"("<<__LINE__<<"): Got workspace atom="<<ce.data.l[0]<<endl; 284 cerr<<__FILE__<<"("<<__LINE__<<"): Got workspace atom="<<ce.data.l[0]<<endl;
285#endif//!DEBUG 285#endif//!DEBUG
286 if ( win !=0 && // the message sent to client window? 286 if ( winclient !=0 && // the message sent to client window?
287 ce.data.l[0] >= 0 && 287 ce.data.l[0] >= 0 &&
288 ce.data.l[0] < (signed)win->screen().getCount()) { 288 ce.data.l[0] < (signed)winclient->screen().getCount()) {
289 win->screen().changeWorkspaceID(ce.data.l[0]); 289 winclient->screen().changeWorkspaceID(ce.data.l[0]);
290 290
291 } else if (screen!=0 && //the message sent to root window? 291 } else if (screen!=0 && //the message sent to root window?
292 ce.data.l[0] >= 0 && 292 ce.data.l[0] >= 0 &&
293 ce.data.l[0] < (signed)screen->getCount()) 293 ce.data.l[0] < (signed)screen->getCount())
294 screen->changeWorkspaceID(ce.data.l[0]); 294 screen->changeWorkspaceID(ce.data.l[0]);
295 return true; 295 return true;
296 } else if (win == 0) 296 } else if (winclient == 0)
297 return false; 297 return false;
298 298
299 299
@@ -308,15 +308,16 @@ bool Gnome::checkClientMessage(const XClientMessageEvent &ce, BScreen * screen,
308 cerr<<"New members:"<<ce.data.l[1]<<endl; 308 cerr<<"New members:"<<ce.data.l[1]<<endl;
309#endif // DEBUG 309#endif // DEBUG
310 310
311 //get new states 311 if (winclient && winclient->fbwindow()) {
312 int flag = ce.data.l[0] & ce.data.l[1]; 312 //get new states
313 //don't update this when when we set new state 313 int flag = ce.data.l[0] & ce.data.l[1];
314 disableUpdate(); 314 //don't update this when when we set new state
315 // convert to Fluxbox state 315 disableUpdate();
316 setState(win, flag); 316 // convert to Fluxbox state
317 // enable update of atom states 317 setState(winclient->fbwindow(), flag);
318 enableUpdate(); 318 // enable update of atom states
319 319 enableUpdate();
320 }
320 } else if (ce.message_type == m_gnome_wm_win_hints) { 321 } else if (ce.message_type == m_gnome_wm_win_hints) {
321#ifdef DEBUG 322#ifdef DEBUG
322 cerr<<__FILE__<<"("<<__LINE__<<"): _WIN_HINTS"<<endl; 323 cerr<<__FILE__<<"("<<__LINE__<<"): _WIN_HINTS"<<endl;
@@ -327,7 +328,8 @@ bool Gnome::checkClientMessage(const XClientMessageEvent &ce, BScreen * screen,
327 cerr<<__FILE__<<"("<<__LINE__<<"): _WIN_LAYER"<<endl; 328 cerr<<__FILE__<<"("<<__LINE__<<"): _WIN_LAYER"<<endl;
328#endif // DEBUG 329#endif // DEBUG
329 330
330 setLayer(win, ce.data.l[0]); 331 if (winclient && winclient->fbwindow())
332 setLayer(winclient->fbwindow(), ce.data.l[0]);
331 } else 333 } else
332 return false; //the gnome atom wasn't found or not supported 334 return false; //the gnome atom wasn't found or not supported
333 335