diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fluxbox.cc | 68 |
1 files changed, 59 insertions, 9 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 569af96..bdc207c 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.28 2002/02/06 17:12:09 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.29 2002/02/07 14:23:01 fluxgen Exp $ |
26 | 26 | ||
27 | //Use some GNU extensions | 27 | //Use some GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -579,8 +579,11 @@ void Fluxbox::process_event(XEvent *e) { | |||
579 | case UnmapNotify: | 579 | case UnmapNotify: |
580 | { | 580 | { |
581 | 581 | ||
582 | FluxboxWindow *win = (FluxboxWindow *) 0; | 582 | FluxboxWindow *win = 0; |
583 | 583 | #ifdef DEBUG | |
584 | cerr<<__FILE__<<"("<<__LINE__<<"): Unmapnotify 0x"<<hex<< | ||
585 | e->xunmap.window<<dec<<endl; | ||
586 | #endif | ||
584 | #ifdef SLIT | 587 | #ifdef SLIT |
585 | Slit *slit = (Slit *) 0; | 588 | Slit *slit = (Slit *) 0; |
586 | #endif // SLIT | 589 | #endif // SLIT |
@@ -589,8 +592,9 @@ void Fluxbox::process_event(XEvent *e) { | |||
589 | // only process windows with StructureNotify selected | 592 | // only process windows with StructureNotify selected |
590 | // (ignore SubstructureNotify) | 593 | // (ignore SubstructureNotify) |
591 | if (win->getClientWindow() != e->xunmap.window || | 594 | if (win->getClientWindow() != e->xunmap.window || |
592 | win->isTransient()) | 595 | win->isTransient()) { |
593 | win->unmapNotifyEvent(&e->xunmap); | 596 | win->unmapNotifyEvent(&e->xunmap); |
597 | } | ||
594 | #ifdef SLIT | 598 | #ifdef SLIT |
595 | } else if ((slit = searchSlit(e->xunmap.window))!=0) { | 599 | } else if ((slit = searchSlit(e->xunmap.window))!=0) { |
596 | slit->removeClient(e->xunmap.window); | 600 | slit->removeClient(e->xunmap.window); |
@@ -598,9 +602,7 @@ void Fluxbox::process_event(XEvent *e) { | |||
598 | cerr<<__FILE__<<"("<<__LINE__<<"): Here"<<endl; | 602 | cerr<<__FILE__<<"("<<__LINE__<<"): Here"<<endl; |
599 | #endif | 603 | #endif |
600 | #endif // SLIT | 604 | #endif // SLIT |
601 | |||
602 | } | 605 | } |
603 | |||
604 | } | 606 | } |
605 | break; | 607 | break; |
606 | case CreateNotify: | 608 | case CreateNotify: |
@@ -962,7 +964,9 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) { | |||
962 | //----------------------------------------- | 964 | //----------------------------------------- |
963 | void Fluxbox::handleClientMessage(XClientMessageEvent &ce) { | 965 | void Fluxbox::handleClientMessage(XClientMessageEvent &ce) { |
964 | #ifdef DEBUG | 966 | #ifdef DEBUG |
965 | cerr<<__FILE__<<"("<<__LINE__<<"): ClientMessage. data.l[0]="<<ce.data.l[0]<<endl; | 967 | cerr<<__FILE__<<"("<<__LINE__<<"): ClientMessage. data.l[0]=0x"<<hex<<ce.data.l[0]<< |
968 | " type=0x"<<ce.message_type<<dec<<endl; | ||
969 | |||
966 | #endif | 970 | #endif |
967 | 971 | ||
968 | if (ce.format != 32) | 972 | if (ce.format != 32) |
@@ -1333,10 +1337,56 @@ bool Fluxbox::checkGnomeAtoms(XClientMessageEvent &ce) { | |||
1333 | 1337 | ||
1334 | } else if ((screen = searchScreen(ce.window))!=0 && //the message sent to root window? | 1338 | } else if ((screen = searchScreen(ce.window))!=0 && //the message sent to root window? |
1335 | ce.data.l[0] >= 0 && | 1339 | ce.data.l[0] >= 0 && |
1336 | ce.data.l[0] < screen->getCount()) { | 1340 | ce.data.l[0] < screen->getCount()) |
1337 | |||
1338 | screen->changeWorkspaceID(ce.data.l[0]); | 1341 | screen->changeWorkspaceID(ce.data.l[0]); |
1342 | |||
1343 | } else if (ce.message_type == getGnomeStateAtom()) { | ||
1344 | #ifdef DEBUG | ||
1345 | cerr<<__FILE__<<"("<<__LINE__<<"): _WIN_STATE"<<endl; | ||
1346 | #endif | ||
1347 | FluxboxWindow *win = 0; | ||
1348 | |||
1349 | if ((win = searchWindow(ce.window))!=0) { | ||
1350 | cerr<<__FILE__<<"("<<__LINE__<<"): Mask of members to change:"<< | ||
1351 | hex<<ce.data.l[0]<<dec<<endl; // mask_of_members_to_change | ||
1352 | cerr<<"New members:"<<ce.data.l[1]<<endl; | ||
1353 | if (ce.data.l[0] & BaseDisplay::WIN_STATE_STICKY) { | ||
1354 | cerr<<"Sticky"<<endl; | ||
1355 | if (!win->isStuck()) | ||
1356 | win->stick(); | ||
1357 | } else if (win->isStuck()) | ||
1358 | win->stick(); | ||
1359 | |||
1360 | if (ce.data.l[0] & BaseDisplay::WIN_STATE_MINIMIZED) { | ||
1361 | cerr<<"Minimized"<<endl; | ||
1362 | if (!win->isIconic()) | ||
1363 | win->iconify(); | ||
1364 | } else if (win->isIconic()) | ||
1365 | win->deiconify(true, true); | ||
1366 | |||
1367 | if (ce.data.l[0] & BaseDisplay::WIN_STATE_MAXIMIZED_VERT) | ||
1368 | cerr<<"Maximize Vert"<<endl; | ||
1369 | if (ce.data.l[0] & BaseDisplay::WIN_STATE_MAXIMIZED_HORIZ) | ||
1370 | cerr<<"Maximize Horiz"<<endl; | ||
1371 | if (ce.data.l[0] & BaseDisplay::WIN_STATE_HIDDEN) | ||
1372 | cerr<<"Hidden"<<endl; | ||
1373 | if (ce.data.l[0] & BaseDisplay::WIN_STATE_SHADED) { | ||
1374 | cerr<<"Shaded"<<endl; | ||
1375 | if (!win->isShaded()) win->shade(); | ||
1376 | } | ||
1377 | if (ce.data.l[0] & BaseDisplay::WIN_STATE_HID_WORKSPACE) | ||
1378 | cerr<<"HID Workspace"<<endl; | ||
1379 | if (ce.data.l[0] & BaseDisplay::WIN_STATE_HID_TRANSIENT) | ||
1380 | cerr<<"HID Transient"<<endl; | ||
1381 | if (ce.data.l[0] & BaseDisplay::WIN_STATE_FIXED_POSITION) | ||
1382 | cerr<<"Fixed Position"<<endl; | ||
1383 | if (ce.data.l[0] & BaseDisplay::WIN_STATE_ARRANGE_IGNORE) | ||
1384 | cerr<<"Arrange Ignore"<<endl; | ||
1339 | } | 1385 | } |
1386 | } if (ce.message_type == getGnomeHintsAtom()) { | ||
1387 | #ifdef DEBUG | ||
1388 | cerr<<__FILE__<<"("<<__LINE__<<"): _WIN_HINTS"<<endl; | ||
1389 | #endif | ||
1340 | } else | 1390 | } else |
1341 | return false; //no gnome atom | 1391 | return false; //no gnome atom |
1342 | 1392 | ||