[regression] Window resize granularity is lost when restored after using Grid

Bug #925867 reported by Daniel van Vugt
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Medium
Sami Jaktholm
Compiz Grid Plugin
Triaged
Medium
Unassigned
Compiz Main Plugins
Triaged
Medium
Unassigned
compiz (Ubuntu)
Fix Released
Medium
Sami Jaktholm
compiz-plugins-main (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When you resize a (new) terminal window, it only resizes in increments of the character size. This is correct behaviour. However after the Grid plugin has touched a window, it loses its resize increments/granularity.

Video attached.

TESTCASE:
1. Open a Terminal.
2. Resize it. Verify that it only resizes in granular increments.
3. Drag the window to the left or right of the screen to trigger Grid.
4. Restore the window.
5. Resize it again. Notice the granular increments are gone. That is the bug.
Expected result:
5. Resize it again. Verify that it only resizes in granular increments.

I suspect this is the cause (in grid.cpp):
                /* Be evil */
                if (cw->sizeHints ().flags & PResizeInc)
                {
                    gw->sizeHintsFlags |= PResizeInc;
                    gw->window->sizeHints ().flags &= ~(PResizeInc);
                }
and it seems the restore code to undo the above hack never gets called:
    if (gw->isGridMaximized & !(cw->state () & MAXIMIZE_STATE))
    {
        gw->window->sizeHints ().flags |= gw->sizeHintsFlags;
        gw->isGridMaximized = false;

Related branches

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in compiz-grid-plugin:
importance: Undecided → Medium
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think the sizeHints hacking (if that is the cause) needs to be removed. It is more correct to have a window whose width is a multiple of the terminal character size than to unconditionally semi-maximize to exactly 50% of the screen width.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug is probably a regression caused by this fix: bug 865179

summary: - Window resize granularity is lost after being semi-maximized by the Grid
- plugin
+ [regression] Window resize granularity is lost after being semi-
+ maximized by the Grid plugin
tags: added: regression-update
Changed in compiz-grid-plugin:
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Though, with respect to comment #2, we could just fix the broken undo code causing this bug without reverting the fix for bug 865179.

description: updated
tags: added: testcase
summary: - [regression] Window resize granularity is lost after being semi-
- maximized by the Grid plugin
+ [regression] Window resize granularity is lost when restored after using
+ Grid
affects: compiz-grid-plugin → compiz-plugins-main
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in compiz-plugins-main (Ubuntu):
status: New → Confirmed
Changed in compiz-grid-plugin:
status: New → Triaged
importance: Undecided → Medium
Changed in compiz:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.9~daily13.01.14-0ubuntu1

---------------
compiz (1:0.9.9~daily13.01.14-0ubuntu1) raring; urgency=low

  [ sampo555 ]
  * compiz crashed with SIGSEGV in DodgeAnim::applyDodgeTransform() (LP:
    #1048840)
  * compiz crashing if window un-/minimize animation is "Random" (LP:
    #1098185)

  [ Daniel van Vugt ]
  * Several leaks in new GLProgram from compileProgram() from
    GLScreen::getProgram() from GLWindowAutoProgram::getProgram() (LP:
    #1097644)

  [ Sam Spilsbury ]
  * Several leaks in ccsIntegratedSettingListAppend() ... from
    ccsGNOMEIntegrationBackendGetIntegratedSetting() from readSetting
    (gsettings.c:375) (LP: #1097661)

  [ MC Return ]
  * Thumbnail Window Previews: Flickering of background/glow and window
    title text (LP: #1098758)

  [ Automatic PS uploader ]
  * Automatic snapshot from revision 3561
 -- Automatic PS uploader <email address hidden> Mon, 14 Jan 2013 04:03:09 +0000

Changed in compiz (Ubuntu):
status: New → Fix Released
Revision history for this message
Sami Jaktholm (sjakthol) wrote :

No, this isn't fixed yet (but I can't change the status). Wonder why launchpad thinks this is...

Changed in compiz:
milestone: none → 0.9.9.0
status: Triaged → In Progress
assignee: nobody → sampo555 (sampo555)
Changed in compiz (Ubuntu):
status: Fix Released → In Progress
importance: Undecided → Medium
assignee: nobody → sampo555 (sampo555)
Changed in compiz:
milestone: 0.9.9.0 → 0.9.9.2
milestone: 0.9.9.2 → 0.9.9.0
Changed in compiz:
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:compiz at revision 3578, scheduled for release in Compiz 0.9.9.0

Changed in compiz (Ubuntu):
status: In Progress → Fix Committed
Changed in compiz:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.9~daily13.01.25-0ubuntu1

---------------
compiz (1:0.9.9~daily13.01.25-0ubuntu1) raring; urgency=low

  [ Didier Roche ]
  * Really take default patched hsize and vsize and don't override them
    to fix (LP: #868423)

  [ sampo555 ]
  * [regression] Window resize granularity is lost when restored after
    using Grid (LP: #925867)
  * Window management - Restoring a grid-placed window by dragging the
    title bar downwards does not restore the original window width (LP:
    #878516)

  [ Daniel van Vugt ]
  * Several memory leaks in
    google::protobuf::DescriptorPool::InternalAddGeneratedFile() from
    google::protobuf::protobuf_AddDesc_*() (LP: #1102829)
  * Several leaks in g_settings_new() [g_object_new()] from
    ccsGSettingsNewNoPath() [ccs_gsettings_interface_wrapper.c:184] (LP:
    #1097649)
  * Several memory leaks in g_signal_new() ... from
    ccsGSettingsWrapperNewForSchema()
    [ccs_gsettings_interface_wrapper.c:184] from initBackend()
    [gsettings.c:468] (LP: #1102822)

  [ Sam Spilsbury ]
  * Several memory leaks in strdup() from
    ccsGSettingsIntegratedSettingReadValue() from
    ccsGNOMEIntegrationBackendReadISAndSetSettingForType() from
    ccsGNOMEIntegrationBackendReadOptionIntoSetting() (LP: #1100564)

  [ MC Return ]
  * Coverity MISSING_BREAK - CID 12468 (LP: #1101430)
  * Coverity MISSING_BREAK - CID 12466 (LP: #1101558)
  * Coverity MISSING_BREAK - CID 12467 (LP: #1101465)
  * Showmouse plugin: Possible values of the particle life setting can
    destroy the plugin's functionality (LP: #1098877)
  * Coverity MISSING_BREAK - CID 12465 (LP: #1101557)

  [ Automatic PS uploader ]
  * Automatic snapshot from revision 3582
 -- Automatic PS uploader <email address hidden> Fri, 25 Jan 2013 04:03:43 +0000

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