fix: fix rare page faults caused by Window Server apps, change default wallpaper path
This commit is contained in:
@@ -101,8 +101,8 @@ static void klog_on_poll(Window* win) {
|
||||
static void klog_on_close(Window* win) {
|
||||
KlogState* klog = (KlogState*)win->app_data;
|
||||
if (klog) {
|
||||
if (klog->term.cells) montauk::mfree(klog->term.cells);
|
||||
if (klog->term.alt_cells) montauk::mfree(klog->term.alt_cells);
|
||||
if (klog->term.cells) montauk::free(klog->term.cells);
|
||||
if (klog->term.alt_cells) montauk::free(klog->term.alt_cells);
|
||||
if (klog->klog_buf) montauk::mfree(klog->klog_buf);
|
||||
montauk::mfree(klog);
|
||||
win->app_data = nullptr;
|
||||
|
||||
@@ -39,7 +39,8 @@ static void terminal_on_key(Window* win, const Montauk::KeyEvent& key) {
|
||||
static void terminal_on_close(Window* win) {
|
||||
TerminalState* ts = (TerminalState*)win->app_data;
|
||||
if (ts) {
|
||||
if (ts->cells) montauk::mfree(ts->cells);
|
||||
if (ts->cells) montauk::free(ts->cells);
|
||||
if (ts->alt_cells) montauk::free(ts->alt_cells);
|
||||
montauk::mfree(ts);
|
||||
win->app_data = nullptr;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ void gui::desktop_init(DesktopState* ds) {
|
||||
ds->settings.ui_scale = 1;
|
||||
|
||||
// Try to load default wallpaper
|
||||
wallpaper_load(&ds->settings, "0:/home/gustav-gullstrand-d6kSvT2xZQo-unsplash.jpg",
|
||||
wallpaper_load(&ds->settings, "0:/home/stephen-walker-DaC8D3USffk-unsplash.jpg",
|
||||
ds->screen_w, ds->screen_h);
|
||||
montauk::win_setscale(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user