mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 06:24:20 +01:00
Fix output position issue
Looks like the output dimensions need to be set when arranging rather than when a mode is set. Fixes an issue with position of fullscreen views.
This commit is contained in:
parent
7f40b928c7
commit
93ff7879f1
@ -505,10 +505,6 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
|
|||||||
|
|
||||||
static void handle_mode(struct wl_listener *listener, void *data) {
|
static void handle_mode(struct wl_listener *listener, void *data) {
|
||||||
struct sway_output *output = wl_container_of(listener, output, mode);
|
struct sway_output *output = wl_container_of(listener, output, mode);
|
||||||
output->lx = output->wlr_output->lx;
|
|
||||||
output->ly = output->wlr_output->ly;
|
|
||||||
wlr_output_effective_resolution(output->wlr_output,
|
|
||||||
&output->width, &output->height);
|
|
||||||
arrange_layers(output);
|
arrange_layers(output);
|
||||||
arrange_output(output);
|
arrange_output(output);
|
||||||
transaction_commit_dirty();
|
transaction_commit_dirty();
|
||||||
|
@ -217,8 +217,8 @@ void arrange_workspace(struct sway_workspace *workspace) {
|
|||||||
workspace->x, workspace->y);
|
workspace->x, workspace->y);
|
||||||
if (workspace->fullscreen) {
|
if (workspace->fullscreen) {
|
||||||
struct sway_container *fs = workspace->fullscreen;
|
struct sway_container *fs = workspace->fullscreen;
|
||||||
fs->x = output->wlr_output->lx;
|
fs->x = output->lx;
|
||||||
fs->y = output->wlr_output->ly;
|
fs->y = output->ly;
|
||||||
fs->width = output->width;
|
fs->width = output->width;
|
||||||
fs->height = output->height;
|
fs->height = output->height;
|
||||||
arrange_container(fs);
|
arrange_container(fs);
|
||||||
@ -234,8 +234,13 @@ void arrange_output(struct sway_output *output) {
|
|||||||
if (config->reloading) {
|
if (config->reloading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Outputs have no pending x/y/width/height,
|
const struct wlr_box *output_box = wlr_output_layout_get_box(
|
||||||
// so all we do here is arrange the workspaces.
|
root->output_layout, output->wlr_output);
|
||||||
|
output->lx = output_box->x;
|
||||||
|
output->ly = output_box->y;
|
||||||
|
output->width = output_box->width;
|
||||||
|
output->height = output_box->height;
|
||||||
|
|
||||||
for (int i = 0; i < output->workspaces->length; ++i) {
|
for (int i = 0; i < output->workspaces->length; ++i) {
|
||||||
struct sway_workspace *workspace = output->workspaces->items[i];
|
struct sway_workspace *workspace = output->workspaces->items[i];
|
||||||
arrange_workspace(workspace);
|
arrange_workspace(workspace);
|
||||||
|
Loading…
Reference in New Issue
Block a user