aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fluxbox.cc80
1 files changed, 38 insertions, 42 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 6f200db..aefd719 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.68 2002/08/14 23:03:07 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.69 2002/08/16 11:09:25 fluxgen Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -581,7 +581,7 @@ void Fluxbox::process_event(XEvent *e) {
581 break; 581 break;
582 case MapRequest: 582 case MapRequest:
583 { 583 {
584#ifdef DEBUG 584#ifdef DEBUG
585 fprintf(stderr, 585 fprintf(stderr,
586 I18n::instance()-> 586 I18n::instance()->
587 getMessage( 587 getMessage(
@@ -651,7 +651,7 @@ void Fluxbox::process_event(XEvent *e) {
651 case MapNotify: 651 case MapNotify:
652 { 652 {
653 FluxboxWindow *win = searchWindow(e->xmap.window); 653 FluxboxWindow *win = searchWindow(e->xmap.window);
654 if (win!=0) 654 if (win != 0)
655 win->mapNotifyEvent(&e->xmap); 655 win->mapNotifyEvent(&e->xmap);
656 656
657 } 657 }
@@ -659,33 +659,34 @@ void Fluxbox::process_event(XEvent *e) {
659 659
660 660
661 case UnmapNotify: 661 case UnmapNotify:
662 handleUnmapNotify(e->xunmap); 662 handleUnmapNotify(e->xunmap);
663 break; 663 break;
664 case CreateNotify: 664 case CreateNotify:
665 break; 665 break;
666 case DestroyNotify: 666 case DestroyNotify: {
667 {
668 FluxboxWindow *win = (FluxboxWindow *) 0; 667 FluxboxWindow *win = (FluxboxWindow *) 0;
669 668
670 #ifdef SLIT 669#ifdef SLIT
671 Slit *slit = 0; 670 Slit *slit = 0;
672 #endif // SLIT 671#endif // SLIT
673 672
674 if ((win = searchWindow(e->xdestroywindow.window))) { 673 if ((win = searchWindow(e->xdestroywindow.window))) {
675 if (win->destroyNotifyEvent(&e->xdestroywindow)) { 674 if (win->destroyNotifyEvent(&e->xdestroywindow)) {
676 delete win; 675 delete win;
677 win = 0; 676 win = 0;
678 } 677 }
679 #ifdef SLIT 678
680 } else if ((slit = searchSlit(e->xdestroywindow.window))) { 679 }
681 slit->removeClient(e->xdestroywindow.window, False); 680#ifdef SLIT
682 #endif // SLIT 681 else if ((slit = searchSlit(e->xdestroywindow.window))) {
682 slit->removeClient(e->xdestroywindow.window, false);
683
683 } 684 }
685#endif // SLIT
684 686
685 } 687 }
686 break; 688 break;
687 case MotionNotify: 689 case MotionNotify: {
688 {
689 last_time = e->xmotion.time; 690 last_time = e->xmotion.time;
690 691
691 FluxboxWindow *win = 0; 692 FluxboxWindow *win = 0;
@@ -702,8 +703,7 @@ void Fluxbox::process_event(XEvent *e) {
702 703
703 } 704 }
704 break; 705 break;
705 case PropertyNotify: 706 case PropertyNotify: {
706 {
707 707
708 last_time = e->xproperty.time; 708 last_time = e->xproperty.time;
709 709
@@ -716,8 +716,7 @@ void Fluxbox::process_event(XEvent *e) {
716 716
717 } 717 }
718 break; 718 break;
719 case EnterNotify: 719 case EnterNotify: {
720 {
721 last_time = e->xcrossing.time; 720 last_time = e->xcrossing.time;
722 721
723 BScreen *screen = (BScreen *) 0; 722 BScreen *screen = (BScreen *) 0;
@@ -774,7 +773,7 @@ void Fluxbox::process_event(XEvent *e) {
774 } 773 }
775 } 774 }
776 775
777#ifdef SLIT 776#ifdef SLIT
778 else if ((slit = searchSlit(e->xcrossing.window))) 777 else if ((slit = searchSlit(e->xcrossing.window)))
779 slit->enterNotifyEvent(&e->xcrossing); 778 slit->enterNotifyEvent(&e->xcrossing);
780#endif // SLIT 779#endif // SLIT
@@ -829,19 +828,16 @@ void Fluxbox::process_event(XEvent *e) {
829 case KeyPress: 828 case KeyPress:
830 handleKeyEvent(e->xkey); 829 handleKeyEvent(e->xkey);
831 break; 830 break;
832 case ColormapNotify: 831 case ColormapNotify: {
833 {
834 BScreen *screen = searchScreen(e->xcolormap.window); 832 BScreen *screen = searchScreen(e->xcolormap.window);
835 833
836 if (screen) 834 if (screen != 0) {
837 screen->setRootColormapInstalled((e->xcolormap.state == 835 screen->setRootColormapInstalled((e->xcolormap.state ==
838 ColormapInstalled) ? True : False); 836 ColormapInstalled) ? True : False);
839 837 }
840
841 } 838 }
842 break; 839 break;
843 case FocusIn: 840 case FocusIn: {
844 {
845 if (e->xfocus.mode == NotifyUngrab || 841 if (e->xfocus.mode == NotifyUngrab ||
846 e->xfocus.detail == NotifyPointer) 842 e->xfocus.detail == NotifyPointer)
847 break; 843 break;
@@ -850,16 +846,13 @@ void Fluxbox::process_event(XEvent *e) {
850 if (win && ! win->isFocused()) 846 if (win && ! win->isFocused())
851 setFocusedWindow(win); 847 setFocusedWindow(win);
852 848
853 } 849 } break;
854 break;
855 case FocusOut: 850 case FocusOut:
856 break; 851 break;
857
858 case ClientMessage: 852 case ClientMessage:
859 handleClientMessage(e->xclient); 853 handleClientMessage(e->xclient);
860 break; 854 break;
861 default: 855 default: {
862 {
863 856
864 #ifdef SHAPE 857 #ifdef SHAPE
865 if (e->type == getShapeEventBase()) { 858 if (e->type == getShapeEventBase()) {
@@ -1026,28 +1019,29 @@ void Fluxbox::handleUnmapNotify(XUnmapEvent &ue) {
1026 1019
1027 FluxboxWindow *win = 0; 1020 FluxboxWindow *win = 0;
1028 1021
1029 #ifdef SLIT 1022#ifdef SLIT
1030 Slit *slit = (Slit *) 0; 1023 Slit *slit = (Slit *) 0;
1031 #endif // SLIT 1024#endif // SLIT
1032 BScreen *screen = searchScreen(ue.event); 1025 BScreen *screen = searchScreen(ue.event);
1033 1026
1034 if ( (ue.event != ue.window) && (screen != 0 || !ue.send_event)) 1027 if ( (ue.event != ue.window) && (screen != 0 || !ue.send_event))
1035 return; 1028 return;
1036 1029
1037 if ( (win = searchWindow(ue.window)) !=0 ) { 1030 if ((win = searchWindow(ue.window)) != 0) {
1038 1031
1039 if (win->unmapNotifyEvent(&ue)) 1032 if (win->unmapNotifyEvent(&ue)) {
1040 delete win; 1033 delete win;
1034 if (focused_window == win) // some extra checking
1035 focused_window = 0;
1036 win = 0;
1037 }
1041 1038
1042 } 1039 }
1043 #ifdef SLIT 1040#ifdef SLIT
1044 else if ((slit = searchSlit(ue.window))!=0) { 1041 else if ((slit = searchSlit(ue.window))!=0) {
1045 slit->removeClient(ue.window); 1042 slit->removeClient(ue.window);
1046 #ifdef DEBUG
1047 cerr<<__FILE__<<"("<<__LINE__<<"): Here"<<endl;
1048 #endif
1049 } 1043 }
1050 #endif // SLIT 1044#endif // SLIT
1051 1045
1052} 1046}
1053 1047
@@ -1594,6 +1588,8 @@ void Fluxbox::handleSignal(int sig) {
1594 rereadMenu(); 1588 rereadMenu();
1595 break; 1589 break;
1596 case SIGSEGV: 1590 case SIGSEGV:
1591 abort();
1592 break;
1597 case SIGFPE: 1593 case SIGFPE:
1598 case SIGINT: 1594 case SIGINT:
1599 case SIGTERM: 1595 case SIGTERM: