Created attachment 2780 patch to allow for disabling grid resize on resolution change Whenever an application changes your desktop resolution (in this case to a lower one) xfdesktop resizes te grid and auto-arranges the icons. This makes arranging my icons (something I tend to do) pointless if another application can come along and undo that. SDL apps most commonly cause this. I couldn't find another way to overcome this so on my system I've added the ability to ignore these resolution changes that can be set at startup or passed to a running instance. Is this a good way to do it? My patch is attached. Sorry if it looks bizarre (I don't code much and even rarer does anybody else see what I do...)
Hi Adam. I submitted a similar bug - https://bugzilla.xfce.org/show_bug.cgi?id=6653 where I proposed a little different solution, but without looking in the sources - maybe it's not even possible with the current design to do it like I proposed. I haven't tested Your patch yet, but in this case I'm unsure what would happen with the icons if You change the resolution on purpose. Will they stay outside the screen limits -> that means invisible and unreachable? Thanks in advance for any answer. Jaromir.
Created attachment 3952 rebased patch on 4.8.3 I don't know if the proposed patch is the best solution, but in the meanwhile I rebased it on xfdesktop-4.8.3. This seems to work fine : xfdesktop gives me two more options that let me turn on or off the automatic resizing : > $ xfdesktop --help | grep resize > --resize Enable icon grid resizing on resolution change > --noresize Disable icon grid resizing on resolution change
I was thinking about that again and ... loosing few icons probably won't hurt anyone. At least it wouldn't be so annoying like losing the icon positions.
Actually, this no longer seems to be a problem (4.8.3) Currently, it works better than my patch did (it was a dirty, dirty hack...) The current behavior, which I feel is correct, is that I am able to run fullscreen apps that change my resolution and it doesn't change the desktop size (when exiting the app, everything is where I left it). However, using the display application does change the desktop size and triggers auto-arrangement. In order to do that with my patch on 4.6, you had to toggle the grid resize back on if you wanted to change your desktop size intentionally (which you could do by just running xfdesktop with the correct args; it would update a running instance). So, does anybody actually still see this problem on 4.8.3? If not, then it might be safe to close this as it's been handled much better than I could have (I don't quite know how that works since it's a 4.6 bug that's not present in the current 4.8). Adam
(In reply to comment #4) > So, does anybody actually still see this problem on 4.8.3? Yes. > The current behavior, which I feel is correct, is that I am able to run > fullscreen apps that change my resolution and it doesn't change the desktop > size (when exiting the app, everything is where I left it). Not here. What is your distribution ? Is your xfdesktop patched ?
I use Debian unstable. The current version is 4.8.3 (4.8.3-1) I checked the source and it's simply a debianized upstream version (no patching at all). I have not had to patch/rebuild this package at all since 4.8 came to debian-unstable.
Which application do you use to test the behavior ? For example, here, the grid automatic resizing happens with all games running through wine, and with supertux [1], but this does not happen with supertuxkart [2]. [1] http://supertux.lethargik.org/ [2] http://supertuxkart.sourceforge.net/
(In reply to comment #7) > Which application do you use to test the behavior ? > I mostly used other SDL applications (hexahop, black-box, etc). SuperTux is an SDL application; I no longer have a problem with it (installed the package and made sure). SuperTuxKart is not SDL, I didn't test it (I'll take your word that it's no problem) I don't use wine too often. I haven't used one in full-screen mode since before the switch to 4.8 (I'm pretty nitpicky about my wine instances and how I run each program). So I tried a game and it resized my desktop and screwed up my icons. Looks like in my case, the issue remains for some apps and it looks like there is more than one way for an app to resize the screen when going fullscreen. One affects xfdesktop4 (wine, any others?), and another does not (SDL games, at least on my system.)
I've uploaded some screenshots to bug #6589 that corroborate the problem in xfdesktop4 version 4.8.3 in Ubuntu Oneiric.
Created attachment 3975 [PATCH] Modifify how xfdesktop moves icons during a grid resize to mimic what xfwm4 does with its windows. This patch allows xfdesktop to move the icons in from outside the bounds of a grid resize rather than resetting them to 0,0. This mimics how xfwm4 handles a screen resize to make both consistent. So if an icon was at 15,5 and the new grid's max was 10,7 then the icon should show up at 10,5 rather than get reset back to 0,0.
Comment on attachment 3975 [PATCH] Modifify how xfdesktop moves icons during a grid resize to mimic what xfwm4 does with its windows. My patch isn't a good way to fix this bug. A better way would be to save an rc file per screen resolution. That will take some time, I'll put it on my todo list.
This sounds like a good idea :]
Created attachment 4087 [PATCH] Icon positions are saved/restored per resolution. Icon positions are now stored in seperate rc files per screen resolution so that when reverting from a lower screen resolution the icons aren't stuck at the upper-left. The old rc file is used as a fallback so that the migration is seemless. I haven't tested a screen resolution change during login, I'd be interested in hearing about any issues with it or with this patch.
xfce_rc_config_open never returns null, so you can only use this in xfdesktop_file_icon_manager_save_icons(). In xfdesktop_file_icon_manager_get_cached_icon_position() you need to use: filename = xfce_resource_lookup (XFCE_RESOURCE_CONFIG, relpath_for_resolution). if (filename == NULL) { filename = xfce_resource_lookup (XFCE_RESOURCE_CONFIG, relpath_old). } if (filename != NULL) { rc = xfce_rc_simple_open (filname, TRUE); g_free (filename); }
Created attachment 4114 [PATCH] Icon positions are saved/restored per resolution. Fixed the problems in xfdesktop_file_icon_manager_save_icons, thanks!
Created attachment 4169 [PATCH] Icon positions are saved/restored per resolution Added code to make all the grid areas free before repositing icons during a resolution change. This will fix issues where icons don't get their spot back because another icon is there.
*** Bug 6653 has been marked as a duplicate of this bug. ***
*** Bug 7670 has been marked as a duplicate of this bug. ***