feat: screenshot app improvement, WIndow Server supports full-screen overlay, Disks app UI improvements
This commit is contained in:
@@ -419,6 +419,7 @@ bool desktop_poll_external_windows(DesktopState* ds) {
|
||||
if (ds->windows[i].external && ds->windows[i].ext_win_id == extId) {
|
||||
found = true;
|
||||
bool remapRequested = false;
|
||||
bool wasFullscreen = desktop_window_fullscreen(&ds->windows[i]);
|
||||
uint64_t currentVa = (uint64_t)(uintptr_t)ds->windows[i].content;
|
||||
if (ds->windows[i].content_w != extWins[e].width ||
|
||||
ds->windows[i].content_h != extWins[e].height) {
|
||||
@@ -436,6 +437,26 @@ bool desktop_poll_external_windows(DesktopState* ds) {
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
if (ds->windows[i].ext_flags != extWins[e].flags) {
|
||||
ds->windows[i].ext_flags = extWins[e].flags;
|
||||
bool isFullscreen = desktop_window_fullscreen(&ds->windows[i]);
|
||||
if (isFullscreen) {
|
||||
if (!wasFullscreen) ds->windows[i].saved_frame = ds->windows[i].frame;
|
||||
ds->windows[i].frame = {0, 0, ds->screen_w, ds->screen_h};
|
||||
ds->windows[i].state = WIN_NORMAL;
|
||||
} else if (wasFullscreen) {
|
||||
ds->windows[i].frame = ds->windows[i].saved_frame;
|
||||
ds->windows[i].state = WIN_NORMAL;
|
||||
}
|
||||
changed = true;
|
||||
}
|
||||
if (desktop_window_fullscreen(&ds->windows[i]) &&
|
||||
(ds->windows[i].frame.x != 0 || ds->windows[i].frame.y != 0 ||
|
||||
ds->windows[i].frame.w != ds->screen_w || ds->windows[i].frame.h != ds->screen_h)) {
|
||||
ds->windows[i].frame = {0, 0, ds->screen_w, ds->screen_h};
|
||||
ds->windows[i].state = WIN_NORMAL;
|
||||
changed = true;
|
||||
}
|
||||
// Update dirty flag and cursor
|
||||
if (extWins[e].dirty) {
|
||||
ds->windows[i].dirty = true;
|
||||
@@ -524,6 +545,12 @@ bool desktop_poll_external_windows(DesktopState* ds) {
|
||||
win->app_data = nullptr;
|
||||
win->external = true;
|
||||
win->ext_win_id = extId;
|
||||
win->ext_cursor = extWins[e].cursor;
|
||||
win->ext_flags = extWins[e].flags;
|
||||
if (desktop_window_fullscreen(win)) {
|
||||
win->frame = {0, 0, ds->screen_w, ds->screen_h};
|
||||
win->state = WIN_NORMAL;
|
||||
}
|
||||
|
||||
// Unfocus previous window
|
||||
if (ds->focused_window >= 0 && ds->focused_window < ds->window_count) {
|
||||
|
||||
Reference in New Issue
Block a user