diff options
-rw-r--r-- | src/util/misc.c | 13 | ||||
-rw-r--r-- | src/util/misc.h | 1 | ||||
-rw-r--r-- | src/wl-paste.c | 5 |
3 files changed, 15 insertions, 4 deletions
diff --git a/src/util/misc.c b/src/util/misc.c index f252a62..e9f7671 100644 --- a/src/util/misc.c +++ b/src/util/misc.c @@ -44,3 +44,16 @@ void complain_about_selection_support(int primary) { bail("The compositor does not seem to support primary selection"); } + +void complain_about_watch_mode_support() { +#ifdef HAVE_WLR_DATA_CONTROL + bail( + "Watch mode requires a compositor that supports " + "wlroots data-control protocol" + ); +#else + bail( + "wl-clipboard was built without wlroots data-control protocol support" + ); +#endif +} diff --git a/src/util/misc.h b/src/util/misc.h index be5298f..02c9984 100644 --- a/src/util/misc.h +++ b/src/util/misc.h @@ -27,5 +27,6 @@ void print_version_info(void); void complain_about_selection_support(int primary); +void complain_about_watch_mode_support(void); #endif /* UTIL_MISC_H */ diff --git a/src/wl-paste.c b/src/wl-paste.c index 899c7c4..a6572b6 100644 --- a/src/wl-paste.c +++ b/src/wl-paste.c @@ -443,10 +443,7 @@ int main(int argc, argv_t argv) { if (device->needs_popup_surface) { if (options.watch) { - bail( - "Watch mode requires a compositor that supports " - "wlroots data-control protocol" - ); + complain_about_watch_mode_support(); } /* If we cannot get the selection directly, pop up * a surface. When it gets focus, we'll immediately |