mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-27 21:58:16 +01:00
Check if there is a current container before setting it's opacity
This commit is contained in:
parent
6cb0e58c6d
commit
08139daaa4
1 changed files with 4 additions and 0 deletions
|
@ -21,6 +21,10 @@ struct cmd_results *cmd_opacity(int argc, char **argv) {
|
||||||
|
|
||||||
struct sway_container *con = config->handler_context.container;
|
struct sway_container *con = config->handler_context.container;
|
||||||
|
|
||||||
|
if (con == NULL) {
|
||||||
|
return cmd_results_new(CMD_FAILURE, "opacity", "No current container");
|
||||||
|
}
|
||||||
|
|
||||||
float opacity = 0.0f;
|
float opacity = 0.0f;
|
||||||
|
|
||||||
if (!parse_opacity(argv[0], &opacity)) {
|
if (!parse_opacity(argv[0], &opacity)) {
|
||||||
|
|
Loading…
Reference in a new issue