Undecorated GtkWindow adds window decoration to its size.

Bug #1242625 reported by marmuta
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When creating a GtkWindow with set_decorated(False) the window apparently still adds title bar and frame extents to its size.
See attached python script. I expect it to open a square window of size 100,100, but what I get is a rectangular window of size 102, 129.

$ python3 undecoratated.py
configure-event w=100 h=100 origin=(1, 51, 78)
configure-event w=100 h=100 origin=(1, 51, 78)
configure-event w=100 h=100 origin=(1, 51, 78)
configure-event w=100 h=100 origin=(1, 51, 78)
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=102 h=129 origin=(1, 50, 50)
configure-event w=102 h=129 origin=(1, 50, 50)

This affects Onboard, but not in Saucy's default configuration where override redirect mode is enabled. With OR disabled, the (undecoratated) keyboard window and floating icon change size every time they are shown.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: libgtk-3-0 3.8.4-0ubuntu3
ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3
Uname: Linux 3.11.0-12-generic x86_64
ApportVersion: 2.12.5-0ubuntu2
Architecture: amd64
Date: Mon Oct 21 11:46:57 2013
MarkForUpload: True
SourcePackage: gtk+3.0
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
marmuta (marmuta) wrote :
Revision history for this message
Gerd Kohlberger (lowfi) wrote :

gerd@box01:~$ ./undecoratated.py
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=100 h=100 origin=(1, 50, 50)

Seems to work as expected, but I'm using gtk 3.10.0-0ubuntu1~saucy1 from the gnome3 ppa.
Maybe a bug in gtk 3.8.4 ??

Revision history for this message
marmuta (marmuta) wrote :

Thanks, but no change with gtk 3.10 from the gnome3 staging PPA. It looks more like a Compiz problem now. Here's what I get under various window managers:

kdm
$ python3 undecoratated.py
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=100 h=100 origin=(1, 50, 50)

metacity
$ python3 undecoratated.py
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=100 h=100 origin=(1, 50, 50)

mutter
$ python3 undecoratated.py
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=100 h=100 origin=(1, 50, 50)

Compiz/Unity
$ python3 undecoratated.py
configure-event w=100 h=100 origin=(1, 51, 78)
configure-event w=100 h=100 origin=(1, 51, 78)
configure-event w=100 h=100 origin=(1, 51, 78)
configure-event w=100 h=100 origin=(1, 51, 78)
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=102 h=129 origin=(1, 50, 50)
configure-event w=102 h=129 origin=(1, 50, 50)

Happens only in Unity for me, same with Onboard's windows resizing on their own. Can you reproduce it in there?

Revision history for this message
Gerd Kohlberger (lowfi) wrote :

Confirmed. It doesn't work with compit/unity. The output in Comment #2 was with mutter/gs.

marmuta (marmuta)
affects: gtk+3.0 (Ubuntu) → ubuntu
affects: ubuntu → compiz (Ubuntu)
Changed in compiz (Ubuntu):
status: New → Confirmed
Revision history for this message
marmuta (marmuta) wrote :

This bug appears to be fixed in Trusty.

$ python3 undecoratated.py
configure-event w=100 h=100 origin=(1, 0, 0)
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=100 h=100 origin=(1, 50, 50)
configure-event w=100 h=100 origin=(1, 50, 50)

All good, and it doesn't affect Onboard either anymore.

Ubuntu 14.04
Compiz 1:0.9.11+14.04.20140218-0ubuntu1
libgtk-3-0 3.10.7-0ubuntu2

Changed in compiz (Ubuntu):
status: Confirmed → 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.