#1 2009-09-01 16:48

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Additional actions: Close a window or process

Can we have the following additional actions:

1. Close a window (defined by its title as seen in its title bar)
2. Close a process (identified by the PID)
3. Close a running executable (same as "run" command- point to location of file)

Some windows do not close easily. Provide option to force them to close.

In most cases, the process pops up a window (are you sure? yes/no).
Allow user to define a response, so that the process can close gracefully.

Offline

#2 2009-10-06 05:12

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: Additional actions: Close a window or process

I made a new discovery: If an application is running in the system tray, Shutter cannot close it.

Many applications start in system tray, or they go to system tray when the user minimizes/closes them.
In other words, a casual act by the user (of minimizing the application) will let it break free from Shutter's control!

Suggestion:
Either add the "close process" capability, or (better), add an option to close an application that is running in the system tray (but not  having a running window).

Last edited by narayan (2009-10-06 05:14)

Offline

#3 2009-10-06 09:56

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: Additional actions: Close a window or process

I've found that when you activate the option in any application to "close to tray" (uTorrent for example), it interprets Alt+F4, pressing the X button etc. (WM_CLOSE message if I'm not mistaken) as a sign to minimize the app. to the tray. In this case closing it by force often leads to data loss etc. I've tested this with uTorrent and the windows command TaskKill and found that without the /F (forcefully terminate process) option, all it does is minimize uTorrent to the tray. But /F causes data loss and on restarting the app it goes into a lengthy re-check of every active torrent that increases wear and tear on my HDDs as well.

So it would indeed be nice if there was a way Shutter could gracefully close such apps without simply killing them outright. Maybe it could figure out how (using uTorrent as an example again) File > Exit works or even Exit in the tray icon's context menu?

Offline

#4 2009-10-06 11:18

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: Additional actions: Close a window or process

Probably that is because killing does not answer the application's last pop-up:
Do you want to exit(Y/N)?

So killing is equal to a crash (which corrupts the exit state of the application).

But I have observed that if the window is visible, Shutter is able to handle that exit dialog.
So the same should be extended to the application that is running from system tray.

****
In any case process-names seem to be better handles for controlling applications, because my systernals Process Explorer shows all running processes, regardless of whether they are displayed in the Task bar or System tray.

Two additional design considerations:
1. How to present the process-names (especially those that have not yet started)?
2. Would it be required to kill a process tree rather than a process by itself?
    (Some applications run multiple processes, all of which need to be closed properly.)

Last edited by narayan (2009-10-06 11:21)

Offline

#5 2009-10-06 21:22

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: Additional actions: Close a window or process

narayan wrote:

Probably that is because killing does not answer the application's last pop-up:
Do you want to exit(Y/N)?

I have the option to ask that question turned off. It irritates me no end. hmm

Offline

#6 2009-10-06 22:51

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Additional actions: Close a window or process

I have added "Kill Process" action. This simply terminates a process specified by a filename.

NOTE: This action does not close application normally and this can cause potential lose of application's data. Works like killing a process from a task manager.

Offline

#7 2009-10-07 03:07

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: Additional actions: Close a window or process

This is a great for monitoring buggy apps that sometimes hang (we can now kill them easily when they become unresponsive.) I think you added a great feature to Shutter! smile

Ok coming back to our main topic.

If there is a data loss, this does not serve the purpose. In some applications, the data is lost permanently, and in others we have to recover it manually. Either way not worth attempting.

Can we think of a Quit command, such that it works on any application running in the system tray, using the context menu of that target application?

In this scenario, the user has to first check which particular context menu option exits gracefully. Then he has to enter that as a parameter for the Quit command in Shutter.
So Shutter would actually use the context menu of the target application to exit gracefully (as if it is being done manually).

Of course, given the diversity of the context menus in system tray, Shutter may not be able to control ALL the applications with this command. But if a majority of them are covered, we will be happy indeed! smile

Offline

Board footer

Powered by FluxBB