[regression] Restoring a maximized Gnome Terminal window with keybinding fails to restore the original geometry

Bug #1102024 reported by Sami Jaktholm
80
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Compiz
Invalid
Medium
Unassigned
compiz (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Steps to reproduce:
1. Open Gnome Terminal
2. Maximize the window with the maximize keybinding (Ctrl+Super+Up)
3. Immidiately restore the window with the restore window keybinding (Ctrl+Super+Down)

What happens:
- Window is unmaximized but it still fills the entire desktop

What should happen:
- Window returns to the exact size it had before maximation.

Testing this with Metacity and Mutter shows that this is compiz related (no problems there). It seems that Compiz properly restores the window but gnome-terminal immediately resizes the window back to it's maximized size. Gnome-terminal seems to react to focus in/out events by recalculating its size. When compiz restores the window, GTK apparently gives terminal the old size instead of the new one (maybe a syncing issue between compiz/X/gtk?)

Also present in the r3569 of compiz trunk.

Related bugs:
 * bug 1233205: maximize then unmaximize of gnome-terminal shrinks window

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: compiz 1:0.9.8.6-0ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-22.34-generic 3.5.7.2
Uname: Linux 3.5.0-22-generic x86_64
.tmp.unity.support.test.0:

ApportVersion: 2.6.1-0ubuntu9
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
Date: Sun Jan 20 13:31:27 2013
DistUpgraded: Fresh install
DistroCodename: quantal
DistroVariant: ubuntu
DkmsStatus:
 bbswitch, 0.4.2, 3.5.0-21-generic, x86_64: installed
 bbswitch, 0.4.2, 3.5.0-22-generic, x86_64: installed
 virtualbox, 4.1.18, 3.5.0-21-generic, x86_64: installed
 virtualbox, 4.1.18, 3.5.0-22-generic, x86_64: installed
GraphicsCard:
 Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: ASUSTeK Computer Inc. Device [1043:1587]
 NVIDIA Corporation Device [10de:0de3] (rev ff) (prog-if ff)
InstallationDate: Installed on 2013-01-16 (4 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MachineType: ASUSTeK COMPUTER INC. K56CM
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-22-generic.efi.signed root=UUID=a1e4abfc-dff4-4bbe-bf2b-76cfcad8ea43 ro quiet splash i915.i915_enable_fbc=1 i915.i915_enable_rc6=7 vt.handoff=7
SourcePackage: compiz
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/21/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: K56CM.206
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: K56CM
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrK56CM.206:bd08/21/2012:svnASUSTeKCOMPUTERINC.:pnK56CM:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnK56CM:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.name: K56CM
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.
version.compiz: compiz 1:0.9.8.6-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.39-0ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 9.0-0ubuntu1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 9.0-0ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.13.0-0ubuntu6.1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.3-0ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.99.99~git20120913.8637f772-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.20.9-0ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.2-0ubuntu3

Revision history for this message
Sami Jaktholm (sjakthol) wrote :
Changed in compiz:
milestone: none → 0.9.9.0
importance: Undecided → Medium
Changed in compiz (Ubuntu):
importance: Undecided → Medium
Changed in compiz:
milestone: 0.9.9.0 → 0.9.9.2
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in compiz (Ubuntu):
status: New → Confirmed
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Another way to reproduce this: (taken from bug 1138489)

To reproduce (both in currently released and trunk Unity):

 1. Open gnome-terminal
 2. Drag the terminal up to the panel to maximize
 3. Drag the terminal down to unmaximize (or click the unmaximize button). Observe the window maintains maximized proportions

Interestingly, if you switch focus to another application after step 2, the terminal *will* restore correctly.

Changed in compiz:
status: New → Triaged
importance: Medium → High
summary: - Restoring a maximized Gnome Terminal window with keybinding fails to
- restore the original geometry
+ [regression] Restoring a maximized Gnome Terminal window with keybinding
+ fails to restore the original geometry
Changed in compiz:
importance: High → Medium
Changed in compiz:
milestone: 0.9.9.2 → 0.9.10.0
Revision history for this message
Matthew Eaton (meaton) wrote :

This is a very annoying bug for me. I wish it were fixed in Raring but it's not.

Revision history for this message
Ben Gamari (bgamari) wrote :

Does a fix for this bug currently exist in unreleased form somewhere? This is really breaking my workflow.

MC Return (mc-return)
Changed in compiz:
assignee: nobody → MC Return (mc-return)
John Lea (johnlea)
Changed in compiz (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
David Perkinson (davidp-reed) wrote :

I've got the same problem with

Linux 3.8.0-22-generic #33-Ubuntu SMP Thu May 16 15:17:14 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I fix would be *much* appreciated. Does anyone know of a temporary workaround?

MC Return (mc-return)
Changed in compiz:
assignee: MC Return (mc-return) → nobody
MC Return (mc-return)
Changed in compiz:
milestone: 0.9.10.0 → 0.9.11.0
Piotr Darzyn (darzynp)
Changed in compiz:
status: Triaged → New
status: New → Incomplete
status: Incomplete → Opinion
status: Opinion → Invalid
status: Invalid → Confirmed
status: Confirmed → In Progress
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
Changed in compiz:
status: Fix Released → Triaged
Revision history for this message
Edwin Pujols (edwinpm5) wrote :

Still present in Saucy.

Revision history for this message
Edwin Pujols (edwinpm5) wrote :

Just noticed that `gtk_window_set_geometry_hints` and `GdkGeometry.base_width` and `GdkGeometry.base_height` are related to another bug, and quite possibly related to this one too.

In this bug, if I add a VteTerminal widget to a GtkWindow and use GtkWindow.set_geometry_hints as per the example on the Devhelp documentation, the result is that if I repeatedly press Ctrl+Super+Up then Ctrl+Super+Down (or maximized/restore via title bar dragging) the window size will slowly decrease to its minimum (this actually happens with xfce4-terminal).

Now if I set the GdkGeometry base size to, say, 80x24, the window size will decrease/increase automatically (via the sequence of maximize/restore) iff the current unmaximized size is different than the base size (that is, the window tries to restore to the base size of the geometry hint).

Don't know if this bug has being reported, but I think is related and a possible solution could imply updating the window base size to the size before maximization, so this "restoring" effect wouldn't be perceptible. Of course, this would be just a workaround since compiz looks like the main suspect, here.

The file in gnome-terminal is `src/terminal-window.c` and I think it would be needed to modify `terminal_window_update_geometry` and `terminal_window_set_size_force_grid` (in the latter is the misbehaving code, in the former is the gtk_window_set_geometry_hints stuff).

Scott Moser (smoser)
description: updated
Revision history for this message
Martin Kaistra (djfun) wrote :

cannot reproduce this in trusty anymore

Revision history for this message
Matthew Eaton (meaton) wrote :

Fixed in Trusty for me as well.

Revision history for this message
le_jawa (le-jawa-gmail) wrote :

I'm experiencing this in Trusty. I thought it had been fixed a while back, but evidently not. My system has a multi-monitor configuration, which may affect this. Screenshot attached.

Revision history for this message
Eleni Maria Stea (hikiko) wrote :

This bug is quite old and we didn't manage to reproduce it, therefore I marked it as invalid. If you still experience the problem please feel free to re-open it and update the description! Thank you!

Changed in compiz:
status: Triaged → Invalid
Changed in compiz (Ubuntu):
status: Triaged → Invalid
tags: added: rls-w-incoming
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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