public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* XWin: losing focus; killing it
@ 2003-12-23  2:09 fergus
  2003-12-23  3:28 ` Alexander Gottwald
  0 siblings, 1 reply; 3+ messages in thread
From: fergus @ 2003-12-23  2:09 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: fergus

I have done my best with recent topic-related comms (2001, 2003 mainly) but
still need a hand if anybody can help.
For reasons I really don't want to alter, I prefer to start XWin after
opening a bash console, and not from Windows (Start -> Run -> ... or a
command prompt). So, I start bash. At the bash prompt I write
    XWin -nolisten local -multiwindow &
as a preface to
    rxvt -display localhost:0.0
but I find that after "XWin ..." the console loses focus and I need to
regain ownership with a mouse click; then I can go ahead with "rxvt ...". Is
there a switch or qualifier I can add/ subtract to the "XWin ..." command to
keep ownership?
My second question is: how kill a running XWin? Presently I do "ps" followed
by "kill <appropriate PID>" but this needs user input, and I'd prefer a
single command that meant "<kill the presently running XWin>". Can anybody
help?
Thank you.
Fergus


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: XWin: losing focus; killing it
  2003-12-23  2:09 XWin: losing focus; killing it fergus
@ 2003-12-23  3:28 ` Alexander Gottwald
  2003-12-23 16:17   ` Kensuke Matsuzaki
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Gottwald @ 2003-12-23  3:28 UTC (permalink / raw)
  To: cygwin-xfree, fergus

fergus@bonhard.uklinux.net wrote:

> I have done my best with recent topic-related comms (2001, 2003 mainly) but
> still need a hand if anybody can help.
> For reasons I really don't want to alter, I prefer to start XWin after
> opening a bash console, and not from Windows (Start -> Run -> ... or a
> command prompt). So, I start bash. At the bash prompt I write
>     XWin -nolisten local -multiwindow &
> as a preface to
>     rxvt -display localhost:0.0
> but I find that after "XWin ..." the console loses focus and I need to

This is a windows functionality. But you might suppress that by starting xwin
minimized (maybe cygstart does this)

> regain ownership with a mouse click; then I can go ahead with "rxvt ...". Is
> there a switch or qualifier I can add/ subtract to the "XWin ..." command to
> keep ownership?

The is no such option.

> My second question is: how kill a running XWin? Presently I do "ps" followed
> by "kill <appropriate PID>" but this needs user input, and I'd prefer a
> single command that meant "<kill the presently running XWin>". Can anybody

Have you ever heard of a command which kills any running Excel instance? The
command kill is for cases where you want to terminate a program from an
external command. You could of course build a shellscript which fetches all
program ids of Xwin processes from the ps output and feed that to kill but
there is (currently) no program which does this for you.

-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: XWin: losing focus; killing it
  2003-12-23  3:28 ` Alexander Gottwald
@ 2003-12-23 16:17   ` Kensuke Matsuzaki
  0 siblings, 0 replies; 3+ messages in thread
From: Kensuke Matsuzaki @ 2003-12-23 16:17 UTC (permalink / raw)
  To: cygwin-xfree

[-- Attachment #1: Type: text/plain, Size: 822 bytes --]

Hi,

winCreateBoundingWindowWindowed calls BringWindowToTop,
but maybe this is not needed in multi-window mode.

> > I have done my best with recent topic-related comms (2001, 2003 mainly) but
> > still need a hand if anybody can help.
> > For reasons I really don't want to alter, I prefer to start XWin after
> > opening a bash console, and not from Windows (Start -> Run -> ... or a
> > command prompt). So, I start bash. At the bash prompt I write
> >     XWin -nolisten local -multiwindow &
> > as a preface to
> >     rxvt -display localhost:0.0
> > but I find that after "XWin ..." the console loses focus and I need to
> 
> This is a windows functionality. But you might suppress that by starting xwin
> minimized (maybe cygstart does this)

----
Kensuke Matsuzaki
mailto:zakki@peppermint.jp
http://peppermint.jp


[-- Attachment #2: x.diff --]
[-- Type: application/octet-stream, Size: 760 bytes --]

Index: wincreatewnd.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/wincreatewnd.c,v
retrieving revision 1.1.4.1.2.2
diff -u -b -r1.1.4.1.2.2 wincreatewnd.c
--- wincreatewnd.c	5 Dec 2003 03:37:26 -0000	1.1.4.1.2.2
+++ wincreatewnd.c	23 Dec 2003 01:49:18 -0000
@@ -410,12 +410,15 @@
     }
   
   /* Attempt to bring our window to the top of the display */
+  if (!pScreenInfo->fMultiWindow && !pScreenInfo->fRootless)
+    {
   if (!BringWindowToTop (*phwnd))
     {
       ErrorF ("winCreateBoundingWindowWindowed - BringWindowToTop () "
 	      "failed\n");
       return FALSE;
     }
+    }
 
   /* Paint window background blue */
   if (pScreenInfo->dwEngine == WIN_SERVER_NATIVE_GDI)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-12-23  5:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-23  2:09 XWin: losing focus; killing it fergus
2003-12-23  3:28 ` Alexander Gottwald
2003-12-23 16:17   ` Kensuke Matsuzaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).