<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Am 20.09.2016 um 11:56 schrieb Stephan Bergmann:<br>
<blockquote cite="mid:4c1018de-f992-a380-f85c-a6252a479d28@redhat.com" type="cite">
<pre wrap="">On 09/20/2016 08:30 AM, Samuel Mehrbrodt wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Am 19.09.2016 um 17:29 schrieb Stephan Bergmann:
</pre>
<blockquote type="cite">
<pre wrap="">On 09/19/2016 05:17 PM, Samuel Mehrbrodt wrote:
</pre>
<blockquote type="cite">
<pre wrap="">It turned out we need to implement both. The first option was fine when
only closing the window - but we also want to be able to close the
visible frames with "File->Exit" while keeping the process running.
</pre>
</blockquote>
<pre wrap="">Do we?  I think there is probably a difference in what we can imply as
user-expected behavior between closing the last window (via "Window -
Close Window" or whatever desktop-environment--specific trigger) and
terminating LO (via "File - Exit LibreOffice").
</pre>
</blockquote>
<pre wrap="">
Well, with my patches, there will be a difference. Closing the window
will leave the process running, and chosing File->Exit will kill the
process.

What I did change in my second patch is the behavior of File->Exit when
using the TerminationVetoException.
Before it prevented closing the windows *and* terminating the process -
after my patch it only prevents termination.
</pre>
</blockquote>
<pre wrap="">
But throwing a TerminationVetoException isn't something that the user 
will be aware of.  Today, when doing "File - Exit LibreOffice", the user 
is made aware that terminating LO does not work (because of external 
connections and TerminationVetoExceptions) by the fact that its windows 
will not close (whether or not that is a good way of communicating this 
to the user).  In the future, the user would no longer be made aware 
(while I think they should be, in whatever form).</pre>
</blockquote>
I understand your point. On the other hand, the name TerminationVetoException suggests that it prevents termination - nothing more.<br>
If people still want to prevent closing windows they can always use CloseVetoException.<br>
<br>
As an external application developer, I just want to make sure that nobody can exit the soffice process, but I want users to still be able to use the "normal" LibreOffice installation as they are used to.<br>
For the user it would be a bug that they cannot close the last window. He doesn't know that there is some other application that demands a running office instance.<br>
<br>
But even with my patch, you can still have the behavior that you describe (the user should notice that the process keeps running). You just need to also throw the CloseVetoException:<br>
<br>
Maybe this table explains it a bit:<br>
<br>
<table cellpadding="2" cellspacing="2" width="800" border="1">
<tbody>
<tr>
<td valign="top"><b>Wanted behavior</b><b><br>
</b></td>
<td valign="top"><b>Before my patch</b><b><br>
</b></td>
<td valign="top"><b>After my patch</b><b><br>
</b></td>
</tr>
<tr>
<td valign="top">I want to forbid closing windows<br>
</td>
<td valign="top">CloseVetoException<br>
</td>
<td valign="top">CloseVetoException<br>
</td>
</tr>
<tr>
<td valign="top">I want to forbid terminating the Office (but allow closing windows)<br>
</td>
<td valign="top">?? -> Nothing here<br>
</td>
<td valign="top">TerminationVetoException<br>
</td>
</tr>
<tr>
<td valign="top">I want to forbid terminating the Office and closing windows<br>
</td>
<td valign="top">TerminationVetoException<br>
</td>
<td valign="top">TerminationVetoException + CloseVetoException<br>
</td>
</tr>
</tbody>
</table>
<br>
I can't see any real downside of this, except that maybe some people need to make some changes in their application if they want the same behavior as before.<br>
Anyway, if you have any other suggestion how to achieve this, I'm open for it.<br>
<br>
Thanks<br>
Samuel<br>
</body>
</html>