Re: selection to clipboard in xterm

2010-09-28 Thread Sven Severus
 Hallo Gery,

thanks for your reply.
Inside xterm the middle button works fine to paste,
but what I need is to paste in arbitrary windows
applications - just by using the windows clipboard.
And that does not work.

Sven


> Hallo Sven
>
> Did you use the middle button of the mouse to paste the highligthed text?
>
> Sent from my iPod.

-- 
Mit freundlichen Grüßen

Dipl. Inform. Sven Severus
Softwareentwicklung
--
HIMA Paul Hildebrandt GmbH + CO KG
Abt: Entwicklung Software
Albert-Bassermann-Strasse 28
68782 Bruehl
Germany

Tel: +49 6202 709-289
Fax: +49 6202 709-299
E-Mail: s.seve...@hima.com
Internet: www.hima.de


-- 
HIMA Paul Hildebrandt GmbH + Co KG, Albert-Bassermann-Str. 28, 68782 Bruehl bei 
Mannheim
Kommanditgesellschaft, Sitz Bruehl, Deutschland - Registergericht Mannheim HRA 
421017
Ust-ID: DE 144286400, St.Nr: 43038 00190

Persoenlich haftende Gesellschafterin Paul Hildebrandt Verwaltungsgesellschaft 
mbH,
Sitz Bruehl, Deutschland - Registergericht Mannheim HRB 420588

Geschaeftsfuehrer: Dipl.-Betriebswirt Steffen Philipp


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Git version, XWin dies in cygwin but not in Windows

2010-09-28 Thread Jon TURNEY

On 27/09/2010 16:43, Michel Hummel wrote:

I am testing the git version of the XWin server (I don't know if it is
the good place to talk about this version)


This is absolutely the right place :-)

I presume by 'git version' you mean the X.Org master tree.


and I am experiencing a
problem (May be it is also a problem on the official Xwin).
Sometime ( I can not make a reproducible test case) when the server
stops, the Xwin process disappears from Cygwin (as expected) but the
Windows process XWin.exe still be alive.


There are currently quite a few patches applied on top of the X.Org releases 
to make the cygwin released version (cygwin releases are tagged in [1]), at 
least one of which is related to stability during shutdown [5].


If you want a tree with those patches forward ported to xserver 1.9, take a 
look at [2]


Sorry that the contributors guide documentation is somewhat out of date and 
doesn't contain this information.



After some investigations (I'm not a good Windows hacker) it seems
that the process hangs  on the call to PostQuitMessage (0); of the
function ddxGiveUp of the file InitOutput.c

I can't tell why (Like I said, I'm not a good Windows hacker) but my
tests seems to show that delete this call  fixes the bug (may be there
is no link ).

Is it possible that this problem lies to the fact that the main window
is destroyed before the call to PostQuitMessage  (So the WM_QUIT
message can't be treated isn't it ?)


That shouldn't be the case, PostMessage() [3] functions are supposed to by 
asynchronous (unlike SendMessage() [4] which is synchronous, waiting for the 
message to be processed before returning)


[1] http://cgit.freedesktop.org/~yselkowitz/xserver/
[2] http://cgit.freedesktop.org/~jturney/xserver/log/?h=cygwin-1.9-testing
[3] http://msdn.microsoft.com/en-us/library/ms644945%28VS.85%29.aspx
[4] http://msdn.microsoft.com/en-us/library/ms644950%28VS.85%29.aspx
[5] 
http://cgit.freedesktop.org/~yselkowitz/xserver/commit/?h=cygwin-release-1.8&id=9cbbc1e8aefc6111f6ccdc73c061337508061996


--
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: selection to clipboard in xterm

2010-09-28 Thread Jim Reisert AD1C
On Tue, Sep 28, 2010 at 1:02 AM, Sven Severus wrote:

> thanks for your reply.
> Inside xterm the middle button works fine to paste,
> but what I need is to paste in arbitrary windows
> applications - just by using the windows clipboard.
> And that does not work.

