mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
new_workspace null behavior + testmap functions + regex
This commit is contained in:
parent
f5343adae4
commit
e1d18e42a8
12 changed files with 581 additions and 370 deletions
|
|
@ -126,7 +126,7 @@ static void handle_output_destroyed(wlc_handle output) {
|
|||
|
||||
static void handle_output_resolution_change(wlc_handle output, const struct wlc_size *from, const struct wlc_size *to) {
|
||||
sway_log(L_DEBUG, "Output %u resolution changed to %d x %d", (unsigned int)output, to->w, to->h);
|
||||
swayc_t *c = swayc_by_handle(output);
|
||||
swayc_t *c = swayc_by_test(test_handle, &output);
|
||||
if (!c) return;
|
||||
c->width = to->w;
|
||||
c->height = to->h;
|
||||
|
|
@ -134,7 +134,7 @@ static void handle_output_resolution_change(wlc_handle output, const struct wlc_
|
|||
}
|
||||
|
||||
static void handle_output_focused(wlc_handle output, bool focus) {
|
||||
swayc_t *c = swayc_by_handle(output);
|
||||
swayc_t *c = swayc_by_test(test_handle, &output);
|
||||
// if for some reason this output doesnt exist, create it.
|
||||
if (!c) {
|
||||
handle_output_created(output);
|
||||
|
|
@ -152,7 +152,7 @@ static bool handle_view_created(wlc_handle handle) {
|
|||
|
||||
// Get parent container, to add view in
|
||||
if (parent) {
|
||||
focused = swayc_by_handle(parent);
|
||||
focused = swayc_by_test(test_handle, &parent);
|
||||
}
|
||||
if (!focused || focused->type == C_OUTPUT) {
|
||||
focused = get_focused_container(&root_container);
|
||||
|
|
@ -221,7 +221,7 @@ static bool handle_view_created(wlc_handle handle) {
|
|||
|
||||
static void handle_view_destroyed(wlc_handle handle) {
|
||||
sway_log(L_DEBUG, "Destroying window %lu", handle);
|
||||
swayc_t *view = swayc_by_handle(handle);
|
||||
swayc_t *view = swayc_by_test(test_handle, &handle);
|
||||
|
||||
// destroy views by type
|
||||
switch (wlc_view_get_type(handle)) {
|
||||
|
|
@ -258,7 +258,7 @@ static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geo
|
|||
// If the view is floating, then apply the geometry.
|
||||
// Otherwise save the desired width/height for the view.
|
||||
// This will not do anything for the time being as WLC improperly sends geometry requests
|
||||
swayc_t *view = swayc_by_handle(handle);
|
||||
swayc_t *view = swayc_by_test(test_handle, &handle);
|
||||
if (view) {
|
||||
view->desired_width = geometry->size.w;
|
||||
view->desired_height = geometry->size.h;
|
||||
|
|
@ -274,7 +274,7 @@ static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geo
|
|||
}
|
||||
|
||||
static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit state, bool toggle) {
|
||||
swayc_t *c = swayc_by_handle(view);
|
||||
swayc_t *c = swayc_by_test(test_handle, &view);
|
||||
switch (state) {
|
||||
case WLC_BIT_FULLSCREEN:
|
||||
// i3 just lets it become fullscreen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue