Panel plugin development

Alexis BRENON @Xfce brenon.alexis+xfce at gmail.com
Sat Apr 6 14:42:29 CEST 2019


Hi all,

I finally debug with fprintf(stderr, ...) and open a pull request:
https://github.com/xfce-mirror/xfce4-xkb-plugin/pull/2
Is it the right place to contribute?

Kind,
Alexis.

Le ven. 5 avr. 2019 à 22:08, Alexis BRENON @Xfce
<brenon.alexis+xfce at gmail.com> a écrit :
>
> > > One thing you could try to troubleshoot is to put the following at the
> > > very top, before all other code, in any files where the `DBG()` macro
> > > isn't working:
> > >
> > > ```
> > > #define DEBUG 1
> > > #include <libxfce4util/libxfce4util.h>
> > > #ifndef DBG
> > > # error "uh oh!"
> > > #endif
> > > ```
>
> With this snippet, the DBG calls display the message (as intented).
> Removing the first line (#define DEBUG 1) make DBG call like NOOP ;
> there is no error at compile nor run time (as DBG macro should be
> defined) but it must be defined to a NOOP...
>
> >
> > Or maybe something like this:
> >
> > ```
> > #undef DEBUG
> > #define DEBUG 1
> > #include <libxfce4util/libxfce4util.h>
> > #if !defined(DEBUG) || DEBUG != 1
> > # error "DEBUG macro was changed"
> > #endif
> > #ifndef DBG
> > # error "DBG macro did not get defined"
> > #endif
> > ```
>
> No compilation error with this one, and DBG messages are displayed.
> Removing first two lines make a compilation error: DEBUG macro was
> changed (actually it is not define, neither by me or the include).
>
> Alexis


More information about the Xfce4-dev mailing list