|
|
@ -334,7 +334,6 @@ static bool handle_view_created(wlc_handle handle) {
|
|
|
|
wlc_view_get_geometry(handle)->size.h, wlc_view_get_title(handle),
|
|
|
|
wlc_view_get_geometry(handle)->size.h, wlc_view_get_title(handle),
|
|
|
|
wlc_view_get_class(handle), wlc_view_get_app_id(handle));
|
|
|
|
wlc_view_get_class(handle), wlc_view_get_app_id(handle));
|
|
|
|
|
|
|
|
|
|
|
|
bool encapsulate_view = false;
|
|
|
|
|
|
|
|
// TODO properly figure out how each window should be handled.
|
|
|
|
// TODO properly figure out how each window should be handled.
|
|
|
|
switch (wlc_view_get_type(handle)) {
|
|
|
|
switch (wlc_view_get_type(handle)) {
|
|
|
|
// regular view created regularly
|
|
|
|
// regular view created regularly
|
|
|
@ -342,12 +341,6 @@ static bool handle_view_created(wlc_handle handle) {
|
|
|
|
if (parent) {
|
|
|
|
if (parent) {
|
|
|
|
newview = new_floating_view(handle);
|
|
|
|
newview = new_floating_view(handle);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (focused->type == C_WORKSPACE &&
|
|
|
|
|
|
|
|
/* focused->children->length == 0 && */
|
|
|
|
|
|
|
|
(focused->workspace_layout == L_TABBED || focused->workspace_layout == L_STACKED)) {
|
|
|
|
|
|
|
|
// will wrap the view in a container later on
|
|
|
|
|
|
|
|
encapsulate_view = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
newview = new_view(focused, handle);
|
|
|
|
newview = new_view(focused, handle);
|
|
|
|
wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, true);
|
|
|
|
wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -381,10 +374,6 @@ static bool handle_view_created(wlc_handle handle) {
|
|
|
|
suspend_workspace_cleanup = true;
|
|
|
|
suspend_workspace_cleanup = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (newview) {
|
|
|
|
if (newview) {
|
|
|
|
// first view on tabbed/stacked workspace was created, wrap it in a container
|
|
|
|
|
|
|
|
if (encapsulate_view && newview->parent) {
|
|
|
|
|
|
|
|
new_container(newview, newview->parent->workspace_layout);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ipc_event_window(newview, "new");
|
|
|
|
ipc_event_window(newview, "new");
|
|
|
|
set_focused_container(newview);
|
|
|
|
set_focused_container(newview);
|
|
|
|
wlc_view_set_mask(handle, VISIBLE);
|
|
|
|
wlc_view_set_mask(handle, VISIBLE);
|
|
|
|