Have you tried SHIFT+INSERT to paste text into those windows?

-- 
Jim Reisert AD1C, , http://www.ad1c.us

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: XWin crash after the launch of startkde on a remote Red Hat 5 machine

2010-09-28 Thread Jon TURNEY

On 24/09/2010 09:15, Michel Hummel wrote:

Hi Jon,


Firstly, thanks very much for looking at this.


You will find attached to this Email a patch (for the git version)
which implements for the clipboard thread :
  - Auto cleanup function
  - Auto restart function for unexpected exit of the clipboard or
Xerror detection
  - Deletion of XQuery wrapper  (not needed anymore)
  - Deletion of all the xdmcp related tricks  (not needed anymore)


For purposes of review it would be easier to split this patch into two 
separate patches, (i) the clipboard thread changes and (ii) removing the 
unneeded xdmcp tricks.



One thing, this patch deletes the call to EmptyClipboard () in the
winProcSetSelectionOwner function of the winclipboardwrappers.c file
when an "owned to not owned transition" has been detected. I don't
know why but it was freezing the server for 1 or 2 seconds during
clipboard's restart in xdmcp connection.


Hmmm... I wonder if that's something to do with how we process the 
WM_DESTROYCLIPBOARD message?  In any case, this should not be happening.



It would be fine if you could tell me, when you think this patch and
the previous one ( which makes the reset of the server working
correctly with clipboard) will be included to the official X server?


We don't have a regular release cycle for the cygwin X server, so I can't 
answer that question accurately.


I shall put your previous patch into the next release and assuming it works 
well, be pushing it upstream sometime before xserver 1.10


I think this patch needs a little more work.

I'm still a little concerned that there is no rate-limiting on the clipboard 
restart mechanism, so in a pathological case (e.g. where some unanticipated 
error causes the clipboard to constantly get disconnected), this will spin 
using all available CPU.


Some detailed comments below.


--- 
/home/hummelm/xserver-fc091936e2bddbbab9c9a501edc5a5f08388617e-org/hw/xwin/InitInput.c
  2010-08-18 22:10:54.0 +0200
+++ hw/xwin/InitInput.c 2010-09-17 17:03:08.611244200 +0200
@@ -127,12 +127,6 @@ InitInput (int argc, char *argv[])
   winProcEstablishConnectionOrig = InitialVector[2];
   InitialVector[2] = winProcEstablishConnection;
 }
-  if (g_fXdmcpEnabled
-  && ProcVector[X_QueryTree] != winProcQueryTree)
-{
-  winProcQueryTreeOrig = ProcVector[X_QueryTree];
-  ProcVector[X_QueryTree] = winProcQueryTree;
-}
 #endif

   g_pwinPointer = AddInputDevice (serverClient, winMouseProc, TRUE);
--- 
/home/hummelm/xserver-fc091936e2bddbbab9c9a501edc5a5f08388617e-org/hw/xwin//winclipboardthread.c
2010-08-18 22:10:54.0 +0200
+++ hw/xwin/winclipboardthread.c2010-09-24 16:48:20.689125100 +0200
@@ -48,6 +48,8 @@
 extern Boolg_fUnicodeClipboard;
 extern unsigned long   serverGeneration;
 extern Boolg_fClipboardStarted;
+extern Bool g_fClipboardLaunched;
+extern Bool g_fClipboard;
 extern HWNDg_hwndClipboard;
 extern void*g_pClipboardDisplay;
 extern Window  g_iClipboardWindow;
