mirror of
https://github.com/labwc/labwc.git
synced 2026-04-07 08:21:20 -04:00
[move-to-master] common/macros: change WLR_VERSION macro to runtime evaluation
This commit is contained in:
parent
c9b4da2ce2
commit
379f06b1e8
3 changed files with 15 additions and 2 deletions
|
|
@ -62,7 +62,11 @@
|
|||
#define BOUNDED_INT(a) ((a) < INT_MAX && (a) > INT_MIN)
|
||||
#endif
|
||||
|
||||
#define LAB_WLR_VERSION_AT_LEAST(major, minor, micro) \
|
||||
(WLR_VERSION_NUM >= (((major) << 16) | ((minor) << 8) | (micro)))
|
||||
#define _LAB_CALC_WLR_VERSION_NUM(major, minor, micro) (((major) << 16) | ((minor) << 8) | (micro))
|
||||
|
||||
#define LAB_WLR_VERSION_AT_LEAST(major, minor, micro) ( \
|
||||
server.wlr_version >= _LAB_CALC_WLR_VERSION_NUM(major, minor, micro))
|
||||
|
||||
#define LAB_WLR_VERSION_LOWER(major, minor, micro) (!LAB_WLR_VERSION_AT_LEAST(major, minor, micro))
|
||||
|
||||
#endif /* LABWC_MACROS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue