qtmir destroys windows after requesting them to close

Bug #1671424 reported by Albert Astals Cid
54
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Canonical System Image
In Progress
High
Michał Sawicz
gtk+3.0 (Ubuntu)
Confirmed
Undecided
Unassigned
qtmir (Ubuntu)
In Progress
High
Lukáš Tinkl
unity8 (Ubuntu)
In Progress
High
Lukáš Tinkl

Bug Description

Using unity7:
 * Open kate
 * write something very important in the text area
 * Press Alt+F4 because you're not very smart
 * Get dialog saying you have unsaved changes
 * You can:
   * save (which ends in a quit after saving)
   * cancel the close

Using unity8
 * Open kate
 * write something very important in the text area
 * Press Alt+F4 because you're not very smart
 * You lost your very important text

description: updated
Michał Sawicz (saviq)
summary: - Applications can not reject Alt+F4
+ Applications can not interrupt closing them
Revision history for this message
Michał Sawicz (saviq) wrote : Re: Applications can not interrupt closing them

Part of the answer is "that's bad design, kate should store the state and restore it later".

But we will support this kind of behaviour anyway. Need to let the application reply "no" to the close request. We'll still need a "force quit" for misbehaving apps.

Changed in canonical-devices-system-image:
status: New → Triaged
Changed in qtmir (Ubuntu):
status: New → Triaged
Changed in unity8 (Ubuntu):
status: New → Triaged
Changed in canonical-devices-system-image:
importance: Undecided → Medium
importance: Medium → High
Changed in qtmir (Ubuntu):
importance: Undecided → High
Changed in unity8 (Ubuntu):
importance: Undecided → High
Changed in unity8 (Ubuntu):
assignee: nobody → Lukáš Tinkl (lukas-kde)
Changed in qtmir (Ubuntu):
assignee: nobody → Lukáš Tinkl (lukas-kde)
kevin gunn (kgunn72)
tags: added: unity8-desktop
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The test case with kate works correctly in mir_proving_server (Alt+F4 brings up a Save Documents dialog). It's only failing in Unity8.

And gedit apparently has the same Alt+F4 bug under Mir demo servers so GTK may need fixing too.

summary: - Applications can not interrupt closing them
+ Applications fail to interrupt closing them
tags: added: gtk-mir
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Applications fail to interrupt closing them

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

Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

See also bug 1672751

summary: - Applications fail to interrupt closing them
+ qtmir destroys windows after requesting them to close
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

qtmir always destroys a window if it doesn't do so itself after being requested to close.

Specially on desktop, requesting a window to close doesn't necessarily mean it should destroy itself. It's a common idiom for an application to just hide it instead, so it can be reused next time it's needed (particularly for child windows).

Some might even stay around and just popup a dialog if there's modified content that hasn't been saved yet.

So on desktop we should just send the close request without further expectations. On phone though, we should keep the current behavior of forcibly destroying the window if it doesn't comply after some time.

I wouldn't mix this bug with gtk+

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

Indeed the close button and Alt+F4 should never ever destroy a window.

They should just send the window an event: mir_event_type_close_window
Then it's up to the app how to proceed.

Changed in qtmir (Ubuntu):
assignee: Lukáš Tinkl (lukas-kde) → Daniel d'Andrada (dandrader)
Changed in unity8 (Ubuntu):
assignee: Lukáš Tinkl (lukas-kde) → Daniel d'Andrada (dandrader)
Changed in qtmir (Ubuntu):
status: Triaged → In Progress
Changed in unity8 (Ubuntu):
status: Triaged → In Progress
Changed in canonical-devices-system-image:
status: Triaged → In Progress
assignee: nobody → Michał Sawicz (saviq)
milestone: none → u8c-1
Michał Sawicz (saviq)
Changed in canonical-devices-system-image:
milestone: u8c-1 → u8c-z
Michał Sawicz (saviq)
Changed in qtmir (Ubuntu):
assignee: Daniel d'Andrada (dandrader) → Lukáš Tinkl (lukas-kde)
Changed in unity8 (Ubuntu):
assignee: Daniel d'Andrada (dandrader) → Lukáš Tinkl (lukas-kde)
Changed in canonical-devices-system-image:
milestone: u8c-z → u8c-2
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.