discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Images disappear after Display Resolution Change


From: Tom Sheffler
Subject: Images disappear after Display Resolution Change
Date: Tue, 26 Dec 2023 10:52:11 -0800

I’ve recently installed gs-desktop (from github.com/onflapp/gs-desktop/) on Debian 12 into a clean partition in a System76 laptop.  It all works very nicely as a desktop environment.

I have noticed an annoying problem when I change resolutions - I seem to do this often: when I plug in an external monitor I size things one way, and when not connected I size the display another way.  I’ve investigated the problem, and do not have a good fix. I’m hoping that by sharing my experience here someone might be able to shed some light on the subject.


Upon resizing the main screen, icons and images disappear.  The commands I use are

   - xrandr —output eDP-1 —mode 1400x1050
   - xrandr —output eDP-1 —mode 1600x900

After changing resolutions, images and icons in the following apps have been seen to dissappear
  - GWorkspace
  - Gorm
  - nextspace/Preferences
  - gs-desktop/Applications/VolMon
  - gs-desktop/Applications/MountUp

The picture below shows two versions of GWorkspace FileViewer.  The one on top is GWorkspace installed “as-is” and shown after changing the resolution of the display.  The large icons and the small icons are all gone.  They do not reappear after any amount of fiddling 
with controls or themes I attempt.

The bottom FileViewer is a modified copy of GWorkspace that has been changed to add a new menu item called “Redraw” that does a couple of things.  It deletes image caches in various places and then calls [NSApp updateWindows].  This does not immediately fix the images, but after scolling around the images get refreshed as the caches are rebuilt. 

The two “DIFF” files attached in this message show what code modifications I made to support the “Redraw” menu item.

While clearing the caches helps fix the problem, I don’t really believe I’m on totally the right track for a permanent fix across applications.  So I’m looking for suggestions or other insights.  Or at least that this info helps someone else one day.

===

I”ve also investigated an entirely different track, changing the following line in NSImage.m
    _cacheMode = NSImageCacheDefault;
to
    _cacheMode = NSImageCacheNever;

and rebuilding.  In GWorkspace, this fixes the Large icons, but breaks the Small icons.  It does, however, also fix the module images in the Nextspace/Preferences app so that they do not disappear upon resolution changes.

Thanks,
T


PNG image



Attachment: gui.diff
Description: Binary data

Attachment: gworkspace.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]