From 90110fc47148fe518b0470886bd2a8d03f5bfa7f Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Sat, 19 Jan 2008 13:32:30 +0000 Subject: [PATCH] Eliminate obsolete EventsConfigure stuff. SVN revision: 33533 --- src/borders.c | 34 +--------------------------------- src/borders.h | 3 +-- src/desktops.c | 6 +----- src/ewins.c | 17 ++--------------- 4 files changed, 5 insertions(+), 55 deletions(-) diff --git a/src/borders.c b/src/borders.c index 511c8039..6f601b84 100644 --- a/src/borders.c +++ b/src/borders.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2007 Kim Woelders + * Copyright (C) 2004-2008 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -525,20 +525,6 @@ EwinBorderSetTo(EWin * ewin, const Border * b) EMapWindow(ewin->bits[i].win); EventCallbackRegister(ewin->bits[i].win, 0, BorderWinpartHandleEvents, &ewin->bits[i]); - /* - * KeyPressMask KeyReleaseMask ButtonPressMask - * ButtonReleaseMask - * EnterWindowMask LeaveWindowMask PointerMotionMask - * PointerMotionHintMask Button1MotionMask - * Button2MotionMask - * Button3MotionMask Button4MotionMask Button5MotionMask - * ButtonMotionMask KeymapStateMask ExposureMask - * VisibilityChangeMask StructureNotifyMask - * ResizeRedirectMask - * SubstructureNotifyMask SubstructureRedirectMask - * FocusChangeMask PropertyChangeMas ColormapChangeMask - * OwnerGrabButtonMask - */ if (b->part[i].flags & FLAG_TITLE) ESelectInput(ewin->bits[i].win, EWIN_BORDER_TITLE_EVENT_MASK); else @@ -851,24 +837,6 @@ BorderWinpartIndex(EWin * ewin, Win win) return -1; /* Not found */ } -void -EwinBorderEventsConfigure(EWin * ewin, int mode) -{ - int i; - long emask; - - emask = (mode) ? ~((long)0) : ~(EnterWindowMask | LeaveWindowMask); - - for (i = 0; i < ewin->border->num_winparts; i++) - { - if (ewin->border->part[i].flags & FLAG_TITLE) - ESelectInput(ewin->bits[i].win, - EWIN_BORDER_TITLE_EVENT_MASK & emask); - else - ESelectInput(ewin->bits[i].win, EWIN_BORDER_PART_EVENT_MASK & emask); - } -} - /* * Border event handlers */ diff --git a/src/borders.h b/src/borders.h index 616b9410..c45b9125 100644 --- a/src/borders.h +++ b/src/borders.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2007 Kim Woelders + * Copyright (C) 2004-2008 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -99,7 +99,6 @@ void EwinBorderDraw(EWin * ewin, int do_shape, int do_paint); void EwinBorderCalcSizes(EWin * ewin, int propagate); void EwinBorderMinShadeSize(EWin * ewin, int *mw, int *mh); void EwinBorderUpdateInfo(EWin * ewin); -void EwinBorderEventsConfigure(EWin * ewin, int mode); void EwinSetBorder(EWin * ewin, const Border * b, int apply); void EwinSetBorderByName(EWin * ewin, const char *name); int BorderWinpartIndex(EWin * ewin, Win win); diff --git a/src/desktops.c b/src/desktops.c index ac2e06f7..e4f235b6 100644 --- a/src/desktops.c +++ b/src/desktops.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2007 Kim Woelders + * Copyright (C) 2004-2008 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -413,10 +413,6 @@ DeskCreate(int desk, int configure) { EoSetFloating(dsk, 1); EoSetLayer(dsk, 0); -#if 0 /* TBD */ - dsk->event_mask = EDESK_EVENT_MASK; - DeskEventsConfigure(dsk, 1); -#endif /* Set the _XROOT... atoms so apps will find them even before the bg is set */ HintsSetRootInfo(EoGetWin(dsk), None, 0); } diff --git a/src/ewins.c b/src/ewins.c index 6525a629..9597c4d1 100644 --- a/src/ewins.c +++ b/src/ewins.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2007 Kim Woelders + * Copyright (C) 2004-2008 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -80,18 +80,6 @@ EwinGetContainerXwin(const EWin * ewin) return (win) ? WinGetXwin(win) : None; } -static void -EwinEventsConfigure(EWin * ewin, int mode) -{ - long emask; - - emask = (mode) ? ~((long)0) : ~(EnterWindowMask | LeaveWindowMask); - - ESelectInput(EoGetWin(ewin), EWIN_TOP_EVENT_MASK & emask); - ESelectInput(EwinGetClientWin(ewin), ewin->client.event_mask & emask); - EwinBorderEventsConfigure(ewin, mode); -} - static EWin * EwinCreate(int type) { @@ -274,6 +262,7 @@ EwinManage(EWin * ewin) EChangeWindowAttributes(EoGetWin(ewin), CWEventMask | CWDontPropagate, &att); ewin->client.event_mask = EWIN_CLIENT_EVENT_MASK; + ESelectInput(EwinGetClientWin(ewin), ewin->client.event_mask); if (EDebug(EDBUG_TYPE_EWINS)) Eprintf("EwinManage %#lx frame=%#lx cont=%#lx st=%d\n", @@ -344,8 +333,6 @@ EwinConfigure(EWin * ewin) EwinSetGeometry(ewin); /* Calculate window geometry before border parts */ EwinBorderSetTo(ewin, NULL); - EwinEventsConfigure(ewin, 1); - if (!ewin->props.no_button_grabs) GrabButtonGrabs(ewin);