qtmir destroys windows after requesting them to close

Bug #1671424 reported by Albert Astals Cid on 2017-03-09
54
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Canonical System Image
High
Michał Sawicz
gtk+3.0 (Ubuntu)
Undecided
Unassigned
qtmir (Ubuntu)
High
Lukáš Tinkl
unity8 (Ubuntu)
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) on 2017-03-09
summary: - Applications can not reject Alt+F4
+ 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) on 2017-03-09
tags: added: unity8-desktop
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

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

Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
Daniel van Vugt (vanvugt) wrote :

See also bug 1672751

summary: - Applications fail to interrupt closing them
+ qtmir destroys windows after requesting them to close
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+

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) on 2017-03-23
Changed in canonical-devices-system-image:
milestone: u8c-1 → u8c-z
Michał Sawicz (saviq) on 2017-04-04
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  Edit
Everyone can see this information.

Other bug subscribers