[commit] r2206 - quit when window closed if option -closequit or SQUEAK_CLOSEQUIT set

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2206 - quit when window closed if option -closequit or SQUEAK_CLOSEQUIT set

commits-3
 
Author: piumarta
Date: 2010-05-11 17:02:20 -0700 (Tue, 11 May 2010)
New Revision: 2206

Modified:
   trunk/platforms/unix/ChangeLog
   trunk/platforms/unix/vm-display-X11/sqUnixX11.c
Log:
quit when window closed if option -closequit or SQUEAK_CLOSEQUIT set

Modified: trunk/platforms/unix/ChangeLog
===================================================================
--- trunk/platforms/unix/ChangeLog 2010-04-29 17:17:54 UTC (rev 2205)
+++ trunk/platforms/unix/ChangeLog 2010-05-12 00:02:20 UTC (rev 2206)
@@ -1,3 +1,8 @@
+2010-05-11  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>
+
+ * vm-display-X11/sqUnixX11.c: Add option -closequit and
+ environment variable SQUEAK_CLOSEQUIT.
+
 2010-04-13  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>
 
  * doc/RELEASE_NOTES_4.0.3.2202: Release 4.0.3.2202.

Modified: trunk/platforms/unix/vm-display-X11/sqUnixX11.c
===================================================================
--- trunk/platforms/unix/vm-display-X11/sqUnixX11.c 2010-04-29 17:17:54 UTC (rev 2205)
+++ trunk/platforms/unix/vm-display-X11/sqUnixX11.c 2010-05-12 00:02:20 UTC (rev 2206)
@@ -27,7 +27,7 @@
 
 /* Author: Ian Piumarta <[hidden email]>
  *
- * Last edited: 2010-04-09 15:04:50 by piumarta on ubuntu
+ * Last edited: 2010-05-11 16:58:09 by piumarta on emilia-2.local
  *
  * Support for more intelligent CLIPBOARD selection handling contributed by:
  * Ned Konz <[hidden email]>
@@ -327,6 +327,7 @@
 int noTitle= 0;
 int fullScreen= 0;
 int iconified= 0;
+int closeQuit= 0;
 int withSpy= 0;
 
 
@@ -3383,8 +3384,8 @@
     XFree((void *)wmHints);
   }
 
-  /* tell the WM that we do not want to be destroyed from the title bar close button */
-  {
+  if (!closeQuit) {
+    /* tell the WM that we do not want to be destroyed from the title bar close button */
     wmProtocolsAtom=    XInternAtom(stDisplay, "WM_PROTOCOLS", False);
     wmDeleteWindowAtom= XInternAtom(stDisplay, "WM_DELETE_WINDOW", False);
     XSetWMProtocols(stDisplay, stParent, &wmDeleteWindowAtom, 1);
@@ -5828,6 +5829,7 @@
   printf("\nX11 <option>s:\n");
   printf("  -browserWindow <wid>  run in window <wid>\n");
   printf("  -browserPipes <r> <w> run as Browser plugin using descriptors <r> <w>\n");
+  printf("  -closequit            quit immediately when the main window is closed\n");
   printf("  -cmdmod <n>           map Mod<n> to the Command key\n");
   printf("  -compositioninput     enable overlay window for composed characters\n");
   printf("  -display <dpy>        display on <dpy> (default: $DISPLAY)\n");
@@ -5890,6 +5892,7 @@
   if (getenv("SQUEAK_NOXDND")) useXdnd= 0;
   if (getenv("SQUEAK_FULLSCREEN")) fullScreen= 1;
   if (getenv("SQUEAK_ICONIC")) iconified= 1;
+  if (getenv("SQUEAK_CLOSEQUIT")) closeQuit= 1;
   if (getenv("SQUEAK_MAPDELBS")) mapDelBs= 1;
   if (getenv("SQUEAK_SWAPBTN")) swapBtn= 1;
   if ((ev= getenv("SQUEAK_OPTMOD"))) optMapIndex= Mod1MapIndex + atoi(ev) - 1;
@@ -5921,6 +5924,7 @@
   else if (!strcmp(arg, "-swapbtn")) swapBtn= 1;
   else if (!strcmp(arg, "-fullscreen")) fullScreen= 1;
   else if (!strcmp(arg, "-iconic")) iconified= 1;
+  else if (!strcmp(arg, "-closequit")) closeQuit= 1;
 #if !defined (INIT_INPUT_WHEN_KEY_PRESSED)
   else if (!strcmp(arg, "-nointl")) initInput= initInputNone;
 #else

Reply | Threaded
Open this post in threaded view
|

Re: [commit] r2206 - quit when window closed if option -closequit or SQUEAK_CLOSEQUIT set

Igor Stasenko
 
Ian,
can this flag be exposed to a language-side, so image can control whether it
wants to terminate silently when window closed or not, instead (or in
addition) to passing a flag from command line?

On 12 May 2010 03:02,  <[hidden email]> wrote:
>
[snip]


--
Best regards,
Igor Stasenko AKA sig.
Reply | Threaded
Open this post in threaded view
|

Re: [commit] r2206 - quit when window closed if option -closequit or SQUEAK_CLOSEQUIT set

Bert Freudenberg

Am 11.05.2010 um 17:22 schrieb Igor Stasenko:
>
>
> Ian,
> can this flag be exposed to a language-side, so image can control whether it
> wants to terminate silently when window closed or not, instead (or in
> addition) to passing a flag from command line?

That wouldn't make much sense IMHO. If you can change the image you can as well implement the window event handling. This is for old images that do not do this I'd imagine.

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: [commit] r2206 - quit when window closed if option -closequit or SQUEAK_CLOSEQUIT set

Ian Piumarta
 
On May 11, 2010, at 5:29 PM, Bert Freudenberg wrote:

> This is for old images that do not do this I'd imagine.

Right, and/or window managers that do not participate in the deletion  
protocol.  Somebody mailed me saying the new behaviour was causing  
them problems (maybe an old image, maybe a small window manager, not  
sure which) hence the trivial addition.

Cheers,
Ian