fixed timer pointer

This commit is contained in:
fluxgen 2002-03-19 00:15:58 +00:00
parent c52f13c5f2
commit f666e3cd77
2 changed files with 10 additions and 16 deletions

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// $Id: Window.cc,v 1.32 2002/03/18 19:58:06 fluxgen Exp $ // $Id: Window.cc,v 1.33 2002/03/19 00:15:58 fluxgen Exp $
//use GNU extensions //use GNU extensions
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
@ -69,7 +69,7 @@ moving(false), resizing(false), shaded(false), maximized(false),
visible(false), iconic(false), transient(false), focused(false), visible(false), iconic(false), transient(false), focused(false),
stuck(false), modal(false), send_focus_message(false), managed(false), stuck(false), modal(false), send_focus_message(false), managed(false),
screen(0), screen(0),
timer(0), timer(this),
display(0), display(0),
lastButtonPressTime(0), lastButtonPressTime(0),
windowmenu(0), windowmenu(0),
@ -185,9 +185,9 @@ tab(0)
client.height = wattrib.height; client.height = wattrib.height;
client.old_bw = wattrib.border_width; client.old_bw = wattrib.border_width;
timer = new BTimer(fluxbox, this);
timer->setTimeout(fluxbox->getAutoRaiseDelay()); timer.setTimeout(fluxbox->getAutoRaiseDelay());
timer->fireOnce(true); timer.fireOnce(true);
getBlackboxHints(); getBlackboxHints();
if (! client.blackbox_hint) if (! client.blackbox_hint)
@ -403,12 +403,6 @@ FluxboxWindow::~FluxboxWindow(void) {
screen->getWorkspace(workspace_number)->removeWindow(this); screen->getWorkspace(workspace_number)->removeWindow(this);
else if (iconic) else if (iconic)
screen->removeIcon(this); screen->removeIcon(this);
if (timer) {
if (timer->isTiming()) timer->stop();
delete timer;
timer = 0;
}
if (windowmenu) if (windowmenu)
delete windowmenu; delete windowmenu;
@ -1947,7 +1941,7 @@ bool FluxboxWindow::setInputFocus(void) {
if ((screen->isSloppyFocus() || screen->isSemiSloppyFocus()) if ((screen->isSloppyFocus() || screen->isSemiSloppyFocus())
&& screen->doAutoRaise()) && screen->doAutoRaise())
timer->start(); timer.start();
ret = true; ret = true;
} }
@ -2439,8 +2433,8 @@ void FluxboxWindow::setFocusFlag(bool focus) {
} }
if ((screen->isSloppyFocus() || screen->isSemiSloppyFocus()) && if ((screen->isSloppyFocus() || screen->isSemiSloppyFocus()) &&
screen->doAutoRaise() && timer!=0 ) screen->doAutoRaise())
timer->stop(); timer.stop();
} }

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// $Id: Window.hh,v 1.12 2002/03/18 19:58:06 fluxgen Exp $ // $Id: Window.hh,v 1.13 2002/03/19 00:15:58 fluxgen Exp $
#ifndef WINDOW_HH #ifndef WINDOW_HH
#define WINDOW_HH #define WINDOW_HH
@ -223,7 +223,7 @@ private:
bool moving, resizing, shaded, maximized, visible, iconic, transient, bool moving, resizing, shaded, maximized, visible, iconic, transient,
focused, stuck, modal, send_focus_message, managed; focused, stuck, modal, send_focus_message, managed;
BScreen *screen; BScreen *screen;
BTimer *timer; BTimer timer;
Display *display; Display *display;
BaseDisplay::BlackboxAttributes blackbox_attrib; BaseDisplay::BlackboxAttributes blackbox_attrib;