[API][DecoratedWindow] Add option to avoid destroying the window when the close button is clicked

Bug #1002039 reported by Victor Martinez on 2012-05-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Granite
Fix Released
High
Victor Martinez

Bug Description

In order to achieve better performance and avoid constant redrawing, sometimes it's better to hide a window instead of destroying/re-creating it. This is the case of Noise's album view popover.

The decorated window API needs an option to hide the window, instead of destroying it, when the close button is clicked. I suggest something like:

public bool hide_on_close { get; set; default = false; }

Related branches

Victor Martinez (victored) wrote :

Marking as high-priority since Noise needs it.

Changed in granite:
importance: Undecided → High
milestone: none → 0.1.1
status: New → Confirmed
tags: added: api bitesize decorated-window
Changed in granite:
assignee: nobody → Victor Eduardo (victored)
status: Confirmed → In Progress
Cody Garver (codygarver) on 2012-05-20
Changed in granite:
status: In Progress → Fix Committed
Christian Dywan (kalikiana) wrote :

How about using delete-event instead to stay in line with Gtk.Window API?

Victor Martinez (victored) wrote :

Not a bad idea. We probably want to change that before releasing the next version.

Victor Martinez (victored) wrote :

Okay, the new implementation is available on: lp:~victored/granite/decorated-window-api-fixes
It uses the delete-event instead of a custom property. Thanks for the suggestion Christian!

summary: - [API][DecoratedWindow] Add hide-on-close option
+ [API][DecoratedWindow] Add option to avoid destroying the window when
+ the close button is clicked
Changed in granite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers