UPDATE_FVWM_SCREEN macro?
Dominik Vogt <[email protected]> Wed, 24 Nov 2021 15:43:47 +0100
| Newsgroups | gmane.comp.window-managers.fvwm.devel |
|---|---|
| Message-ID | <[email protected]> |
Does anybody know why this is a macro and not a function?
(screen.h)
#define UPDATE_FVWM_SCREEN(fw) \
do { \
rectangle g; \
struct monitor *mnew; \
\
get_unshaded_geometry((fw), &g); \
mnew =3D FindScreenOfXY((fw)->g.frame.x, (fw)->g.frame.y); \
/* Avoid unnecessary updates. */ \
if (mnew =3D=3D (fw)->m) \
break; \
(fw)->m_prev =3D (fw)->m; \
(fw)->m =3D mnew; \
(fw)->Desk =3D mnew->virtual_scr.CurrentDesk; \
EWMH_SetCurrentDesktop((fw)->m); \
desk_add_fw((fw)); \
BroadcastConfig(M_CONFIGURE_WINDOW, (fw)); \
} while(0)
The "do { ... } while (0)" was probably written by me.
Ciao
Dominik ^_^ ^_^
=2D-
Dominik Vogt