Open File -> Window opens offscreen

Bug #167714 reported by Idangazit
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Johan Engelen

Bug Description

Version: 0.43 (about window says 0.43 nov 23 2005).
Platform: win32 XP SP2 (Haven't checked on other
platforms).
Reproducibility: Always

Steps to trigger the issue:

1. Open affected SVG files.
2. Window opens offscreen and there's no way to make it
come back into view. I can see the window "growing"
right off the screen towards the same off-screen
location every time I open the file.

Poking around in the svg file (I attached one from the
Tango Project which triggers this behavior every single
time), I see a few properties which are the likely
culprits:

inkscape:window-width="1024"
inkscape:window-height="1022"
inkscape:window-x="2291"
inkscape:window-y="78"

Probably, this document was created somewhere on a
machine that sports a Xinerama desktop. In the context
of my monitor (1280x1024), an X-coord of 2291 doesn't
make sense, Inkscape should notice this and position
the window in some sensible default location like the
middle of the screen.

I suggest the following corrected behavior:

1. Upon opening a file, check to see that the window's
coordinates are not within 100 pixels of the screen's edge.

2. If the window is outside of the "safe zone", resize
and display it centered on the screen. Don't make a
change to the file yet -- if users are just browsing to
see, they shouldn't have a "do you want to save" dialog
displayed for just viewing the file.

3. If any other change is made to the file, then also
store the new coordinates. When the user saves the new
window-x/window-y values will be written along with all
of the other changes.
Some additional information:

Thanks for a wonderful app!

Idan Gazit
idan AT fastmail DOT fm.

Revision history for this message
Idangazit (idangazit) wrote :
Revision history for this message
Rwst (rwst) wrote :

this is not exactly a bug (garbage in garbage out) and a
duplicate of a feature request:

http://sourceforge.net/tracker/index.php?func=detail&aid=1045031&group_id=93438&atid=604309

I have added your suggestions to the feature request. thanks.

Revision history for this message
Idangazit (idangazit) wrote :

I'm not an Inkscape developer, so ultimately this decision
lies with you. That being said, I disagree with this being a
"feature request", and I'll try to make my case.

1. The feature request you link to covers a related case,
whereby you get a too-large window on the screen. This
subcase is related from a technological point-of-view, but
from a functionality viewpoint it is completely different.
In that case, you have an inconvenienced user who must move
and resize the window a little in order to work. In the case
of windows opening offscreen, there is *no way* for users to
"fix" the brokenness short of knowing how to hand-edit svg
files.

2. "Garbage in Garbage out" is fine if you're talking about
file contents -- I don't assert that you should make special
efforts to render a garbage shape or gradient. However in
this case, we're talking about application metadata created
by, in this case, Inkscape. Either inkscape should be
producing files which open at some sane location, or
inkscape should have a little extra smarts when it comes to
opening files which have metadata that place the window
offscreen. If your problem is with the garbage, then fix it
on either end, since inkscape is the one producing the
garbage data too.

I believe that fixing the loading side of things is the
better approach since it will allow Inkscape to deal
gracefully with "garbage" metadata of this kind from other
SVG producers as well. Fixing how inkscape saves documents
breaks saved-placement functionality, would have to rely on
a lowest-common-denominator solution like placing the window
at 0x0 on a 640x480 screen, etc...

This is not a new feature, it's a bug. A bug which cannot be
circumvented in some fashion from within inkscape, and which
results in an unusable application unless you know that SVG
files are just XML, and decide to go digging inside to fix them.

Please reconsider the classification. I won't bug again, and
I'm not trolling, just making a (hopefully well-reasoned and
-worded) case. If not, I apologize for marking the bug REOP
and my thanks either way for an app I love and cherish.

-Idan

Revision history for this message
Idangazit (idangazit) wrote :

I'll go one better: if you can point me in the direction of
where window placement happens upon open -- I would be happy
to write a patch myself and submit.

Revision history for this message
Rwst (rwst) wrote :

the first place where I would look is inkscape.cpp and
main.cpp . don't let yourself be fooled by possible code
paths ("new-gui") using classes in application/ and ui/.
this code is not activated at the moment.

I will certainly look at this too.

Revision history for this message
Fussel73 (fussel73) wrote :

I am a wannabe user of Inkscape. I would like to change from
CorelDraw to Inkscape, but I am writing here in STRONG
support to classify this issue as a high priority BUG.

I would like to describe my own experience which keeps me
from using Inkscape at all.

I just downloaded Inkscape and wanted to try it, but most
dialog windows are shown off-screen with only a very small
amount being on-screen.

I am not loading any "garbage" SVG (because I cannot see the
OpenFile dialog). E.g. I just wanted to save a drawing, edit
some settings and all of these dialogs are shown partly
off-screen and I can't move them on-screen in any way (there
is no SVG I could hand-edit, no property-file I can find).

So for me, I can't use Inkscape at the moment at all.

Now my (maybe unusual) configuration:
Windows XP SP2
NVIDIA GeForce FX5700 in DualView mode
Two DVI Monitors (IBM L200p) in 1600x1200
one monitor is landscape, the other portrait

I really would like to give Inkscape a try but for that I
need to be able to USE it. Please insert some sanity check
for all window/dialog positioning SOON and make this a high
prio BUG.

Revision history for this message
Bug Importer (bug-importer) wrote :

> most dialog windows are shown off-screen

I doubt that has anything with this bug to do..

> point me in the direction of where window placement
happens

Maybe sp_namedview_window_from_document() in sp-
namedview.cpp

Revision history for this message
Shio Kara (shiokara) wrote :

Originator: NO

I have observed the same behavior. In my case, the file was created on a
laptop computer with external monitor used as an extended desktop. The
file was created on the external monitor. After saving the file, when
attempting to open the file on the laptop without external monitor
attached, the window flies off the side of the laptop screen.

One semi-workaround is to maximize the window. However, there is no way
to restore the window to the laptop screen. Only the maximized window is
viewable.

This seems to me to clearly be a bug. It is a problem created through
normal use of Inkscape. A valid file is created using Inkscape. A valid
file is opened and cannot be viewed properly. I didn't even know it was
possible for a window to open completely offscreen...I don't see how this
could be considered acceptable. Even a warning suggesting adjustment of
the file by hand might suffice.

As for exposure, I would expect that the use of multiple monitors is
fairly common with drawing applications. So I would expect many people to
encounter this bug.

Revision history for this message
Johan Engelen (johanengelen) wrote :

Originator: NO

This is fixed in 0.45. Also the dialogues issue. If you still find a way
to spawn a window or dialog offscreen please file a new bug.

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.