desktopctl: report errors when sending messages

This commit is contained in:
Pierre Pronchery 2024-02-28 02:51:46 +01:00
parent b0d4c05bde
commit 3832dc2402

View File

@ -31,6 +31,7 @@
#include <locale.h> #include <locale.h>
#include <libintl.h> #include <libintl.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <System/error.h>
#include <Desktop.h> #include <Desktop.h>
#include "../../include/Browser/desktop.h" #include "../../include/Browser/desktop.h"
#include "../../config.h" #include "../../config.h"
@ -64,7 +65,9 @@ static int _usage(void);
/* desktopctl */ /* desktopctl */
static int _desktopctl(int action, int what) static int _desktopctl(int action, int what)
{ {
desktop_message_send(DESKTOP_CLIENT_MESSAGE, action, what, TRUE); if(desktop_message_send(DESKTOP_CLIENT_MESSAGE, action, what, TRUE)
!= 0)
return error_print(PROGNAME_DESKTOPCTL);
return 0; return 0;
} }