hiwin: Tweak debug
This commit is contained in:
parent
02f0afd97b
commit
84372a1165
19
src/hiwin.c
19
src/hiwin.c
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2018 Kim Woelders
|
* Copyright (C) 2004-2020 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -36,6 +36,11 @@
|
||||||
#include "xwin.h"
|
#include "xwin.h"
|
||||||
|
|
||||||
#define DEBUG_HIWIN 0
|
#define DEBUG_HIWIN 0
|
||||||
|
#if DEBUG_HIWIN
|
||||||
|
#define Dprintf(fmt, ...) Eprintf("%s: " fmt, __func__, __VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define Dprintf(fmt...)
|
||||||
|
#endif
|
||||||
|
|
||||||
struct _hiwin {
|
struct _hiwin {
|
||||||
EObj o;
|
EObj o;
|
||||||
|
@ -220,9 +225,7 @@ HiwinEwinEvent(Win win __UNUSED__, XEvent * ev, void *prm)
|
||||||
{
|
{
|
||||||
Hiwin *phi = (Hiwin *) prm;
|
Hiwin *phi = (Hiwin *) prm;
|
||||||
|
|
||||||
#if DEBUG_HIWIN
|
Dprintf("type=%d %s\n", ev->type, EwinGetTitle(phi->ewin));
|
||||||
Eprintf("%s: type=%d %s\n", __func__, ev->type, EwinGetTitle(phi->ewin));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (ev->type)
|
switch (ev->type)
|
||||||
{
|
{
|
||||||
|
@ -272,9 +275,7 @@ HiwinInit(Hiwin * phi, EWin * ewin, EObj * parent)
|
||||||
#if USE_COMPOSITE
|
#if USE_COMPOSITE
|
||||||
if (phi->ewin)
|
if (phi->ewin)
|
||||||
{
|
{
|
||||||
#if DEBUG_HIWIN
|
Dprintf("Unregister %s\n", EwinGetTitle(phi->ewin));
|
||||||
Eprintf("%s: Unregister %s\n", __func__, EwinGetTitle(phi->ewin));
|
|
||||||
#endif
|
|
||||||
EventCallbackUnregister(EoGetWin(phi->ewin), HiwinEwinEvent, phi);
|
EventCallbackUnregister(EoGetWin(phi->ewin), HiwinEwinEvent, phi);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -286,9 +287,7 @@ HiwinInit(Hiwin * phi, EWin * ewin, EObj * parent)
|
||||||
#if USE_COMPOSITE
|
#if USE_COMPOSITE
|
||||||
if (phi->ewin)
|
if (phi->ewin)
|
||||||
{
|
{
|
||||||
#if DEBUG_HIWIN
|
Dprintf("Register %s\n", EwinGetTitle(phi->ewin));
|
||||||
Eprintf("%s: Register %s\n", __func__, EwinGetTitle(phi->ewin));
|
|
||||||
#endif
|
|
||||||
EventCallbackRegister(EoGetWin(phi->ewin), HiwinEwinEvent, phi);
|
EventCallbackRegister(EoGetWin(phi->ewin), HiwinEwinEvent, phi);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue