aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/commands.c6
-rw-r--r--sway/config.c2
-rw-r--r--sway/main.c9
3 files changed, 13 insertions, 4 deletions
diff --git a/sway/commands.c b/sway/commands.c
index ba16260f..c565adbb 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1794,7 +1794,11 @@ struct cmd_results *config_command(char *exec, enum cmd_status block) {
if (argc>1 && (*argv[1] == '\"' || *argv[1] == '\'')) {
strip_quotes(argv[1]);
}
- results = handler->handle(argc-1, argv+1);
+ if (handler->handle) {
+ results = handler->handle(argc-1, argv+1);
+ } else {
+ results = cmd_results_new(CMD_INVALID, argv[0], "This command is shimmed, but unimplemented");
+ }
cleanup:
free_argv(argc, argv);
return results;
diff --git a/sway/config.c b/sway/config.c
index 966362cc..bd3cf4e6 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -151,7 +151,7 @@ static char *get_config_path(void) {
"$XDG_CONFIG_HOME/sway/config",
"$HOME/.i3/config",
"$XDG_CONFIG_HOME/i3/config",
- FALLBACK_CONFIG_DIR "/config",
+ FALLBACK_CONFIG_DIR "/config",
"/etc/i3/config",
};
diff --git a/sway/main.c b/sway/main.c
index 9a5e351c..382e7ca2 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -36,7 +36,7 @@ static void wlc_log_handler(enum wlc_log_type type, const char *str) {
}
}
-void detect_nvidia() {
+void detect_proprietary() {
FILE *f = fopen("/proc/modules", "r");
if (!f) {
return;
@@ -48,6 +48,11 @@ void detect_nvidia() {
free(line);
break;
}
+ if (strstr(line, "fglrx")) {
+ fprintf(stderr, "\x1B[1;31mWarning: Proprietary AMD drivers do NOT support Wayland. Use radeon.\x1B[0m\n");
+ free(line);
+ break;
+ }
free(line);
}
fclose(f);
@@ -161,7 +166,7 @@ int main(int argc, char **argv) {
}
setenv("WLC_DIM", "0", 0);
wlc_log_set_handler(wlc_log_handler);
- detect_nvidia();
+ detect_proprietary();
/* Changing code earlier than this point requires detailed review */
/* (That code runs as root on systems without logind, and wlc_init drops to