[Touch-packages] [Bug 1624407] Re: Add a 'quit' message that is app-wide, as opposed to mir_event_type_close_surface

2017-03-21 Thread Daniel van Vugt
Generally speaking fixing bug 1674749 (now bug 1671424) should be enough
for most apps in the short term.

I'm reminded of how Microsoft handles this problem...

WM_CLOSE: https://msdn.microsoft.com/en-
us/library/windows/desktop/ms632617(v=vs.85).aspx

WM_QUIT: 
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632641(v=vs.85).aspx
"The WM_QUIT message is not associated with a window and therefore will never 
be received through a window's window procedure."

WM_POWERBROADCAST: https://msdn.microsoft.com/en-
us/library/windows/desktop/aa373247(v=vs.85).aspx

WM_ENDSESSION: https://msdn.microsoft.com/en-
us/library/windows/desktop/aa376889(v=vs.85).aspx

Each has a valid use case, and I don't think we can get away from
similarly wanting a 'quit' message in Mir eventually.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1624407

Title:
  Add a 'quit' message that is app-wide, as opposed to
  mir_event_type_close_surface

Status in Mir:
  Triaged
Status in mir package in Ubuntu:
  Triaged
Status in qtmir package in Ubuntu:
  Confirmed
Status in unity8 package in Ubuntu:
  Confirmed

Bug description:
  Currently in unity8, when requesting to "Quit" a running application
  from the launcher, what happens is that qtmir goes through all its
  associated windows/surfaces, and closes them one by one. Supposedly,
  when the last window is closed, the application terminates itself (but
  this is not necessarily the case, see
  https://doc.qt.io/qt-5/qguiapplication.html#quitOnLastWindowClosed-
  prop).

  This prevents application authors from doing proper cleanup before the
  app is closed. For example in Qt, the QCoreApplication::aboutToQuit()
  signal is emitted only after all windows have been closed, so the
  application doesn’t get a chance to e.g. save the list of open windows
  (real use case for multi-window browser application which saves the
  current session).

  This is similar to unity7’s implementation by the way, but I think
  it’s wrong. Surely there must be a way (maybe toolkit-specific) to
  request an app to terminate itself (and fall back to closing all
  windows if not).

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1624407/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1624407] Re: Add a 'quit' message that is app-wide, as opposed to mir_event_type_close_surface

2017-03-21 Thread Olivier Tilloy
I’m not sure how a fix for bug #1674749 would address the use case in
the description: a multi-window application (such as web browser) wants
to distinguish between:

 - please close all windows one by one without retaining state for them

 - please quit the app, and save the state for all windows and tabs in
them

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1624407

Title:
  Add a 'quit' message that is app-wide, as opposed to
  mir_event_type_close_surface

Status in Mir:
  Triaged
Status in mir package in Ubuntu:
  Triaged
Status in qtmir package in Ubuntu:
  Confirmed
Status in unity8 package in Ubuntu:
  Confirmed

Bug description:
  Currently in unity8, when requesting to "Quit" a running application
  from the launcher, what happens is that qtmir goes through all its
  associated windows/surfaces, and closes them one by one. Supposedly,
  when the last window is closed, the application terminates itself (but
  this is not necessarily the case, see
  https://doc.qt.io/qt-5/qguiapplication.html#quitOnLastWindowClosed-
  prop).

  This prevents application authors from doing proper cleanup before the
  app is closed. For example in Qt, the QCoreApplication::aboutToQuit()
  signal is emitted only after all windows have been closed, so the
  application doesn’t get a chance to e.g. save the list of open windows
  (real use case for multi-window browser application which saves the
  current session).

  This is similar to unity7’s implementation by the way, but I think
  it’s wrong. Surely there must be a way (maybe toolkit-specific) to
  request an app to terminate itself (and fall back to closing all
  windows if not).

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1624407/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1624407] Re: Add a 'quit' message that is app-wide, as opposed to mir_event_type_close_surface

2017-03-21 Thread Daniel d'Andrada
Maybe a fix for bug 1674749 is what you want.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1624407

Title:
  Add a 'quit' message that is app-wide, as opposed to
  mir_event_type_close_surface

Status in Mir:
  Triaged
Status in mir package in Ubuntu:
  Triaged
Status in qtmir package in Ubuntu:
  Confirmed
Status in unity8 package in Ubuntu:
  Confirmed

Bug description:
  Currently in unity8, when requesting to "Quit" a running application
  from the launcher, what happens is that qtmir goes through all its
  associated windows/surfaces, and closes them one by one. Supposedly,
  when the last window is closed, the application terminates itself (but
  this is not necessarily the case, see
  https://doc.qt.io/qt-5/qguiapplication.html#quitOnLastWindowClosed-
  prop).

  This prevents application authors from doing proper cleanup before the
  app is closed. For example in Qt, the QCoreApplication::aboutToQuit()
  signal is emitted only after all windows have been closed, so the
  application doesn’t get a chance to e.g. save the list of open windows
  (real use case for multi-window browser application which saves the
  current session).

  This is similar to unity7’s implementation by the way, but I think
  it’s wrong. Surely there must be a way (maybe toolkit-specific) to
  request an app to terminate itself (and fall back to closing all
  windows if not).

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1624407/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1624407] Re: Add a 'quit' message that is app-wide, as opposed to mir_event_type_close_surface

