window's position not restored on start-up

Bug #195683 reported by Mike Kowalski
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Patrick Storz
0.92.x
Fix Released
Low
Patrick Storz

Bug Description

= Inkscape 0.46-pre2. =

With preferences set to "Remember and use last window's geometry", Inkscape will not restore saved window's position and size if x (or y) position is negative or zero.
I always resize main window, such that it's frame is outside of the desktop area, but even at exact 0, window's position will not be restored.

Code at fault is in interface.cpp, function sp_create_window(), lines starting at if (prefs_geometry) condition. sp-namedview.cpp has a copy of this code too. Condition if (w>0 && h>0 && x>0 && y>0) is causing that.

Ideally not a screen size, but a working desktop area of the correct monitor should be used. I know how to do that in win32, but have no clue if it's possible in GTK 2.10 (couldn't find right functions). Let me know how to proceed with a fix, and perhaps I will be able to send you a patch.

Tags: preferences ui
Revision history for this message
Thomas Ibbotson (thomas-ibbotson) wrote :

I can confirm this behaviour with Inkscape 0.46 and SVN 21198 on Ubuntu Intrepid 64bit. The window is correctly placed if it was closed within the desktop, but not if it was closed outside the desktop. I'm not sure what the expected behaviour is however. What do you expect to happen?

Changed in inkscape:
status: New → Incomplete
Revision history for this message
Mike Kowalski (mike-kov) wrote : Re: [Bug 195683] Re: window's position not restored on start-up

Thomas,

Expected behavior would be to restore the window exactly where it was left.
That means negative coordinates are valid. The code that restores
settings messes
things up, I guess by using -1 to signify "no settings found" or
something of that sort.
That could be changed to some magic value, say -99999 or whatever, and
make sure
reasonably large range of desktop coordinates is restored properly. Extended
desktops frequently use negative coords.

Thanks,
MK

> I can confirm this behaviour with Inkscape 0.46 and SVN 21198 on Ubuntu
> Intrepid 64bit. The window is correctly placed if it was closed within
> the desktop, but not if it was closed outside the desktop. I'm not sure
> what the expected behaviour is however. What do you expect to happen?
>
> ** Changed in: inkscape
> Status: New => Incomplete
>
>

_________________________________________________________________
Windows Live™ Hotmail®:…more than just e-mail.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009

Changed in inkscape:
status: Incomplete → New
importance: Undecided → Low
Revision history for this message
Ivik Injerd (zavaboy) wrote :

I'm running Win7 64bit and I have dual monitors. On the left I have a 1600x900 resolution aligned to the bottom of my primary display (on the right) which is 1600x1200. This leaves a 1600x300 area in the top left corner that I can not see or access.

In that unseen corner is where Inkscape windows spawn when opening some files. Most of these files I open are large enough in dimension that I can see the bottom part of the window. When this is the case, in order to drag it into view, I must first resize the right side of the window over to my primary screen so I can see the top of the window to drag.

I do come across some files too small in dimension to even see the bottom of the window. This makes it impossible to do anything in the window without changing my screen settings first.

I would love to see this issue fixed.

Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Debian Wheezy, Inkscape trunk revision 11512.

tags: added: preferences ui
Changed in inkscape:
status: New → Triaged
Revision history for this message
uwestoehr (uwestoehr) wrote :

This bug is still in Inkscape 0.91 (on Windows 7 64bit using the native 64bit build of Inkscape) and is very annoying:

The Preferences setting is to restore the window geometry for each document but when closing Inkscape and reopening the same SVG file Inkscape is always opened sticking at the upper left corner of the screen. (I only have one screen.)

Revision history for this message
uwestoehr (uwestoehr) wrote :

This bug is still in Inkscape 0.912 on Windows.

Revision history for this message
uwestoehr (uwestoehr) wrote :

This bug is still in Inkscape 0.92 on Windows.

Revision history for this message
Patrick Storz (ede123) wrote :

I was just working on the relevant code, see r15507
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15507

I'm positive that the issue described in comment #5 is fixed (window is certainly not moved to the top left corner of the screen anymore which was caused by a different error).

Regarding the issue reported initially:
* I can't find the the code "w>0 && h>0 && x>0 && y>0" or anything similar in sp-namedview.cpp anymore. What Inkscape does is to check whether the window would be visible at all when restoring the previous location and only then move it.
* If "Remember and use last window's geometry" is selected in options the Window will be moved so that it does not extend beyond the visible screen area. That's true, but that's "by design".

jazzynico (jazzynico)
Changed in inkscape:
milestone: none → 0.93
status: Triaged → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :
Changed in inkscape:
assignee: nobody → Eduard Braun (eduard-braun2)
status: In Progress → Fix Committed
Revision history for this message
uwestoehr (uwestoehr) wrote :

This is not fixed in 0.92.2 (tested on Win7 64bit):

- open Inkscape
- make its main window as large as approximately a quarter of your screen
- shift the main window to the upper right corner of your screen
- close Inkscape
- open Inkscape again

result: neither the window size nor the last position is restored.

Revision history for this message
uwestoehr (uwestoehr) wrote :

Hmm, I have the preferences setting
"Save and restore Window geometry for each document"
This is what I want. For different documents I use different sizes and positions of Inkscape's main window. But with this setting nothing is restored.

Only with
"Remember and use last window's geometry"
the size and position is restored. This is OK, but I want this connected to each document. So the preferences setting
"Remember and use last window's geometry"
works, while
"Save and restore Window geometry for each document"
does not.

Revision history for this message
Patrick Storz (ede123) wrote :

When you choose "Save and restore Window geometry for each document" and open a new document either
a) the default window size setting is used upon startup
   and the window is positioned however GTK+ prefers
b) the window position/size from the default template is used,
   obviously only if it is set in the default template
   (not the case for the templates that ships with Inkscape)

Revision history for this message
uwestoehr (uwestoehr) wrote :

> When you choose "Save and restore Window geometry for each document" and open a new document

This is not the use case. What I do is
- open a file
- change the window size and position of Inkscape
- modify the SVG and save it
- close Inkscape
- open the just modified SVG

result: this works

What fails is
- open the just modified SVG
- change the window size and position of Inkscape
- close Inkscape
- open the same SVG

result: this fails. So I found out that one has to change and save the SVG to get the desired window size and position on the next startup.

I can open a new bug(enhancement)report if you like because I have often cases where I just need to view several existing SVGs and therefore group the different Inkscape windows accordingly. Some days later I want to have the same grouping of the Inkscape windows.

Revision history for this message
Patrick Storz (ede123) wrote :

Window geometry is saved in the SVG file itself if "Save and restore Window geometry for each document" is selected, so there really is no other option than to re-save the file.

As I doubt saving the file each time on exit without asking the user is an option I'm not sure there's much that can be done...

Revision history for this message
uwestoehr (uwestoehr) wrote :

> so there really is no other option than to re-save the file.

OK then.

Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.