@@ -72,8 +74,113 @@ winClipboardErrorHandler (Display *pDisp
 static int
 winClipboardIOErrorHandler (Display *pDisplay);

+static void
+restartClipboardThread(void *pvNotUsed);
+
+static void
+winClipboardCleanup(void *vfdMessageQueue);
+

 /*
+ * restartClipboardThread activate the ProcEstablishConnection wrapper which 
will start
+ * the thread after next client connection
+ */


This comment doesn't appear to be correct.  winInitClipboard() starts the 
thread itself.


It looks like this could fight with the ProcEstablishConnection wrapper, which 
will call winInitClipboard() once for each server generation.



+
+static void restartClipboardThread(void *pvNotUsed)
+{
+  winDebug("restartClipboardThread - enter \n");
+  if (g_fClipboard)
+{
+  ErrorF("restartClipboardThread - trying to restart clipboard thread \n");
+  /* Create the clipboard client thread */
+  if (!winInitClipboard ())
+{
+  ErrorF ("restartClipboardThread - winClipboardInit "
+  "failed.\n");
+  return;
+}
+
+  winDebug ("restartClipboardThread - winInitClipboard returned.\n");
+  /* Flag that clipboard client has been launched */
+  g_fClipboardLaunched = TRUE;
+}
+  else
+{
+  ErrorF ("restartClipboardThread - Clipboard disabled  - Exit from server 
\n");
+  return;
+}
+  return;
+}
+
+/*
+ * winClipboardCleanup clean thread before exit
+ */
+
+static void winClipboardCleanup(void *vfdMessageQueue)
+{
+  int iReturn;
+  int fdMessageQueue = (int) vfdMessageQueue;
+
+  winDebug("winClipboardCleanup - Enter \n");
+  CloseClipboard();
+  /* Close our Windows window */
+  if (g_hwndClipboard )
+{
+  /* Destroy the Window window (hwnd) */
+  winDebug("winClipboardCleanup - Destroy Windows window\n");
+  PostMessage (g_hwndClipboard,WM_DESTROY, 0, 0);
+  winClipboardFlushWindowsMessageQueue(g_

Re: XWin crash after the launch of startkde on a remote Red Hat 5 machine

2010-09-28 Thread Jim Reisert AD1C
On Tue, Sep 28, 2010 at 2:12 PM, Jon TURNEY wrote:

> You will find attached to this Email a patch (for the git version)
> which implements for the clipboard thread :

Hi Jon,

Can I assume that when you announce a patched version of XWin.exe for
testing, that the test version includes all of the prior patches, up
to and including the one being tested?

Thanks - Jim

-- 
Jim Reisert AD1C, , http://www.ad1c.us

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Commercial Use

2010-09-28 Thread Donald Fagan
Hi,

I can't seem to find on your site if cygwin-x can be used
commercially. If it can is there any cost for a licence.
I intend to used it as a possible replacement for reflection x to
access an old HP-UX server.

Thanks,

Donald

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Commercial Use

2010-09-28 Thread Mark Geisert
Donald Fagan writes:
> Hi,
> 
> I can't seem to find on your site if cygwin-x can be used
> commercially. If it can is there any cost for a licence.
> I intend to used it as a possible replacement for reflection x to
> access an old HP-UX server.

Have a look at .  Basically, any kind of use
is OK, it's further distribution that requires attention to licensing.

..mark


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: selection to clipboard in xterm

2010-09-28 Thread Sven Severus


Thanks to your Reply, Jim.
Yes, I tried SHIFT+INSERT (which I know from 
XEmacs) to paste, but I never get pasted into 
a windows application what I highlighted in my 
xterm earlier on. Nevertheless, from one xterm 
to another xterm this works fine...

One additional remark: When I highlight a piece 
of text in my xterm, the content of the windows 
clipboard does not remain unaffected: it is 
cleared (reset to the empty string).
Even harder for me to understand ;-> ...

Greetings, Sven


Jim Reisert wrote:
>Have you tried SHIFT+INSERT to paste text into those windows?

-- 
Mit freundlichen Grüßen

Dipl. Inform. Sven Severus
Softwareentwicklung
--
HIMA Paul Hildebrandt GmbH + CO KG
Abt: Entwicklung Software
Albert-Bassermann-Strasse 28
68782 Bruehl
Germany

Tel: +49 6202 709-289
Fax: +49 6202 709-299
E-Mail: s.seve...@hima.com
Internet: www.hima.de



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/