https://bugs.kde.org/show_bug.cgi?id=436318

--- Comment #208 from Patrick O'Callaghan <pocallag...@gmail.com> ---
(In reply to devsk from comment #207)
> (In reply to Patrick O'Callaghan from comment #205)
> > 
> > So this patch has actually nothing to do with session restore. I'd suggest
> > posting it somewhere else to avoid confusion.
> 
> Yes. I don't think anybody cares about flipping the gestures behavior. I
> will keep this patch around.

I'd suggest keeping it separate from the rest. It's confusing to have it lumped
in with the save/restore stuff.

> > I've had a quick look at your scripts but haven't tried them. They seem
> > quite complicated, but maybe they do more than mine. I've taken note of how
> > you use 'kdotool windowmove' and have added this to my own scripts (don't
> > know why I hadn't noticed this before :-). I'll upload them shortly (still
> > not very familiar with Gist to be honest).
> 
> Yes. My script does do way more..:-) It saves a lot more information in a
> format which is easily read in bash. Then, it starts all the apps and waits
> for the user to ack the restoration process which restores their desktop,
> position and size.

All the apps I've used already remember their sizes on restarting, so I don't
bother with that.

I'll consider using Zenity or similar, but given that it only helps with
restoring and not saving, I wouldn't place a high priority on it. If there were
a reliable way to save state on logging out, that would change. Unfortunately
the Auto-start logout scripts only seem to trigger once all windows have been
destroyed.

> I had to add a lot of code for robustness e.g. some random processes make
> their way into 'kdotool search' when they don't have a real window
> associated with them e.g. plasmashell. 

I already skip plasmashell, and if anything else has this behaviour it would be
trivial to add.

> For example, restoring from X11 to wayland, the window class changes from
> konsole to org.kde.konsole.

I don't care about X11. I wrote this specifically for Wayland.

> For example, the size and location on wayland are floating point numbers
> sometimes, which was not apparent until wayland locked up on creating a
> window with 0 size with infinite memory allocation loop and got killed by
> OOM.
>

kdotool can return floating-point values for position, but doesn't accept them
when trying to set it. This to me is a bug. However I'm not worried about
fractions of a pixel, so I just truncate these to integers.

> For example, if you saved session from a crontab periodically, kdotool just
> doesn't find any windows because crontab does not have access to the user
> environment to access the DBUS.

Not something I do. I only save the state explicitly.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to