GTK+/Quartz: 'de-maximize' fails for documents opened in maximized state (incl. new documents)

Bug #1302627 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Low
Unassigned

Bug Description

Inkscape trunk builds with GTK+/Quartz on OS X cannot be 'de-maximized' if opened in a 'maximized' state - this is especially annoying with the recent change to open new documents per default as 'maximized' (with default prefs).

Steps to reproduce (trunk):
1) save a document in maximized state
2) quit inkscape
3) launch inkscape with the just saved file
4) de-maximize the maximized document window

Expected result:
The document window reverts to a small state if de-maximized via WM (buttons in the window decoration).

Actual result:
The document window size is unchanged (fills available screen area), and needs to be manually resized with the mouse.

Does not affect trunk builds using GTK+/X11, nor stable builds with either backend.

su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.91
Revision history for this message
su_v (suv-lp) wrote :

New window (based on default 'maximized') saved with GTK+/X11:

  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.35"
     inkscape:cx="375"
     inkscape:cy="520"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     showgrid="false"
     inkscape:window-width="1280"
     inkscape:window-height="752"
     inkscape:window-x="0"
     inkscape:window-y="0"
     inkscape:window-maximized="1" />

New window (based on default 'maximized') saved with GTK+/Quartz:

  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.35"
     inkscape:cx="375"
     inkscape:cy="520"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     showgrid="false"
     inkscape:window-width="1280"
     inkscape:window-height="752"
     inkscape:window-x="0"
     inkscape:window-y="22"
     inkscape:window-maximized="0" />

Under GTK+/Quartz the window state is not recorded as 'maximized', probably because the vertical offset (y) of 22px for the global menubar is not taken into account (either by GDK/Quartz, or by Inkscape).

Revision history for this message
su_v (suv-lp) wrote :

Addendum:
1) The actual screen size for above example is: 1280 x 800
2) Dock has 'Hiding' turned on (maximized windows extend to the bottom of the screen) [*]

--
[*] whether or not the Dock has 'Hiding' turned on makes no difference. If turned off, the recorded window height is reduced by the height of the Dock (with both backends equally), and the "maximized" window does not extend beyond the upper edge of the Dock.

Revision history for this message
su_v (suv-lp) wrote :

With latest GTK+ 3.12.0 (and latest stable gtkmm3 3.10.1) on OS X 10.7.5, the information stored in <namedview> when saving a new document (based on default, non-localized template) is identical to the one with GTK+ 2.24.23 (see comment #1), but neither build (X11- or Quartz-backend) can actually 'de-maximize' the enforced 'maximized' window state of the first new document window.

--
[ replaces comment #3 to fix typo in gtkmm3 version ]

Revision history for this message
su_v (suv-lp) wrote :

Temporary workaround for new documents committed in r13289, see also:
<http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/43186/focus=43378>

Changed in inkscape:
status: New → Triaged
su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Low
milestone: 0.91 → 0.92
Revision history for this message
su_v (suv-lp) wrote :

AFAICT upstream did not implement window-state events for the Quartz backend of GTK2 -> Inkscape's test for maximized window state "fails" if compiled with GTK+/Quartz. Thus the window information is saved "incorrectly" (with full dimensions of maximized window and unset 'maximized' state) in <namedview> and the document window cannot be unmaximized via window manager (the user instead has to manually resize it by dragging the edges/corners). The window state event works as expected with X11 backend though (tested with attached pygtk script [1] for both available backends (X11, Quartz) of GTK+ 2.24.30).

--
[1] pygtk docs:
https://developer.gnome.org/pygtk/stable/class-gdkevent.html#id2914311

Revision history for this message
su_v (suv-lp) wrote :

The test script converted to pygi (for GTK3) supports the window state event for both backends, likely related to this upstream commit (for the gtk3 branch):
* quartz: implement maximized/unmaximized
https://git.gnome.org/browse/gtk+/commit/?id=eb37fd22e7d50cfd5c6131aeaeb230469af5056c

Current state with Inkscape's experimental GTK3 builds needs yet to be investigated in detail (IIRC it seemed to vary with each minor upstream release …).

su_v (suv-lp)
tags: added: gtk-quartz
removed: gtk-osx
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.