2017-03-02 Thread Daniel van Vugt
Clicking on a window's close button sends the app
mir_event_type_close_window. That's just an informational message that
apps are meant to act on (e.g. pop up a dialog if not terminate
themselves).

If you mean logout however, then I guess the right answer is that shells
should send mir_event_type_{close_window,quit_app} to all apps on
logout, and wait until the apps are no longer running (user responds to
dialogs from apps with unsaved work or some timeout expires).

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1624407

Title:
  Add a 'quit' message that is app-wide, as opposed to
  mir_event_type_close_surface

Status in Mir:
  Triaged
Status in mir package in Ubuntu:
  Triaged
Status in qtmir package in Ubuntu:
  Confirmed
Status in unity8 package in Ubuntu:
  Confirmed

Bug description:
  Currently in unity8, when requesting to "Quit" a running application
  from the launcher, what happens is that qtmir goes through all its
  associated windows/surfaces, and closes them one by one. Supposedly,
  when the last window is closed, the application terminates itself (but
  this is not necessarily the case, see
  https://doc.qt.io/qt-5/qguiapplication.html#quitOnLastWindowClosed-
  prop).

  This prevents application authors from doing proper cleanup before the
  app is closed. For example in Qt, the QCoreApplication::aboutToQuit()
  signal is emitted only after all windows have been closed, so the
  application doesn’t get a chance to e.g. save the list of open windows
  (real use case for multi-window browser application which saves the
  current session).

  This is similar to unity7’s implementation by the way, but I think
  it’s wrong. Surely there must be a way (maybe toolkit-specific) to
  request an app to terminate itself (and fall back to closing all
  windows if not).

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1624407/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1624407] Re: Add a 'quit' message that is app-wide, as opposed to mir_event_type_close_surface

2017-03-02 Thread Gerry Boland
Does Mir provide enough api to allow application ask user a question
before shutdown? In Unity7, typically that is requesting focus and
popping up a dialog - should be ok, but good to think about it.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1624407

Title:
  Add a 'quit' message that is app-wide, as opposed to
  mir_event_type_close_surface

Status in Mir:
  Triaged
Status in mir package in Ubuntu:
  Triaged
Status in qtmir package in Ubuntu:
  Confirmed
Status in unity8 package in Ubuntu:
  Confirmed

Bug description:
  Currently in unity8, when requesting to "Quit" a running application
  from the launcher, what happens is that qtmir goes through all its
  associated windows/surfaces, and closes them one by one. Supposedly,
  when the last window is closed, the application terminates itself (but
  this is not necessarily the case, see
  https://doc.qt.io/qt-5/qguiapplication.html#quitOnLastWindowClosed-
  prop).

  This prevents application authors from doing proper cleanup before the
  app is closed. For example in Qt, the QCoreApplication::aboutToQuit()
  signal is emitted only after all windows have been closed, so the
  application doesn’t get a chance to e.g. save the list of open windows
  (real use case for multi-window browser application which saves the
  current session).

  This is similar to unity7’s implementation by the way, but I think
  it’s wrong. Surely there must be a way (maybe toolkit-specific) to
  request an app to terminate itself (and fall back to closing all
  windows if not).

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1624407/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1624407] Re: Add a 'quit' message that is app-wide, as opposed to mir_event_type_close_surface

2016-11-20 Thread Daniel van Vugt
** Summary changed:

- Closing an application doesn’t actually close it, it merely requests all its 
windows to be closed
+ Add a 'quit' message that is app-wide, as opposed to 
mir_event_type_close_surface

** Changed in: mir
   Status: New => Triaged

** Changed in: mir (Ubuntu)
   Status: New => Triaged

** Tags added: clientapi

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity8 in Ubuntu.
https://bugs.launchpad.net/bugs/1624407

Title:
  Add a 'quit' message that is app-wide, as opposed to
  mir_event_type_close_surface

Status in Mir:
  Triaged
Status in mir package in Ubuntu:
  Triaged
Status in qtmir package in Ubuntu:
  Confirmed
Status in unity8 package in Ubuntu:
  Confirmed

Bug description:
  Currently in unity8, when requesting to "Quit" a running application
  from the launcher, what happens is that qtmir goes through all its
  associated windows/surfaces, and closes them one by one. Supposedly,
  when the last window is closed, the application terminates itself (but
  this is not necessarily the case, see
  https://doc.qt.io/qt-5/qguiapplication.html#quitOnLastWindowClosed-
  prop).

  This prevents application authors from doing proper cleanup before the
  app is closed. For example in Qt, the QCoreApplication::aboutToQuit()
  signal is emitted only after all windows have been closed, so the
  application doesn’t get a chance to e.g. save the list of open windows
  (real use case for multi-window browser application which saves the
  current session).

  This is similar to unity7’s implementation by the way, but I think
  it’s wrong. Surely there must be a way (maybe toolkit-specific) to
  request an app to terminate itself (and fall back to closing all
  windows if not).

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1624407/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp