mirror of
https://github.com/swaywm/sway
synced 2024-11-15 14:03:07 +01:00
minor fixes
This commit is contained in:
parent
63bc0d3b54
commit
b132f67e7b
@ -33,17 +33,17 @@ struct sway_config {
|
|||||||
list_t *cmd_queue;
|
list_t *cmd_queue;
|
||||||
list_t *workspace_outputs;
|
list_t *workspace_outputs;
|
||||||
struct sway_mode *current_mode;
|
struct sway_mode *current_mode;
|
||||||
uint32_t floating_mod;
|
uint32_t floating_mod;
|
||||||
|
|
||||||
// Flags
|
// Flags
|
||||||
bool focus_follows_mouse;
|
bool focus_follows_mouse;
|
||||||
bool mouse_warping;
|
bool mouse_warping;
|
||||||
bool active;
|
bool active;
|
||||||
bool failed;
|
bool failed;
|
||||||
bool reloading;
|
bool reloading;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool load_config();
|
bool load_config(void);
|
||||||
bool read_config(FILE *file, bool is_active);
|
bool read_config(FILE *file, bool is_active);
|
||||||
char *do_var_replacement(struct sway_config *config, char *str);
|
char *do_var_replacement(struct sway_config *config, char *str);
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ static char* get_config_path() {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool load_config() {
|
bool load_config(void) {
|
||||||
sway_log(L_INFO, "Loading config");
|
sway_log(L_INFO, "Loading config");
|
||||||
|
|
||||||
char *path = get_config_path();
|
char *path = get_config_path();
|
||||||
|
@ -33,10 +33,11 @@ static void update_focus(swayc_t *c) {
|
|||||||
}
|
}
|
||||||
active_workspace = c;
|
active_workspace = c;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
case C_VIEW:
|
case C_VIEW:
|
||||||
case C_CONTAINER:
|
case C_CONTAINER:
|
||||||
//TODO whatever to do when container changes
|
//TODO whatever to do when container changes
|
||||||
//for example, stacked and tabbing change whatever.
|
//for example, stacked and tabbing change stuff.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -114,6 +115,11 @@ swayc_t *get_focused_container(swayc_t *parent) {
|
|||||||
while (parent && !parent->is_focused) {
|
while (parent && !parent->is_focused) {
|
||||||
parent = parent->focused;
|
parent = parent->focused;
|
||||||
}
|
}
|
||||||
|
//just incase
|
||||||
|
if (parent == NULL) {
|
||||||
|
sway_log(L_DEBUG, "get_focused_container unable to find container");
|
||||||
|
return active_workspace;
|
||||||
|
}
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit s
|
|||||||
static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers
|
static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers
|
||||||
*modifiers, uint32_t key, uint32_t sym, enum wlc_key_state state) {
|
*modifiers, uint32_t key, uint32_t sym, enum wlc_key_state state) {
|
||||||
enum { QSIZE = 32 };
|
enum { QSIZE = 32 };
|
||||||
if (locked_view_focus) {
|
if (locked_view_focus && state == WLC_KEY_STATE_PRESSED) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
static uint8_t head = 0;
|
static uint8_t head = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user