-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: transfer views to same workspace as on destroyed output #2294
base: master
Are you sure you want to change the base?
Changes from all commits
8559fb7
b99cb04
74c2181
c97972f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,7 +165,8 @@ void transfer_views(wf::output_t *from, wf::output_t *to) | |
auto views = from->wset()->get_views(WSET_SORT_STACKING); | ||
for (auto& view : views) | ||
{ | ||
move_view_to_output(view, to, true); | ||
unsigned flags = VIEW_TO_OUTPUT_FLAG_RECONFIGURE | VIEW_TO_OUTPUT_FLAG_SAME_WORKSPACE; | ||
move_view_to_output(view, to, flags); | ||
} | ||
} | ||
|
||
|
@@ -546,7 +547,13 @@ struct output_layout_output_t | |
|
||
/* It doesn't make sense to transfer to another output if we're | ||
* going to shut down the compositor */ | ||
transfer_views(wo, shutdown ? nullptr : get_core().seat->get_active_output()); | ||
wf::output_t *new_output = shutdown ? nullptr : get_core().seat->get_active_output(); | ||
transfer_views(wo, new_output); | ||
if (new_output && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ehh I'm not quite sure about this particular change. Is this really what users expect? |
||
(wo->wset()->get_workspace_grid_size() == new_output->wset()->get_workspace_grid_size())) | ||
{ | ||
new_output->wset()->set_workspace(wo->wset()->get_current_workspace()); | ||
} | ||
|
||
wf::output_removed_signal data2; | ||
data2.output = wo; | ||
|
@@ -1119,7 +1126,9 @@ class output_layout_t::impl | |
|
||
if (!noop_output) | ||
{ | ||
auto handle = wlr_headless_add_output(noop_backend, 1280, 720); | ||
// NOOP output should be at least as large as actual screen sizes. Otherwise, when | ||
// when windows are temporarily mapped to it, they will be moved/cropped to match it. | ||
auto handle = wlr_headless_add_output(noop_backend, 3840, 2160); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The noop output can be configured from the config file (IIRC), so this is only the default size if nothing else is set. I would rather not make it that big by default because if the user has some underpowered GPU mayybe this buffer would be too big? |
||
handle->data = WF_NOOP_OUTPUT_MAGIC; | ||
strcpy(handle->name, "NOOP-1"); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it also make sense to have similar treatment for fullscreen and tiled windows? You can pass the requested workspace to fullscreen/tile request too.