Skip to content

Commit

Permalink
Warn if DESKTOP_SESSION is icewm instead of icewm-session.
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed May 30, 2024
1 parent b74955d commit 7100216
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ void show_backtrace(const int limit = 0);
int strpcmp(char const *str, char const *pfx, char const *delim = "=:");
const char* errno_string();
const char *my_basename(const char *filename);
bool strequal(const char* a, const char* b);

inline const char* boolstr(bool bval) {
return bval ? "true" : "false";
Expand Down
2 changes: 2 additions & 0 deletions src/wmapp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,8 @@ YWMApp::YWMApp(int *argc, char ***argv, const char *displayName,
delete desktop;

managerWindow = registerProtocols1(*argv, *argc);
if (notifyParent == false && strequal("icewm", getenv("DESKTOP_SESSION")))
warn("Better start icewm via icewm-session");

manager = new YWindowManager(this, this, this, nullptr, root());
PRECONDITION(desktop != nullptr);
Expand Down
2 changes: 1 addition & 1 deletion src/yarray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ YStringArray::YStringArray(const char* cstr[], SizeType num, SizeType cap) :
}
}

static bool strequal(const char *a, const char *b) {
bool strequal(const char* a, const char* b) {
return a ? b && !strcmp(a, b) : !b;
}

Expand Down

0 comments on commit 7100216

Please sign in to comment.