Re: Patches: Various ways of easily relaunching applications
On Wed, Apr 04, 2012 at 12:48:45PM +0100, Iain Patterson wrote: Quoth Carlos R. Mafra, main.c: In function ‘RelaunchWindow’: main.c:461:1: warning: control reaches end of non-void function [-Wreturn-type] Actually we can't reach the end of the function because the three possible cases are Exit(-1), return False and return True. Of course if Exit() were ever changed the above statement might become incorrect. Some compiler food silences the warning. Another option for gcc is to apply __attribute__((noreturn)) to the Exit function definition in src/funcs.h, so the compiler knows the function never returns. void Exit(int status) __attribute__((noreturn)); ./WINGs/WINGs/WUtil.h (lines 31-33) already has the magic to make __attribute__ not break non-GCC compilers, BTW, although I don't know whether that is included whenever src/funcs.h is. -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: Patches: Various ways of easily relaunching applications
On Fri, 30 Mar 2012 at 17:52:29 +0100, Iain Patterson wrote: These patches implement three variations of what I consider to be a fairly useful feature of Windows 7 (of all things), namely the ability to middle click on a taskbar entry and have a new instance of that application be launched. So for example if you middle click on Explorer a new Explorer window pops up. I've split the patches up into separate methods of accomplishing the same thing in case one or more are seen as undesirable. Patch 1 defines a hotkey, WindowRelaunchKey, which when pushed will launch a new instance of the focused window. Patch 2 extends the functionality to the window menu, adding a new Launch entry to do the same thing. Patch 3 defines two ways to relaunch applications from their appicon, either by selecting the new Launch menu entry or with a Microsoft-style middle click. In all cases the target window's WM_COMMAND property is queried and used to build an argv list to launch a new instance of the application. If for some reason WM_COMMAND is not set it won't work. My first attempt used GetCommandForWindow() and ExecuteShellCommand() but that didn't handle complex WM_COMMAND arrays which aren't properly escaped, hence the addition of a slightly different exec()ing function. I applied all patches (including the fourth). But can you also add some words about this in the NEWS file? I worry about this new functionality never being used simply because people don't know about it. Ideally, one should update a documentation like http://windowmaker.org/guide_toc.php -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: Patches: Various ways of easily relaunching applications
On Fri, 30 Mar 2012 at 17:52:29 +0100, Iain Patterson wrote: I'm getting this warning after your patches main.c: In function ‘RelaunchWindow’: main.c:461:1: warning: control reaches end of non-void function [-Wreturn-type] Can you take a look? -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: Patches: Various ways of easily relaunching applications
Quoth Carlos R. Mafra, I applied all patches (including the fourth). But can you also add some words about this in the NEWS file? Done. From 3366e79359dc50951144fd66f102f964daab39e0 Mon Sep 17 00:00:00 2001 From: Iain Patterson w...@iain.cx Date: Wed, 4 Apr 2012 13:18:24 +0100 Subject: [PATCH 6/6] Describe relaunching in the NEWS file. --- NEWS | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index e9a6f7a..2f1c7bd 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,25 @@ NEWS for veteran Window Maker users --- 0.95.X +New application Relaunching functionality +- + +There are now several ways to launch a new instance of an application with the +same command line that was originally used to start it. + +1. By selecting Launch from the application's window menu. +2. By using the Launch new instance of application keyboard shortcut. +3. By clicking the application's appicon with the middle button. +4. By double-clicking the application's appicon while holding Control. + +For example, if you have two xterms open, one started with xterm and one +started with xterm -rv, using the Relaunch functionality on the first xterm +would run xterm and using it on the second would run xterm -rv. Thus +Relaunching can also be thought of as cloning an application. + +Application Relaunching works by examining the window's WM_COMMAND property and +so will not work if it is not set. + Options to limit the window/menu title height - -- 1.7.7.6
Re: Patches: Various ways of easily relaunching applications
On Wed, 4 Apr 2012 at 13:20:27 +0100, Iain Patterson wrote: Quoth Carlos R. Mafra, I applied all patches (including the fourth). But can you also add some words about this in the NEWS file? Done. Thanks a lot! -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: Patches: Various ways of easily relaunching applications
Quoth BALATON Zoltan, How does this relate to the existing Ctrl + Launch from the Dock or Clip functionality? Just asking in case you didn't know about that. If the app is docked or attached to the clip, very similar. Control + double click will launch the app using the command line defined in its settings. If the app is undocked, Control + double click currently will not launch it. The difference is that the new functionality will launch a new instance of the application using the same command line that was originally used. So for example if you ran xterm and xterm -rv then middle clicking the first xterm's undocked icon would launch xterm and middle clicking the second one's would launch xterm -rv again. That may be a different invocation from that defined in the docked application's settings. Useful if, like me, you have lots of applications buried in menus that you want to run fairly often but not often enough to warrant giving them their own hotkey. extending Ctrl + Launch functionality to [undocked appicons] could be more fitting to Window Maker in my opinion. That's a fair point. Adding Control + double click as an alternative way to invoke the new functionality would be just a few extra lines of code. -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: Patches: Various ways of easily relaunching applications
On Fri, 30 Mar 2012, Iain Patterson wrote: These patches implement three variations of what I consider to be a fairly useful feature of Windows 7 (of all things), namely the ability to middle click on a taskbar entry and have a new instance of that application be launched. So for example if you middle click on Explorer a new Explorer window pops up. How does this relate to the existing Ctrl + Launch from the Dock or Clip functionality? Just asking in case you didn't know about that. To me it looks similar but I haven't used Windows 7 so it may be different. The equivalent of the taskbar (if not the Clip set to attract icons) may be the undocked appicons so extending Ctrl + Launch functionality to these could be more fitting to Window Maker in my opinion. Regards, BALATON Zoltan -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.