minor style cleaning and extra checking in unmapNotifyEvent

This commit is contained in:
fluxgen 2002-08-16 11:09:25 +00:00
parent 78a5efdae4
commit 0ac03c322c

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: fluxbox.cc,v 1.68 2002/08/14 23:03:07 fluxgen Exp $
// $Id: fluxbox.cc,v 1.69 2002/08/16 11:09:25 fluxgen Exp $
#include "fluxbox.hh"
@ -663,8 +663,7 @@ void Fluxbox::process_event(XEvent *e) {
break;
case CreateNotify:
break;
case DestroyNotify:
{
case DestroyNotify: {
FluxboxWindow *win = (FluxboxWindow *) 0;
#ifdef SLIT
@ -676,16 +675,18 @@ void Fluxbox::process_event(XEvent *e) {
delete win;
win = 0;
}
#ifdef SLIT
} else if ((slit = searchSlit(e->xdestroywindow.window))) {
slit->removeClient(e->xdestroywindow.window, False);
#endif // SLIT
}
#ifdef SLIT
else if ((slit = searchSlit(e->xdestroywindow.window))) {
slit->removeClient(e->xdestroywindow.window, false);
}
#endif // SLIT
}
break;
case MotionNotify:
{
case MotionNotify: {
last_time = e->xmotion.time;
FluxboxWindow *win = 0;
@ -702,8 +703,7 @@ void Fluxbox::process_event(XEvent *e) {
}
break;
case PropertyNotify:
{
case PropertyNotify: {
last_time = e->xproperty.time;
@ -716,8 +716,7 @@ void Fluxbox::process_event(XEvent *e) {
}
break;
case EnterNotify:
{
case EnterNotify: {
last_time = e->xcrossing.time;
BScreen *screen = (BScreen *) 0;
@ -829,19 +828,16 @@ void Fluxbox::process_event(XEvent *e) {
case KeyPress:
handleKeyEvent(e->xkey);
break;
case ColormapNotify:
{
case ColormapNotify: {
BScreen *screen = searchScreen(e->xcolormap.window);
if (screen)
if (screen != 0) {
screen->setRootColormapInstalled((e->xcolormap.state ==
ColormapInstalled) ? True : False);
}
}
break;
case FocusIn:
{
case FocusIn: {
if (e->xfocus.mode == NotifyUngrab ||
e->xfocus.detail == NotifyPointer)
break;
@ -850,16 +846,13 @@ void Fluxbox::process_event(XEvent *e) {
if (win && ! win->isFocused())
setFocusedWindow(win);
}
break;
} break;
case FocusOut:
break;
case ClientMessage:
handleClientMessage(e->xclient);
break;
default:
{
default: {
#ifdef SHAPE
if (e->type == getShapeEventBase()) {
@ -1036,16 +1029,17 @@ void Fluxbox::handleUnmapNotify(XUnmapEvent &ue) {
if ((win = searchWindow(ue.window)) != 0) {
if (win->unmapNotifyEvent(&ue))
if (win->unmapNotifyEvent(&ue)) {
delete win;
if (focused_window == win) // some extra checking
focused_window = 0;
win = 0;
}
}
#ifdef SLIT
else if ((slit = searchSlit(ue.window))!=0) {
slit->removeClient(ue.window);
#ifdef DEBUG
cerr<<__FILE__<<"("<<__LINE__<<"): Here"<<endl;
#endif
}
#endif // SLIT
@ -1594,6 +1588,8 @@ void Fluxbox::handleSignal(int sig) {
rereadMenu();
break;
case SIGSEGV:
abort();
break;
case SIGFPE:
case SIGINT:
case SIGTERM: