This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository nx-libs. from 989398a debian/*: Adopt packaging changes from official Debian package. new a4fad8f Fix crash due to uninitialized VModMap fields. new 5b0bf75 xkb: Initialize pad bytes sent in replies of geometry requests. new 44c59e1 Fix uninitialized bytes new 8d6a4a9 Merge branch 'uli42-pr/fix_uninit' into 3.6.x new 020ef04 fb: Fix memcpy abuse new 034228d fb: fix fast-path blt detection new 22fea29 Merge branch 'uli42-pr/fb_fastpath' into 3.6.x new 79e4c20 manpage: add -sync new 0b454d2 manpage: add -full new 3b50801 manpage: add -class new 5166404 manpage: add -depth new 338e205 manpage: add -geometry new b8138d9 manpage: add/extend -dpi/-autodpi new b405b96 manpage: add -name new c8947d8 manpage: reformat some lines new 70cb192 Merge branch 'uli42-pr/xnest_manpages' into 3.6.x new d610e9c Keyboard.c: move keyboard file creation to extra function new 269a352 Keyboard.c: refactor keycode conversion new d0d6c1b Keyboard.c: rename variables to better reflect their meaning new 3c4a8da Keyboard.c: use 'variant' all over the place new fb31220 Keyboard.c: reformat nxagentKeycodeConversionSetup new 3b62184 Keyboard.c: improve creation of keyboard config file new 21a0ce3 nxagent: fix references to default rules in manpage new 4dfe84e Keyboard.c: remove non-fitting comment new 26b033b Reconnect.c: restore old keyboard value if no new one is given new ab3e148 Merge branch 'uli42-pr/keyboard_cleanup' into 3.6.x new 1de6ca5 nxagent: add keyboard=clone configuration option new 161515d nxagent: add additional keyboard config option rmlvo new 1d6c241 nxagent: store remote keyboard in global variables new d5c9733 nxagent: simplify keycode conversion setup new a70ec92 Keyboard.c: add static keyword where appropriate new a8c65ab Merge branch 'uli42-pr/improve_keyboard2' into 3.6.x new 522106e nxagent: bypass X2go's keyboard configuration hack new 669af53 Merge branch 'uli42-pr/x2go_bypass' into 3.6.x new d982559 nxagent.1 man page: Grammar fix. new a61b1a7 XlibInt.c: fix wrong debug message new 633f461 XlibInt: check for XlibError before accessing other dpy fields new 4214a71 Merge branch 'uli42-pr/fix_xlibcrash' into 3.6.x new 4a7faa8 Window.c: move WM_STATE handling to separate function new d175fd4 Set default screen size to the whole screen in rootless mode new 6c0098a Extensions.c: fix first resolution being ignored new c4c39bc Extensions.c: Cleanup nxagentRandRInitSizes() new 8dea307 Screen.c: move identical line out of both parts of an if clause new 43d3b65 Screen.c: improve readability of size calculations new 3c92b5d Screen.c: fix size calculation in rootless mode new d16a5fb Screen.c: fix handling of fullscreen startup new ca8236e Merge branch 'uli42-pr/window_fixes' into 3.6.x new 5c99eb7 Make getUnixPath() return the right value when called without an argument. new 889de46 Fix parsing ports set to unix sockets new 26e483d Merge branch 'theqvd-unix_socket_forwarding' into 3.6.x new 427ac34 release 3.5.99.18 The 51 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: ChangeLog | 222 ++++++++++++- VERSION | 2 +- debian/changelog | 7 + nx-X11/lib/src/XlibInt.c | 12 +- nx-X11/programs/Xserver/dix/dispatch.c | 2 +- nx-X11/programs/Xserver/fb/fbblt.c | 56 ++-- nx-X11/programs/Xserver/hw/nxagent/Display.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/Extensions.c | 81 +++-- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 385 +++++++++++++++-------- nx-X11/programs/Xserver/hw/nxagent/Keyboard.h | 3 +- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 29 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 141 +++++---- nx-X11/programs/Xserver/hw/nxagent/Window.c | 36 ++- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 140 ++++++++- nx-X11/programs/Xserver/xkb/xkb.c | 18 +- nx-libs.spec | 2 +- nxcomp/src/ChannelEndPoint.cpp | 6 +- nxcomp/src/Loop.cpp | 6 +- nxproxy/man/nxproxy.1 | 2 +- 19 files changed, 828 insertions(+), 326 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit a4fad8f58e8c7f601f70801016861f970ab05827 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 17 23:58:16 2018 +0100 Fix crash due to uninitialized VModMap fields. Backport of commit 81b3b0cce088866dc3cda099d7c8d6655849fd43 Author: Tomas Janousek <tomi@nomi.cz> Date: Wed May 20 15:03:01 2009 +0200 Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields. In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and .totalVModMapKeys were not initialized, contained random values and caused accesses to unallocated and later modified memory, causing XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of nonzero values, resulting in writes past the end of an array in XkbSendMap. This patch initializes those values sensibly and reverts commits 5c0a2088 and 6dd4fc46, which have been plain non-sense. Signed-off-by: Tomas Janousek <tomi@nomi.cz> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> --- nx-X11/programs/Xserver/xkb/xkb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index e11d7e2..67d7f2b 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -1185,7 +1185,7 @@ XkbSizeVirtualModMap(XkbDescPtr xkb,xkbGetMapReply *rep) rep->totalVModMapKeys= 0; return 0; } - for (nRtrn=i=0;i<rep->nVModMapKeys-1;i++) { + for (nRtrn=i=0;i<rep->nVModMapKeys;i++) { if (xkb->server->vmodmap[i+rep->firstVModMapKey]!=0) nRtrn++; } @@ -5128,7 +5128,7 @@ ProcXkbGetKbdByName(ClientPtr client) mrep.present = 0; mrep.totalSyms = mrep.totalActs = mrep.totalKeyBehaviors= mrep.totalKeyExplicit= - mrep.totalModMapKeys= 0; + mrep.totalModMapKeys= mrep.totalVModMapKeys= 0; if (rep.reported&(XkbGBN_TypesMask|XkbGBN_ClientSymbolsMask)) { mrep.present|= XkbKeyTypesMask; mrep.firstType = 0; @@ -5154,6 +5154,8 @@ ProcXkbGetKbdByName(ClientPtr client) mrep.firstKeyExplicit = finfo.xkb->min_key_code; mrep.nKeyActs = mrep.nKeyBehaviors = mrep.nKeyExplicit = XkbNumKeys(finfo.xkb); + mrep.firstVModMapKey= finfo.xkb->min_key_code; + mrep.nVModMapKeys= XkbNumKeys(finfo.xkb); } else { mrep.virtualMods= 0; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 5b0bf752a0c5a224ddf42cccdcb37534357c08ab Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Dec 18 00:05:50 2018 +0100 xkb: Initialize pad bytes sent in replies of geometry requests. Backport of commit dc9ce695a69ca0787f58f8d160212a7a41acb703 Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Wed Mar 9 15:45:40 2011 +0200 xkb: Initialize pad bytes sent in replies of geometry requests. Valgrind complains about uninitialized data being written to clients. Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> --- nx-X11/programs/Xserver/xkb/xkb.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index 67d7f2b..8d3fc61 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -3783,7 +3783,7 @@ ProcXkbSetNames(ClientPtr client) static char * XkbWriteCountedString(char *wire,char *str,Bool swap) { -CARD16 len,*pLen; +CARD16 len,*pLen, paddedLen; len= (str?strlen(str):0); pLen= (CARD16 *)wire; @@ -3791,8 +3791,9 @@ CARD16 len,*pLen; if (swap) { swaps(pLen); } - memcpy(&wire[2],str,len); - wire+= ((2+len+3)/4)*4; + paddedLen= pad_to_int32(sizeof(len)+len)-sizeof(len); + strncpy(&wire[sizeof(len)],str,paddedLen); + wire+= sizeof(len)+paddedLen; return wire; } @@ -3903,6 +3904,7 @@ xkbShapeWireDesc * shapeWire; if (shape->approx!=NULL) shapeWire->approxNdx= XkbOutlineIndex(shape,shape->approx); else shapeWire->approxNdx= XkbNoShape; + shapeWire->pad= 0; if (swap) { swapl(&shapeWire->name); } @@ -3914,6 +3916,7 @@ xkbShapeWireDesc * shapeWire; olWire= (xkbOutlineWireDesc *)wire; olWire->nPoints= ol->num_points; olWire->cornerRadius= ol->corner_radius; + olWire->pad= 0; wire= (char *)&olWire[1]; ptWire= (xkbPointWireDesc *)wire; for (p=0,pt=ol->points;p<ol->num_points;p++,pt++) { @@ -4023,6 +4026,8 @@ xkbOverlayWireDesc * olWire; olWire= (xkbOverlayWireDesc *)wire; olWire->name= ol->name; olWire->nRows= ol->num_rows; + olWire->pad1= 0; + olWire->pad2= 0; if (swap) { swapl(&olWire->name); } @@ -4034,6 +4039,7 @@ xkbOverlayWireDesc * olWire; rowWire= (xkbOverlayRowWireDesc *)wire; rowWire->rowUnder= row->row_under; rowWire->nKeys= row->num_keys; + rowWire->pad1= 0; wire= (char *)&rowWire[1]; for (k=0,key=row->keys;k<row->num_keys;k++,key++) { xkbOverlayKeyWireDesc * keyWire; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 44c59e12dc3fb509d3d237cbc782cc44dfa30f4e Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Dec 18 00:17:51 2018 +0100 Fix uninitialized bytes Fixes this valgrind finding ==16977== Warning: invalid file descriptor -1 in syscall close() ==16977== Conditional jump or move depends on uninitialised value(s) ==16977== at 0x544B6B: XkbSendNewKeyboardNotify (xkbEvents.c:62) ==16977== by 0x540481: ProcXkbGetKbdByName (xkb.c:5330) ==16977== by 0x4341C5: Dispatch (NXdispatch.c:482) ==16977== by 0x40EB02: main (main.c:353) ==16977== Uninitialised value was created by a heap allocation ==16977== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==16977== by 0x431BD7: NextAvailableClient (dispatch.c:3719) ==16977== by 0x47B297: AllocNewConnection (connection.c:821) ==16977== by 0x47B297: EstablishNewConnections (connection.c:910) ==16977== by 0x463DFE: ProcessWorkQueue (dixutils.c:541) ==16977== by 0x47635E: WaitForSomething (WaitFor.c:213) ==16977== by 0x434089: Dispatch (NXdispatch.c:360) ==16977== by 0x40EB02: main (main.c:353) --- nx-X11/programs/Xserver/dix/dispatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 3c79146..5c4e54c 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -3716,7 +3716,7 @@ ClientPtr NextAvailableClient(void * ospriv) i = nextFreeClientID; if (i == MAXCLIENTS) return (ClientPtr)NULL; - clients[i] = client = (ClientPtr)malloc(totalClientSize); + clients[i] = client = (ClientPtr)calloc(1,totalClientSize); if (!client) return (ClientPtr)NULL; InitClient(client, i, ospriv); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 034228d75ba1be6b035bdd387c183f14379abdc4 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Dec 18 21:39:04 2018 +0100 fb: fix fast-path blt detection Backport of this commit: commit a2880699e8f1f576e1a48ebf25e8982463323f84 Author: Keith Packard <keithp@keithp.com> Date: Tue Mar 25 08:21:16 2014 -0700 fb: fix fast-path blt detection The width parameter is used to disable the blit fast-path (memcpy) when source and destination rows overlap in memory. This check was added in [0]. Unfortunately, the calculation to determine if source and destination lines overlapped was incorrect: (1) it converts width from pixels to bytes, but width is actually in bits, not pixels. (2) it adds this byte offset to dst/srcLine, which implicitly converts the offset from bytes to sizeof(FbBits). Fix both of these by converting addresses to byte pointers and width to bytes and doing comparisons on the resulting byte address. For example: A 32-bpp 1366 pixel-wide row will have width = 1366 * 32 = 43712 bits bpp = 32 (bpp >> 3) = 4 width * (bpp >> 3) = 174848 FbBits (FbBits *)width => 699392 bytes So, "careful" was true if the destination line was within 699392 bytes, instead of just within its 1366 * 4 = 5464 byte row. This bug causes us to take the slow path for large non-overlapping rows that are "close" in memory. As a data point, XGetImage(1366x768) on my ARM chromebook was taking ~140 ms, but with this fixed, it now takes about 60 ms. XGetImage() -> exaGetImage() -> fbGetImage -> fbBlt() [0] commit e32cc0b4c85c78cd8743a6e1680dcc79054b57ce Author: Adam Jackson <ajax@redhat.com> Date: Thu Apr 21 16:37:11 2011 -0400 fb: Fix memcpy abuse The memcpy fast path implicitly assumes that the copy walks left-to-right. That's not something memcpy guarantees, and newer glibc on some processors will indeed break that assumption. Since we walk a line at a time, check the source and destination against the width of the blit to determine whether we can be sloppy enough to allow memcpy. (Having done this, we can remove the check for !reverse as well.) v3: Convert to byte units This first checks to make sure the blt is byte aligned, converts all of the data to byte units and then compares for byte address range overlap between source and dest. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> --- nx-X11/programs/Xserver/fb/fbblt.c | 61 +++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/nx-X11/programs/Xserver/fb/fbblt.c b/nx-X11/programs/Xserver/fb/fbblt.c index acec23b..6241af8 100644 --- a/nx-X11/programs/Xserver/fb/fbblt.c +++ b/nx-X11/programs/Xserver/fb/fbblt.c @@ -67,9 +67,42 @@ fbBlt (FbBits *srcLine, int n, nmiddle; Bool destInvarient; int startbyte, endbyte; - int careful; + FbDeclareMergeRop (); + if (alu == GXcopy && pm == FB_ALLONES && + !(srcX & 7) && !(dstX & 7) && !(width & 7)) + { + CARD8 *src_byte = (CARD8 *) srcLine + (srcX >> 3); + CARD8 *dst_byte = (CARD8 *) dstLine + (dstX >> 3); + FbStride src_byte_stride = srcStride << (FB_SHIFT - 3); + FbStride dst_byte_stride = dstStride << (FB_SHIFT - 3); + int width_byte = (width >> 3); + + /* Make sure there's no overlap; we can't use memcpy in that + * case as it's not well defined, so fall through to the + * general code + */ + if (src_byte + width_byte <= dst_byte || + dst_byte + width_byte <= src_byte) + { + int i; + + if (!upsidedown) + for (i = 0; i < height; i++) + memcpy(dst_byte + i * dst_byte_stride, + src_byte + i * src_byte_stride, + width_byte); + else + for (i = height - 1; i >= 0; i--) + memcpy(dst_byte + i * dst_byte_stride, + src_byte + i * src_byte_stride, + width_byte); + + return; + } + } + #ifdef FB_24BIT if (bpp == 24 && !FbCheck24Pix (pm)) { @@ -79,32 +112,6 @@ fbBlt (FbBits *srcLine, } #endif - careful = !((srcLine < dstLine && srcLine + width * (bpp>>3) > dstLine) || - (dstLine < srcLine && dstLine + width * (bpp>>3) > srcLine)) || - (bpp & 7); - - if (alu == GXcopy && pm == FB_ALLONES && !careful && - !(srcX & 7) && !(dstX & 7) && !(width & 7)) { - int i; - CARD8 *src = (CARD8 *) srcLine; - CARD8 *dst = (CARD8 *) dstLine; - - srcStride *= sizeof(FbBits); - dstStride *= sizeof(FbBits); - width >>= 3; - src += (srcX >> 3); - dst += (dstX >> 3); - - if (!upsidedown) - for (i = 0; i < height; i++) - memcpy(dst + i * dstStride, src + i * srcStride, width); - else - for (i = height - 1; i >= 0; i--) - memcpy(dst + i * dstStride, src + i * srcStride, width); - - return; - } - FbInitializeMergeRop(alu, pm); destInvarient = FbDestInvarientMergeRop(); if (upsidedown) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 79e4c20a076ec08490797595626407027e9e8b03 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 17 22:33:52 2018 +0100 manpage: add -sync (partially) fixes ArcticaProject/nx-libs#666 --- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 9dd4c84..23bf5de 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -199,6 +199,12 @@ e.g.: display number string written to STDERR is beautified with some human-readable (machine-parseable) text. .TP 8 +.B \-sync +This option tells \fBnxagent\fR to synchronize its window and graphics +operations with the real server. This is a useful option for +debugging, but it will slow down \fBnxagent\fR's performance +considerably. It should not be used unless absolutely necessary. +.TP 8 .B \-deferglyphs \fIwhichfonts\fP specifies the types of fonts for which the server should attempt to use deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 8d6a4a9b7bfabcf949ec80f552bd1f0707bf8c63 Merge: 989398a 44c59e1 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 19 12:18:27 2018 +0100 Merge branch 'uli42-pr/fix_uninit' into 3.6.x Attributes GH PR #752: https://github.com/ArcticaProject/nx-libs/pull/752 nx-X11/programs/Xserver/dix/dispatch.c | 2 +- nx-X11/programs/Xserver/xkb/xkb.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 020ef045e0df09bc2f664d8d6e4b6600da53b41a Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Dec 18 21:32:37 2018 +0100 fb: Fix memcpy abuse Fixes ArcticaProject/nx-libs#750 Backport of this commit: commit e32cc0b4c85c78cd8743a6e1680dcc79054b57ce Author: Adam Jackson <ajax@redhat.com> Date: Thu Apr 21 16:37:11 2011 -0400 fb: Fix memcpy abuse The memcpy fast path implicitly assumes that the copy walks left-to-right. That's not something memcpy guarantees, and newer glibc on some processors will indeed break that assumption. Since we walk a line at a time, check the source and destination against the width of the blit to determine whether we can be sloppy enough to allow memcpy. (Having done this, we can remove the check for !reverse as well.) On an Intel Core i7-2630QM with an NVIDIA GeForce GTX 460M running in NoAccel, the broken code and various fixes for -copywinwin{10,100,500} gives (edited to fit in 80 columns): 1: Disable the fastpath entirely 2: Replace memcpy with memmove 3: This fix 4: The code before this fix 1 2 3 4 Operation ------ --------------- --------------- --------------- ------------ 258000 269000 ( 1.04) 544000 ( 2.11) 552000 ( 2.14) Copy 10x10 21300 23000 ( 1.08) 43700 ( 2.05) 47100 ( 2.21) Copy 100x100 960 962 ( 1.00) 1990 ( 2.09) 1990 ( 2.07) Copy 500x500 So it's a modest performance hit, but correctness demands it, and it's probably worth keeping the 2x speedup from having the fast path in the first place. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> --- nx-X11/programs/Xserver/fb/fbblt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/fb/fbblt.c b/nx-X11/programs/Xserver/fb/fbblt.c index e820a85..acec23b 100644 --- a/nx-X11/programs/Xserver/fb/fbblt.c +++ b/nx-X11/programs/Xserver/fb/fbblt.c @@ -67,6 +67,7 @@ fbBlt (FbBits *srcLine, int n, nmiddle; Bool destInvarient; int startbyte, endbyte; + int careful; FbDeclareMergeRop (); #ifdef FB_24BIT @@ -78,7 +79,11 @@ fbBlt (FbBits *srcLine, } #endif - if (alu == GXcopy && pm == FB_ALLONES && !reverse && + careful = !((srcLine < dstLine && srcLine + width * (bpp>>3) > dstLine) || + (dstLine < srcLine && dstLine + width * (bpp>>3) > srcLine)) || + (bpp & 7); + + if (alu == GXcopy && pm == FB_ALLONES && !careful && !(srcX & 7) && !(dstX & 7) && !(width & 7)) { int i; CARD8 *src = (CARD8 *) srcLine; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 0b454d2d3c88d0bb42f111baa644429a624ba628 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 17 22:34:15 2018 +0100 manpage: add -full (partially) fixes ArcticaProject/nx-libs#666 --- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 23bf5de..531caa7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -205,6 +205,17 @@ operations with the real server. This is a useful option for debugging, but it will slow down \fBnxagent\fR's performance considerably. It should not be used unless absolutely necessary. .TP 8 +.B \-full +This option tells \fBnxagent\fR to utilize full regeneration of real +server objects and reopen a new connection to the real server each +time \fBnxagent\fR regenerates. The sample server implementation +regenerates all objects in the server when the last client of this +server terminates. When this happens, \fBnxagent\fR by default +maintains the same top-level window and the same real server +connection in each new generation. If the user selects full +regeneration, even the top-level window and the connection to the real +server will be regenerated for each server generation. +.TP 8 .B \-deferglyphs \fIwhichfonts\fP specifies the types of fonts for which the server should attempt to use deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 22fea29cf0f568b95570c57a2d5a1e828c758b0d Merge: 8d6a4a9 034228d Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 19 12:20:10 2018 +0100 Merge branch 'uli42-pr/fb_fastpath' into 3.6.x Attributes GH PR #753: https://github.com/ArcticaProject/nx-libs/pull/753 nx-X11/programs/Xserver/fb/fbblt.c | 56 +++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 22 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 51664049f23c9806a7fb6ce3ec5004f1dc4472ca Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 17 22:35:18 2018 +0100 manpage: add -depth (partially) fixes ArcticaProject/nx-libs#666 --- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index a7b3cdd..ddc8e2b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -253,6 +253,15 @@ specifies the types of fonts for which the server should attempt to use deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), none (no fonts), or 16 (16 bit fonts only). .TP 8 +.B \-depth \fIint\fP +This option specifies the default visual depth of the nested server. +The depth of the default visual of the nested server need not be the +same as the depth of the default visual of the real server, but it +must be supported by the real server. Use +.BR xdpyinfo (__appmansuffix__) +to obtain a list of supported visual depths on the real server before +starting \fBnxagent\fR. +.TP 8 .B \-dpi \fIresolution\fP sets the resolution for all screens, in dots per inch. To be used when the server cannot determine the screen size(s) from the -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 3b508010de68ece72d725921dbdf032efc955190 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 17 22:34:43 2018 +0100 manpage: add -class (partially) fixes ArcticaProject/nx-libs#666 --- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 531caa7..a7b3cdd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -216,6 +216,38 @@ connection in each new generation. If the user selects full regeneration, even the top-level window and the connection to the real server will be regenerated for each server generation. .TP 8 +.B \-class \fIstring\fP +This option specifies the default visual class of the nested server. +It is similar to the +.B \-cc +option from the set of standard options except that it will accept a string +rather than a number for the visual class specification. +The +.I string +must be one of the following six values: +.BR StaticGray , +.BR GrayScale , +.BR StaticColor , +.BR PseudoColor , +.BR TrueColor , +or +.BR DirectColor . +If both the +.B \-class +and +.B \-cc +options are specified, the last instance of either option takes precedence. +The class of the default visual of the nested server need not be the same as the +class of the default visual of the real server, but it must be supported by the +real server. +Use +.BR xdpyinfo (__appmansuffix__) +to obtain a list of supported visual classes on the real server before +starting \fBnxagent\fR. If the user chooses a static class, all the +colors in the default color map will be preallocated. If the user +chooses a dynamic class, colors in the default color map will be +available to individual clients for allocation. +.TP 8 .B \-deferglyphs \fIwhichfonts\fP specifies the types of fonts for which the server should attempt to use deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 338e2051020f5a9895574d597325b1bcc67d4d3b Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 17 22:35:35 2018 +0100 manpage: add -geometry (partially) fixes ArcticaProject/nx-libs#666 --- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index ddc8e2b..575ebd0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -262,6 +262,25 @@ must be supported by the real server. Use to obtain a list of supported visual depths on the real server before starting \fBnxagent\fR. .TP 8 +.B \-geometry \fIW\fBx\fIH\fB+\fIX\fB+\fIY\fP +This option specifies the geometry parameters for the top-level +\fBnxagent\fR window. See \(lqGEOMETRY SPECIFICATIONS\(rq in +.BR X (__miscmansuffix__) +for a discusson of this option's syntax. This window corresponds to +the root window of the nested server. The width +.I W +and height +.I H +specified with this option will be the maximum width and height of +each top-level \fBnxagent\fR window. \fBnxagent\fR will allow the +user to make any top-level window smaller, but it will not actually +change the size of the nested server root window. If this option is +not specified, \fBnxagent\fR will choose +.I W +and +.I H +to be 3/4ths the dimensions of the root window of the real server. +.TP 8 .B \-dpi \fIresolution\fP sets the resolution for all screens, in dots per inch. To be used when the server cannot determine the screen size(s) from the -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit b8138d97d5b9259aab1372aa47c425c99d23f5fd Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 17 22:36:07 2018 +0100 manpage: add/extend -dpi/-autodpi (partially) fixes ArcticaProject/nx-libs#666 --- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 575ebd0..8ef1d63 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -282,9 +282,14 @@ and to be 3/4ths the dimensions of the root window of the real server. .TP 8 .B \-dpi \fIresolution\fP -sets the resolution for all screens, in dots per inch. -To be used when the server cannot determine the screen size(s) from the -hardware. +sets the resolution for all screens, in dots per inch. If this option +is not specified \fBnxagent\fR will assume 96. There's also +.B \-autodpi +which will clone the real server's dpi. Note that the resolution specified via +.B \-dpi +is a per session setting. It cannot be changed on reconnect! This means that +clients may look "wrong" when reconnecting a session that had been +started with a different dpi than the current real xserver. .TP 8 .B dpms enables DPMS (display power management services), where supported. The @@ -468,7 +473,15 @@ auto-disconnect timeout in seconds (minimum allowed: 60) don't exit if there are no clients in rootless mode .TP 8 .B \-autodpi -detect real server's DPI and set it in the agent session; the \fI-dpi <dpi>\fR cmdline option overrides \fI-autodpi\fR +detect real server's DPI and set it in the agent session; the +.B \-dpi\fP cmdline option overrides +.B \-autodpi\fP. +Note that using +.B \-autodpi +will also adapt the DPI on reconnect which will cause +newly started clients respecting the new DPI while clients that had +been started before the reconnect still use the old DPI. This may lead +to applications looking "weird". .TP 8 .B \-nomagicpixel disable magic pixel support at session startup, can be re-enabled via nx/nx option on session -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit b405b962f192acbc74dca7777026b70a5a85e526 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 17 22:36:34 2018 +0100 manpage: add -name (partially) fixes ArcticaProject/nx-libs#666 --- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 8ef1d63..2bd74c8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -325,6 +325,11 @@ sets the maximum big request to .I size MB. .TP 8 +.B \-name string +This option specifies the name of the top-level \fBnxagent\fR window as +.IR string . +The default value is the program name. +.TP 8 .B \-nolisten \fItrans-type\fP disables a transport type. For example, TCP/IP connections can be disabled with -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit c8947d8aadd62c51ab7da272445d9fad4b6dd84f Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 17 22:36:44 2018 +0100 manpage: reformat some lines --- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 2bd74c8..3b61627 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -249,8 +249,8 @@ chooses a dynamic class, colors in the default color map will be available to individual clients for allocation. .TP 8 .B \-deferglyphs \fIwhichfonts\fP -specifies the types of fonts for which the server should attempt to use -deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), +specifies the types of fonts for which the server should attempt to +use deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), none (no fonts), or 16 (16 bit fonts only). .TP 8 .B \-depth \fIint\fP @@ -489,8 +489,8 @@ been started before the reconnect still use the old DPI. This may lead to applications looking "weird". .TP 8 .B \-nomagicpixel -disable magic pixel support at session startup, can be re-enabled via nx/nx option on session -resumption +disable magic pixel support at session startup, can be re-enabled via +nx/nx option on session resumption .TP 8 .B \-norender disable the use of the render extension -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 70cb1926ca433736830c42250e049203262560e4 Merge: 22fea29 c8947d8 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 19 12:25:53 2018 +0100 Merge branch 'uli42-pr/xnest_manpages' into 3.6.x Attributes GH PR #751: https://github.com/ArcticaProject/nx-libs/pull/751 nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 111 +++++++++++++++++++++-- 1 file changed, 103 insertions(+), 8 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit d610e9c3c878e39ae908f04843ed563b4669732f Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Jul 22 17:34:22 2017 +0200 Keyboard.c: move keyboard file creation to extra function --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 108 ++++++++++++++------------ 1 file changed, 57 insertions(+), 51 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index c2c36ad..0b4e269 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -83,6 +83,8 @@ static int nxagentXkbGetNames(char **rules, char **model, char **layout, static void nxagentKeycodeConversionSetup(void); +void nxagentWriteKeyboardFile(unsigned int ruleslen, char *rules, char *model, char *layout, char *variant, char *options); + #endif /* XKB */ /* @@ -1557,6 +1559,56 @@ static int nxagentXkbGetNames(char **rules, char **model, char **layout, return n; } +void nxagentWriteKeyboardFile(unsigned int ruleslen, char *rules, char *model, char *layout, char *variant, char *options) +{ + if (ruleslen) + { + char *sessionpath = nxagentGetSessionPath(); + if (sessionpath) + { + char *keyboard_file_path = NULL; + FILE *keyboard_file; + if ((asprintf(&keyboard_file_path, "%s/keyboard", sessionpath) == -1)) + { + free(sessionpath); + FatalError("malloc for keyboard file path failed."); + } + free(sessionpath); + if ((keyboard_file = fopen(keyboard_file_path, "w"))) + { + if (rules) + fprintf(keyboard_file, "rules=\"%s\"\n", rules[0] == '\0' ? "," : rules); + if (model) + fprintf(keyboard_file, "model=\"%s\"\n", model[0] == '\0' ? "," : model); + if (layout) + fprintf(keyboard_file, "layout=\"%s\"\n", layout[0] == '\0' ? "," : layout); + /* FIXME: this is not correct. We need to match the number of + comma separated values between variant and layout */ + if (variant) + fprintf(keyboard_file, "variant=\"%s\"\n", variant[0] == '\0' ? "," : variant); + if (options) + fprintf(keyboard_file, "options=\"%s\"\n", options[0] == '\0' ? "," : options); + fclose(keyboard_file); + fprintf(stderr, "Info: keyboard file created: '%s'\n", keyboard_file_path); + } + else + { + int save_err = errno; + fprintf(stderr, "Error: keyboard file not created: %s\n", strerror(save_err)); + } + free(keyboard_file_path); + } + else + { + fprintf(stderr, "Warning: Failed to create keyboard file: SessionPath not defined\n"); + } + } + else + { + fprintf(stderr, "Warning: Failed to create the keyboard file\n"); + } +} + void nxagentKeycodeConversionSetup(void) { char *drules = NULL; @@ -1587,69 +1639,23 @@ void nxagentKeycodeConversionSetup(void) #ifdef DEBUG if (drulesLen != 0 && drules && dmodel) { - fprintf(stderr, "nxagentKeycodeConversionSetup: " - "Remote: [rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", - drules, dmodel, dlayout, dvariant, doptions); + fprintf(stderr, "%s: Remote: [rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", + __func__, drules, dmodel, dlayout, dvariant, doptions); } else { - fprintf(stderr, "nxagentKeycodeConversionSetup: " - "Failed to retrieve remote rules.\n"); + fprintf(stderr, "%s: Failed to retrieve remote rules.\n", __func__); } #endif - if (drulesLen != 0) - { - char *sessionpath = nxagentGetSessionPath(); - if (sessionpath) - { - char *keyboard_file_path = NULL; - FILE *keyboard_file; - if ((asprintf(&keyboard_file_path, "%s/keyboard", sessionpath) == -1)) - { - free(sessionpath); - FatalError("malloc for keyboard file path failed."); - } - free(sessionpath); - if ((keyboard_file = fopen(keyboard_file_path, "w"))) - { - if (drules) - fprintf(keyboard_file, "rules=\"%s\"\n", drules[0] == '\0' ? "," : drules); - if (dmodel) - fprintf(keyboard_file, "model=\"%s\"\n", dmodel[0] == '\0' ? "," : dmodel); - if (dlayout) - fprintf(keyboard_file, "layout=\"%s\"\n", dlayout[0] == '\0' ? "," : dlayout); - if (dvariant) - fprintf(keyboard_file, "variant=\"%s\"\n", dvariant[0] == '\0' ? "," : dvariant); - if (doptions) - fprintf(keyboard_file, "options=\"%s\"\n", doptions[0] == '\0' ? "," : doptions); - fclose(keyboard_file); - fprintf(stderr, "Info: keyboard file created: '%s'\n", keyboard_file_path); - } - else - { - int save_err = errno; - fprintf(stderr, "Error: keyboard file not created: %s\n", strerror(save_err)); - } - free(keyboard_file_path); - } - else - { - fprintf(stderr, "Warning: SessionPath not defined\n"); - } - } - else - { - fprintf(stderr, "Warning: Failed to create the keyboard file\n"); - } + nxagentWriteKeyboardFile(drulesLen, drules, dmodel, dlayout, dvariant, doptions); if (drules && dmodel && (strcmp(drules, "evdev") == 0 || strcmp(dmodel, "evdev") == 0)) { #ifdef DEBUG - fprintf(stderr, "nxagentKeycodeConversionSetup: " - "Activating KeyCode conversion.\n"); + fprintf(stderr, "%s: Activating KeyCode conversion.\n", __func__); #endif fprintf(stderr, "Info: Keycode conversion auto-determined as on\n"); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 3c4a8da12fd514c4df1abcb5fbe1081dd06462fb Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Dec 2 00:09:00 2018 +0100 Keyboard.c: use 'variant' all over the place avoid mix of 'variant' and 'variants' --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index b525a2a..0871a58 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -746,7 +746,7 @@ XkbError: #ifdef XKB } else { /* if (noXkbExtension) */ XkbComponentNamesRec names = {0}; - char *rules = NULL, *variants = NULL, *options = NULL; /* use xkb default */ + char *rules = NULL, *variant = NULL, *options = NULL; /* use xkb default */ #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: Using XKB extension.\n"); @@ -864,11 +864,11 @@ XkbError: #ifdef DEBUG fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device: " - "[rules='%s',model='%s',layout='%s',variants='%s',options='%s'].\n", - rules, model, layout, variants, options); + "[rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", + rules, model, layout, variant, options); #endif - XkbSetRulesDflts(rules, model, layout, variants, options); + XkbSetRulesDflts(rules, model, layout, variant, options); XkbInitKeyboardDeviceStruct((void *)pDev, &names, &keySyms, modmap, nxagentBell, nxagentChangeKeyboardControl); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit d0d6c1bdba457c9e6cc5eaddbe8d94e5b2dd74ad Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Dec 1 23:59:36 2018 +0100 Keyboard.c: rename variables to better reflect their meaning --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 50 +++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 3410e09..b525a2a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -819,20 +819,20 @@ XkbError: #endif { - char *drules = NULL; - char *dmodel = NULL; - char *dlayout = NULL; - char *dvariant = NULL; - char *doptions = NULL; + char *remoterules = NULL; + char *remotemodel = NULL; + char *remotelayout = NULL; + char *remotevariant = NULL; + char *remoteoptions = NULL; - unsigned int drulesLen = nxagentXkbGetNames(&drules, &dmodel, &dlayout, - &dvariant, &doptions); + unsigned int remoteruleslen = nxagentXkbGetNames(&remoterules, &remotemodel, &remotelayout, + &remotevariant, &remoteoptions); #ifdef DEBUG - if (drulesLen && drules && dmodel) + if (remoteruleslen && remoterules && remotemodel) { fprintf(stderr, "%s: Remote: [rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", - __func__, drules, dmodel, dlayout, dvariant, doptions); + __func__, remoterules, remotemodel, remotelayout, remotevariant, remoteoptions); } else { @@ -840,12 +840,12 @@ XkbError: } #endif - nxagentWriteKeyboardFile(drulesLen, drules, dmodel, dlayout, dvariant, doptions); - nxagentKeycodeConversionSetup(drules, dmodel); + nxagentWriteKeyboardFile(remoteruleslen, remoterules, remotemodel, remotelayout, remotevariant, remoteoptions); + nxagentKeycodeConversionSetup(remoterules, remotemodel); - if (drules) + if (remoterules) { - XFree(drules); + XFree(remoterules); } } @@ -1687,21 +1687,21 @@ void nxagentResetKeycodeConversion(void) if (result != 0) { - char *drules = NULL; - char *dmodel = NULL; - char *dlayout = NULL; - char *dvariant = NULL; - char *doptions = NULL; - unsigned int drulesLen; + char *remoterules = NULL; + char *remotemodel = NULL; + char *remotelayout = NULL; + char *remotevariant = NULL; + char *remoteoptions = NULL; + unsigned int remoteruleslen; - drulesLen = nxagentXkbGetNames(&drules, &dmodel, &dlayout, - &dvariant, &doptions); + remoteruleslen = nxagentXkbGetNames(&remoterules, &remotemodel, &remotelayout, + &remotevariant, &remoteoptions); - if (drulesLen && drules && dmodel) - nxagentKeycodeConversionSetup(drules, dmodel); + if (remoteruleslen && remoterules && remotemodel) + nxagentKeycodeConversionSetup(remoterules, remotemodel); - if (drules) - XFree(drules); + if (remoterules) + XFree(remoterules); } else { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 269a352ff493f2f41e81afa5485dec39d2d5dbf4 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Jul 22 18:56:13 2017 +0200 Keyboard.c: refactor keycode conversion we'll need the remote xkb in KeyboardProc in future so let's move it up. --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 94 ++++++++++++++++----------- 1 file changed, 56 insertions(+), 38 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 0b4e269..3410e09 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -81,7 +81,7 @@ is" without express or implied warranty. static int nxagentXkbGetNames(char **rules, char **model, char **layout, char **variant, char **options); -static void nxagentKeycodeConversionSetup(void); +static void nxagentKeycodeConversionSetup(char *rules, char *model); void nxagentWriteKeyboardFile(unsigned int ruleslen, char *rules, char *model, char *layout, char *variant, char *options); @@ -818,9 +818,38 @@ XkbError: fprintf(stderr, "nxagentKeyboardProc: Init XKB extension.\n"); #endif - xkb = XkbGetKeyboard(nxagentDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); + { + char *drules = NULL; + char *dmodel = NULL; + char *dlayout = NULL; + char *dvariant = NULL; + char *doptions = NULL; + + unsigned int drulesLen = nxagentXkbGetNames(&drules, &dmodel, &dlayout, + &dvariant, &doptions); + + #ifdef DEBUG + if (drulesLen && drules && dmodel) + { + fprintf(stderr, "%s: Remote: [rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", + __func__, drules, dmodel, dlayout, dvariant, doptions); + } + else + { + fprintf(stderr, "%s: Failed to retrieve remote rules.\n", __func__); + } + #endif - nxagentKeycodeConversionSetup(); + nxagentWriteKeyboardFile(drulesLen, drules, dmodel, dlayout, dvariant, doptions); + nxagentKeycodeConversionSetup(drules, dmodel); + + if (drules) + { + XFree(drules); + } + } + + xkb = XkbGetKeyboard(nxagentDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); if (xkb && xkb->geom) { @@ -1609,15 +1638,8 @@ void nxagentWriteKeyboardFile(unsigned int ruleslen, char *rules, char *model, c } } -void nxagentKeycodeConversionSetup(void) +void nxagentKeycodeConversionSetup(char * rules, char * model) { - char *drules = NULL; - char *dmodel = NULL; - char *dlayout = NULL; - char *dvariant = NULL; - char *doptions = NULL; - unsigned int drulesLen; - if (nxagentOption(KeycodeConversion) == KeycodeConversionOff) { fprintf(stderr, "Info: Keycode conversion is off\n"); @@ -1631,28 +1653,9 @@ void nxagentKeycodeConversionSetup(void) return; } - nxagentKeycodeConversion = False; - - drulesLen = nxagentXkbGetNames(&drules, &dmodel, &dlayout, - &dvariant, &doptions); - - #ifdef DEBUG - if (drulesLen != 0 && drules && dmodel) - { - fprintf(stderr, "%s: Remote: [rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", - __func__, drules, dmodel, dlayout, dvariant, doptions); - } - else - { - fprintf(stderr, "%s: Failed to retrieve remote rules.\n", __func__); - } - #endif - - nxagentWriteKeyboardFile(drulesLen, drules, dmodel, dlayout, dvariant, doptions); - - if (drules && dmodel && - (strcmp(drules, "evdev") == 0 || - strcmp(dmodel, "evdev") == 0)) + if (rules && model && + (strcmp(rules, "evdev") == 0 || + strcmp(model, "evdev") == 0)) { #ifdef DEBUG fprintf(stderr, "%s: Activating KeyCode conversion.\n", __func__); @@ -1663,12 +1666,13 @@ void nxagentKeycodeConversionSetup(void) } else { + #ifdef DEBUG + fprintf(stderr, "%s: Deactivating KeyCode conversion.\n", __func__); + #endif + fprintf(stderr, "Info: Keycode conversion auto-determined as off\n"); - } - if (drules) - { - XFree(drules); + nxagentKeycodeConversion = False; } } @@ -1683,7 +1687,21 @@ void nxagentResetKeycodeConversion(void) if (result != 0) { - nxagentKeycodeConversionSetup(); + char *drules = NULL; + char *dmodel = NULL; + char *dlayout = NULL; + char *dvariant = NULL; + char *doptions = NULL; + unsigned int drulesLen; + + drulesLen = nxagentXkbGetNames(&drules, &dmodel, &dlayout, + &dvariant, &doptions); + + if (drulesLen && drules && dmodel) + nxagentKeycodeConversionSetup(drules, dmodel); + + if (drules) + XFree(drules); } else { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit fb31220f248e82a36ae49be5c5d3abef5a791373 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Dec 1 18:17:40 2018 +0100 Keyboard.c: reformat nxagentKeycodeConversionSetup --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 37 +++++++++++++-------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 0871a58..dcb58de 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1644,35 +1644,34 @@ void nxagentKeycodeConversionSetup(char * rules, char * model) { fprintf(stderr, "Info: Keycode conversion is off\n"); nxagentKeycodeConversion = False; - return; } else if (nxagentOption(KeycodeConversion) == KeycodeConversionOn) { fprintf(stderr, "Info: Keycode conversion is on\n"); nxagentKeycodeConversion = True; - return; - } - - if (rules && model && - (strcmp(rules, "evdev") == 0 || - strcmp(model, "evdev") == 0)) - { - #ifdef DEBUG - fprintf(stderr, "%s: Activating KeyCode conversion.\n", __func__); - #endif - - fprintf(stderr, "Info: Keycode conversion auto-determined as on\n"); - nxagentKeycodeConversion = True; } else { - #ifdef DEBUG - fprintf(stderr, "%s: Deactivating KeyCode conversion.\n", __func__); - #endif + if (rules && model && + (strcmp(rules, "evdev") == 0 || + strcmp(model, "evdev") == 0)) + { + #ifdef DEBUG + fprintf(stderr, "%s: Activating KeyCode conversion.\n", __func__); + #endif - fprintf(stderr, "Info: Keycode conversion auto-determined as off\n"); + fprintf(stderr, "Info: Keycode conversion auto-determined as on\n"); + nxagentKeycodeConversion = True; + } + else + { + #ifdef DEBUG + fprintf(stderr, "%s: Deactivating KeyCode conversion.\n", __func__); + #endif - nxagentKeycodeConversion = False; + fprintf(stderr, "Info: Keycode conversion auto-determined as off\n"); + nxagentKeycodeConversion = False; + } } } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 3b62184a1aaa3f8a66aab21c21d12162e7ba83df Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Jul 23 02:03:58 2017 +0200 Keyboard.c: improve creation of keyboard config file It will now create better working config files. References: ArcticaProject/nx-libs#239 ArcticaProject/nx-libs#368 --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 44 +++++++++++++++++---------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index dcb58de..9efafdf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -83,7 +83,7 @@ static int nxagentXkbGetNames(char **rules, char **model, char **layout, static void nxagentKeycodeConversionSetup(char *rules, char *model); -void nxagentWriteKeyboardFile(unsigned int ruleslen, char *rules, char *model, char *layout, char *variant, char *options); +void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *variant, char *options); #endif /* XKB */ @@ -840,7 +840,7 @@ XkbError: } #endif - nxagentWriteKeyboardFile(remoteruleslen, remoterules, remotemodel, remotelayout, remotevariant, remoteoptions); + nxagentWriteKeyboardFile(remoterules, remotemodel, remotelayout, remotevariant, remoteoptions); nxagentKeycodeConversionSetup(remoterules, remotemodel); if (remoterules) @@ -1588,10 +1588,32 @@ static int nxagentXkbGetNames(char **rules, char **model, char **layout, return n; } -void nxagentWriteKeyboardFile(unsigned int ruleslen, char *rules, char *model, char *layout, char *variant, char *options) +void writeKeyboardfileData(FILE *out, char *rules, char *model, char *layout, char *variant, char *options) { - if (ruleslen) + /* + How to set "empty" values with setxkbmap, result of trial and error: + - model and layout: empty strings are accepted by setxkbmap. + - rules: setxkbmap will fail if rules is an empty string + (code will intercept in an earlier stage in that case) + - variant: the variant line must be omitted completely. + - options: prepend value with "," to override, otherwise options will be added. + */ + fprintf(out, "rules=\"%s\"\n", rules); + fprintf(out, "model=\"%s\"\n", model ? model : ""); + fprintf(out, "layout=\"%s\"\n", layout ? layout : ""); + if (variant && variant[0] != '\0') + fprintf(out, "variant=\"%s\"\n", variant); + fprintf(out, "options=\",%s\"\n", options ? options : ""); +} + +void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *variant, char *options) +{ + if (rules && rules[0] != '\0') { + #ifdef DEBUG + writeKeyboardfileData(stderr, rules, model, layout, variant, options); + #endif + char *sessionpath = nxagentGetSessionPath(); if (sessionpath) { @@ -1605,18 +1627,8 @@ void nxagentWriteKeyboardFile(unsigned int ruleslen, char *rules, char *model, c free(sessionpath); if ((keyboard_file = fopen(keyboard_file_path, "w"))) { - if (rules) - fprintf(keyboard_file, "rules=\"%s\"\n", rules[0] == '\0' ? "," : rules); - if (model) - fprintf(keyboard_file, "model=\"%s\"\n", model[0] == '\0' ? "," : model); - if (layout) - fprintf(keyboard_file, "layout=\"%s\"\n", layout[0] == '\0' ? "," : layout); - /* FIXME: this is not correct. We need to match the number of - comma separated values between variant and layout */ - if (variant) - fprintf(keyboard_file, "variant=\"%s\"\n", variant[0] == '\0' ? "," : variant); - if (options) - fprintf(keyboard_file, "options=\"%s\"\n", options[0] == '\0' ? "," : options); + writeKeyboardfileData(keyboard_file, rules, model, layout, variant, options); + fclose(keyboard_file); fprintf(stderr, "Info: keyboard file created: '%s'\n", keyboard_file_path); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 21a0ce3672e53346c90aad2a9f5953d453e55a05 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Dec 1 22:37:40 2018 +0100 nxagent: fix references to default rules in manpage we have changed that to base some time ago. --- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 3b61627..892248d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -620,12 +620,12 @@ settings. .I <model>/<layout> use the given model and layout. You can not modify keyboard rules, variant or options. Instead preset values are used. These are -\fIxfree86\fR for rules and empty strings for variant and options. +\fIbase\fR for rules and empty strings for variant and options. .RE .TP 8 .PP -If \fIkeyboard\fR is omitted the internal defaults of \fBnxagent\fR will be used (rules: \fIxfree86\fR, layout: \fIus\fR, model: \fIpc102\fR, empty variant and options). +If \fIkeyboard\fR is omitted the internal defaults of \fBnxagent\fR will be used (rules: \fIbase\fR, layout: \fIus\fR, model: \fIpc102\fR, empty variant and options). .TP 8 .B keyconv=<string> -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 26b033b84e682bfe098711204418319f753a34dc Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 3 21:34:40 2018 +0100 Reconnect.c: restore old keyboard value if no new one is given It may not fully fix the issue mentioned below but it does for the -keyboard commandline option at least. Fixes ArcticaProject/nx-libs#741 --- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 6d15f20..4b1ae03 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -584,6 +584,17 @@ Bool nxagentReconnectSession(void) goto nxagentReconnectError; } + /* if there's no keyboard definition in the options file + restore the previous value. */ + #ifdef DEBUG + fprintf(stderr, "%s: nxagentKeyboard [%s] nxagentOldKeyboard [%s]\n", __func__, nxagentKeyboard, nxagentOldKeyboard); + #endif + if (nxagentKeyboard == NULL) + { + nxagentKeyboard = nxagentOldKeyboard; + nxagentOldKeyboard = NULL; + } + if (nxagentOption(ResetKeyboardAtResume) == 1 && (nxagentKeyboard == NULL || nxagentOldKeyboard == NULL || strcmp(nxagentKeyboard, nxagentOldKeyboard) != 0 || -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 1de6ca599f6f410308c7fe2ddd700197f66662fd Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Jul 22 19:03:19 2017 +0200 nxagent: add keyboard=clone configuration option Specifying -keyboard clone (or keyboard=clone in options) will clone XKB keyboard from the remote x server. This way many keyboard problems will hopefully never return... Should be the default but is not (yet) for compatibility reasons. Fixes ArcticaProject/nx-libs#373 (except the "do autoconf if no keyboard is provided" feature.) References: ArcticaProject/nx-libs#240 ArcticaProject/nx-libs#368 --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 39 +++++++++++++++++++++--- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 3 +- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 11 +++++-- 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 1da6a01..89e51b6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -761,7 +761,9 @@ XkbError: layout. */ - if (nxagentKeyboard && (strcmp(nxagentKeyboard, "query") != 0)) + if (nxagentKeyboard && + (strcmp(nxagentKeyboard, "query") != 0) && + (strcmp(nxagentKeyboard, "clone") != 0)) { for (i = 0; nxagentKeyboard[i] != '/' && nxagentKeyboard[i] != 0; i++); @@ -822,21 +824,48 @@ XkbError: unsigned int remoteruleslen = nxagentXkbGetNames(&remoterules, &remotemodel, &remotelayout, &remotevariant, &remoteoptions); - #ifdef DEBUG if (remoteruleslen && remoterules && remotemodel) { + #ifdef DEBUG fprintf(stderr, "%s: Remote: [rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", __func__, remoterules, remotemodel, remotelayout, remotevariant, remoteoptions); + #endif + + /* + * Keyboard has always been tricky with nxagent. For that + * reason X2Go offers "auto" keyboard configuration. You can + * specify it in the client side session configuration. In + * "auto" mode x2goserver expects nxagent to write the + * remote keyboard config to a file on startup and + * x2goserver would then pick that file and pass it to + * setxkbmap. This functionality is obsoleted by the "clone" + * stuff but we still need it because x2goserver does not + * know about that yet. Once x2go starts using clone we can + * drop this here. + */ + nxagentWriteKeyboardFile(remoteruleslen, remoterules, remotemodel, remotelayout, remotevariant, remoteoptions); + + /* Only setup keycode conversion if we are NOT in clone mode */ + if (nxagentKeyboard && (strcmp(nxagentKeyboard, "clone") == 0)) + { + free(rules); rules = strdup(remoterules); + free(model); model = strdup(remotemodel); + free(layout); layout = strdup(remotelayout); + free(variant); variant = strdup(remotevariant); + free(options); options = strdup(remoteoptions); + } + else + { + nxagentKeycodeConversionSetup(remoterules, remotemodel); + } } + #ifdef DEBUG else { fprintf(stderr, "%s: Failed to retrieve remote rules.\n", __func__); } #endif - nxagentWriteKeyboardFile(remoterules, remotemodel, remotelayout, remotevariant, remoteoptions); - nxagentKeycodeConversionSetup(remoterules, remotemodel); - if (remoterules) { XFree(remoterules); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 4b1ae03..a61b425 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -598,7 +598,8 @@ Bool nxagentReconnectSession(void) if (nxagentOption(ResetKeyboardAtResume) == 1 && (nxagentKeyboard == NULL || nxagentOldKeyboard == NULL || strcmp(nxagentKeyboard, nxagentOldKeyboard) != 0 || - strcmp(nxagentKeyboard, "query") == 0)) + strcmp(nxagentKeyboard, "query") == 0 || + strcmp(nxagentKeyboard, "clone") == 0)) { if (nxagentResetKeyboard() == 0) { diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 892248d..84669ff 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -525,8 +525,8 @@ don't reset keyboard device if the session is resumed this is only relevant if you also specify \-keyboard=query. In that case \fBnxagent\fR will lock the keyboard settings and clients will get an error when trying to change keyboard settings via -XKEYBOARD. With \-noxkblock the lock is not applied and clients can -change the keyboard settings through XKEYBOARD. +XKEYBOARD. With \-noxkblock the lock is not applied and clients are +allowed change the keyboard settings through XKEYBOARD. .TP 8 .B \-tile WxH size of image tiles (minimum allowed: 32x32) @@ -603,7 +603,7 @@ start or resume a session in fullscreen mode (default: off) .TP 8 .B keyboard=<string> or kbtype=<string> -.BR query | <model>/<layout> +.BR query | clone | <model>/<layout> .RS 8 .TP 8 @@ -617,6 +617,11 @@ this platform. Note that in this case XKEYBOARD will always report the default layout which will most likely not match the experienced settings. .TP 8 +.I clone +ask the real X server for the keyboard settings using XKEYBOARD +protocol functions and clone them. This is the recommended setting. For +compatibility reasons it is not the default. +.TP 8 .I <model>/<layout> use the given model and layout. You can not modify keyboard rules, variant or options. Instead preset values are used. These are -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit ab3e1485010ecb549bb09c4321d24b391eac82a1 Merge: 70cb192 26b033b Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 19 12:31:05 2018 +0100 Merge branch 'uli42-pr/keyboard_cleanup' into 3.6.x Attributes GH PR #742: https://github.com/ArcticaProject/nx-libs/pull/742 nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 185 +++++++++++++---------- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 11 ++ nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 4 +- 3 files changed, 120 insertions(+), 80 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 4dfe84eafb3838e1b54f81450369c0b8e3bb8350 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 3 21:52:33 2018 +0100 Keyboard.c: remove non-fitting comment Describes a check we are not doing here anymore... --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 9efafdf..1da6a01 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -708,12 +708,6 @@ N/A #ifdef XKB - /* - * First of all the validity - * of XkbBaseDirectory global - * variable is checked. - */ - if (noXkbExtension) { #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: No XKB extension.\n"); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 1d6c241d3c0b10db19476b3f018cc24f2024fa30 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 3 21:54:15 2018 +0100 nxagent: store remote keyboard in global variables This avoids some roundtrips. --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 213 ++++++++++++------------- nx-X11/programs/Xserver/hw/nxagent/Keyboard.h | 1 + nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 3 + 3 files changed, 106 insertions(+), 111 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index d264d1c..20b68b5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -78,10 +78,9 @@ is" without express or implied warranty. #include <errno.h> -static int nxagentXkbGetNames(char **rules, char **model, char **layout, - char **variant, char **options); +void nxagentXkbGetNames(void); -static void nxagentKeycodeConversionSetup(char *rules, char *model); +void nxagentKeycodeConversionSetup(void); void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *variant, char *options); @@ -140,6 +139,13 @@ extern Status XkbGetControls( extern int XkbDfltRepeatDelay; extern int XkbDfltRepeatInterval; +/* xkb configuration of the real X server */ +static char *nxagentRemoteRules = NULL; +static char *nxagentRemoteModel = NULL; +static char *nxagentRemoteLayout = NULL; +static char *nxagentRemoteVariant = NULL; +static char *nxagentRemoteOptions = NULL; + #endif /* XKB */ /* @@ -571,8 +577,10 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff) CARD8 modmap[MAP_LENGTH]; int i, j; XKeyboardState values; +#ifdef XKB char *model = NULL, *layout = NULL; XkbDescPtr xkb = NULL; +#endif switch (onoff) { @@ -694,20 +702,13 @@ N/A keySyms.mapWidth = mapWidth; keySyms.map = keymap; - if (XkbQueryExtension(nxagentDisplay, - &nxagentXkbInfo.Opcode, - &nxagentXkbInfo.EventBase, - &nxagentXkbInfo.ErrorBase, - &nxagentXkbInfo.MajorVersion, - &nxagentXkbInfo.MinorVersion) == 0) +#ifdef XKB + if (!nxagentGetRemoteXkbExtension()) { - ErrorF("Unable to initialize XKEYBOARD extension.\n"); - goto XkbError; + ErrorF("Unable to query XKEYBOARD extension.\n"); + goto XkbError; } - -#ifdef XKB - if (noXkbExtension) { #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: No XKB extension.\n"); @@ -838,63 +839,47 @@ XkbError: fprintf(stderr, "nxagentKeyboardProc: Init XKB extension.\n"); #endif + if (nxagentRemoteRules && nxagentRemoteModel) { - char *remoterules = NULL; - char *remotemodel = NULL; - char *remotelayout = NULL; - char *remotevariant = NULL; - char *remoteoptions = NULL; + #ifdef DEBUG + fprintf(stderr, "%s: Remote: [rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", + __func__, nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions); + #endif - unsigned int remoteruleslen = nxagentXkbGetNames(&remoterules, &remotemodel, &remotelayout, - &remotevariant, &remoteoptions); + /* + * Keyboard has always been tricky with nxagent. For that + * reason X2Go offers "auto" keyboard configuration. You can + * specify it in the client side session configuration. In + * "auto" mode x2goserver expects nxagent to write the + * remote keyboard config to a file on startup and + * x2goserver would then pick that file and pass it to + * setxkbmap. This functionality is obsoleted by the "clone" + * stuff but we still need it because x2goserver does not + * know about that yet. Once x2go starts using clone + * we can drop this here. + */ + nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions); - if (remoteruleslen && remoterules && remotemodel) + /* Only setup keycode conversion if we are NOT in clone mode */ + if (nxagentKeyboard && (strcmp(nxagentKeyboard, "clone") == 0)) { - #ifdef DEBUG - fprintf(stderr, "%s: Remote: [rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", - __func__, remoterules, remotemodel, remotelayout, remotevariant, remoteoptions); - #endif - - /* - * Keyboard has always been tricky with nxagent. For that - * reason X2Go offers "auto" keyboard configuration. You can - * specify it in the client side session configuration. In - * "auto" mode x2goserver expects nxagent to write the - * remote keyboard config to a file on startup and - * x2goserver would then pick that file and pass it to - * setxkbmap. This functionality is obsoleted by the "clone" - * stuff but we still need it because x2goserver does not - * know about that yet. Once x2go starts using clone we can - * drop this here. - */ - nxagentWriteKeyboardFile(remoteruleslen, remoterules, remotemodel, remotelayout, remotevariant, remoteoptions); - - /* Only setup keycode conversion if we are NOT in clone mode */ - if (nxagentKeyboard && (strcmp(nxagentKeyboard, "clone") == 0)) - { - free(rules); rules = strdup(remoterules); - free(model); model = strdup(remotemodel); - free(layout); layout = strdup(remotelayout); - free(variant); variant = strdup(remotevariant); - free(options); options = strdup(remoteoptions); - } - else - { - nxagentKeycodeConversionSetup(remoterules, remotemodel); - } + free(rules); rules = strdup(nxagentRemoteRules); + free(model); model = strdup(nxagentRemoteModel); + free(layout); layout = strdup(nxagentRemoteLayout); + free(variant); variant = strdup(nxagentRemoteVariant); + free(options); options = strdup(nxagentRemoteOptions); } - #ifdef DEBUG else { - fprintf(stderr, "%s: Failed to retrieve remote rules.\n", __func__); - } - #endif - - if (remoterules) - { - XFree(remoterules); + nxagentKeycodeConversionSetup(); } } + #ifdef DEBUG + else + { + fprintf(stderr, "%s: Failed to retrieve remote rules.\n", __func__); + } + #endif xkb = XkbGetKeyboard(nxagentDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); @@ -1551,8 +1536,16 @@ void nxagentTuneXkbWrapper(void) } } -static int nxagentXkbGetNames(char **rules, char **model, char **layout, - char **variant, char **options) +void nxagentXkbClearNames(void) +{ + free(nxagentRemoteRules); nxagentRemoteRules = NULL; + free(nxagentRemoteModel); nxagentRemoteModel = NULL; + free(nxagentRemoteLayout); nxagentRemoteLayout = NULL; + free(nxagentRemoteVariant); nxagentRemoteVariant = NULL; + free(nxagentRemoteOptions); nxagentRemoteOptions = NULL; +} + +void nxagentXkbGetNames(void) { Atom atom; #ifdef _XSERVER64 @@ -1567,28 +1560,25 @@ static int nxagentXkbGetNames(char **rules, char **model, char **layout, char *name; Status result; - data = name = NULL; - - *rules = NULL; - *model = NULL; - *layout = NULL; - *variant = NULL; - *options = NULL; + if (nxagentRemoteRules) + return; atom = XInternAtom(nxagentDisplay, "_XKB_RULES_NAMES", 1); if (atom == 0) { - return 0; + return; } + data = name = NULL; + result = XGetWindowProperty(nxagentDisplay, DefaultRootWindow(nxagentDisplay), atom, 0, 256, 0, XA_STRING, &type, &format, &n, &after, (unsigned char **)&data); if (result != Success || !data) { - return 0; + return; } if ((after > 0) || (type != XA_STRING) || (format != 8)) @@ -1596,7 +1586,7 @@ static int nxagentXkbGetNames(char **rules, char **model, char **layout, if (data) { XFree(data); - return 0; + return; } } @@ -1604,35 +1594,37 @@ static int nxagentXkbGetNames(char **rules, char **model, char **layout, if (name < data + n) { - *rules = name; + nxagentRemoteRules = strdup(name); name += strlen(name) + 1; } if (name < data + n) { - *model = name; + nxagentRemoteModel = strdup(name); name += strlen(name) + 1; } if (name < data + n) { - *layout = name; + nxagentRemoteLayout = strdup(name); name += strlen(name) + 1; } if (name < data + n) { - *variant = name; + nxagentRemoteVariant = strdup(name); name += strlen(name) + 1; } if (name < data + n) { - *options = name; + nxagentRemoteOptions = strdup(name); name += strlen(name) + 1; } - return n; + XFree(data); + + return; } void writeKeyboardfileData(FILE *out, char *rules, char *model, char *layout, char *variant, char *options) @@ -1697,7 +1689,7 @@ void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *vari } } -void nxagentKeycodeConversionSetup(char * rules, char * model) +void nxagentKeycodeConversionSetup(void) { if (nxagentOption(KeycodeConversion) == KeycodeConversionOff) { @@ -1711,9 +1703,9 @@ void nxagentKeycodeConversionSetup(char * rules, char * model) } else { - if (rules && model && - (strcmp(rules, "evdev") == 0 || - strcmp(model, "evdev") == 0)) + if (nxagentRemoteRules && nxagentRemoteModel && + (strcmp(nxagentRemoteRules, "evdev") == 0 || + strcmp(nxagentRemoteModel, "evdev") == 0)) { #ifdef DEBUG fprintf(stderr, "%s: Activating KeyCode conversion.\n", __func__); @@ -1736,40 +1728,39 @@ void nxagentKeycodeConversionSetup(char * rules, char * model) void nxagentResetKeycodeConversion(void) { - int result; - XkbAgentInfoRec info; - - result = XkbQueryExtension(nxagentDisplay, &info.Opcode, &info.EventBase, - &info.ErrorBase, &info.MajorVersion, - &info.MinorVersion); - - if (result != 0) + if (nxagentXkbInfo.Opcode != -1) { - char *remoterules = NULL; - char *remotemodel = NULL; - char *remotelayout = NULL; - char *remotevariant = NULL; - char *remoteoptions = NULL; - unsigned int remoteruleslen; + nxagentKeycodeConversionSetup(); + } + else + { + nxagentKeycodeConversion = False; + } +} - remoteruleslen = nxagentXkbGetNames(&remoterules, &remotemodel, &remotelayout, - &remotevariant, &remoteoptions); +Bool nxagentGetRemoteXkbExtension(void) +{ + Bool result; - if (remoteruleslen && remoterules && remotemodel) - nxagentKeycodeConversionSetup(remoterules, remotemodel); + nxagentXkbInfo.Opcode = nxagentXkbInfo.EventBase = nxagentXkbInfo.ErrorBase = nxagentXkbInfo.MajorVersion = nxagentXkbInfo.MinorVersion = -1; + nxagentXkbClearNames(); - if (remoterules) - XFree(remoterules); + if ((result = XkbQueryExtension(nxagentDisplay, + &nxagentXkbInfo.Opcode, + &nxagentXkbInfo.EventBase, + &nxagentXkbInfo.ErrorBase, + &nxagentXkbInfo.MajorVersion, + &nxagentXkbInfo.MinorVersion))) + { + nxagentXkbGetNames(); } + #ifdef WARNING else { - #ifdef WARNING - fprintf(stderr, "nxagentResetKeycodeConversion: " - "WARNING! Failed to query XKB extension.\n"); - #endif - - nxagentKeycodeConversion = False; + fprintf(stderr, "%s: WARNING! Failed to query XKB extension.\n", __func__); } -} + #endif + return result; +} #endif /* XKB */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h index ba95a3a..b6ec51e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h @@ -119,6 +119,7 @@ void nxagentTuneXkbWrapper(void); void nxagentResetKeycodeConversion(void); +Bool nxagentGetRemoteXkbExtension(void); #endif CARD8 nxagentConvertKeycode(CARD8 k); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index a61b425..bd4fccd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -584,6 +584,9 @@ Bool nxagentReconnectSession(void) goto nxagentReconnectError; } + /* Update remote XKB information */ + nxagentGetRemoteXkbExtension(); + /* if there's no keyboard definition in the options file restore the previous value. */ #ifdef DEBUG -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit d5c9733b24a55acb812a4cb11f39551c766c17d7 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 3 22:03:58 2018 +0100 nxagent: simplify keycode conversion setup --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 19 +++++-------------- nx-X11/programs/Xserver/hw/nxagent/Keyboard.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 +- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 20b68b5..5c35d71 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1691,10 +1691,14 @@ void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *vari void nxagentKeycodeConversionSetup(void) { + nxagentKeycodeConversion = False; + + if (nxagentXkbInfo.Opcode == -1) + return; + if (nxagentOption(KeycodeConversion) == KeycodeConversionOff) { fprintf(stderr, "Info: Keycode conversion is off\n"); - nxagentKeycodeConversion = False; } else if (nxagentOption(KeycodeConversion) == KeycodeConversionOn) { @@ -1721,23 +1725,10 @@ void nxagentKeycodeConversionSetup(void) #endif fprintf(stderr, "Info: Keycode conversion auto-determined as off\n"); - nxagentKeycodeConversion = False; } } } -void nxagentResetKeycodeConversion(void) -{ - if (nxagentXkbInfo.Opcode != -1) - { - nxagentKeycodeConversionSetup(); - } - else - { - nxagentKeycodeConversion = False; - } -} - Bool nxagentGetRemoteXkbExtension(void) { Bool result; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h index b6ec51e..dbfb477 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h @@ -117,7 +117,7 @@ void nxagentEnableXkbExtension(void); void nxagentTuneXkbWrapper(void); -void nxagentResetKeycodeConversion(void); +void nxagentKeycodeConversionSetup(void); Bool nxagentGetRemoteXkbExtension(void); #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index bd4fccd..91445a3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -620,7 +620,7 @@ Bool nxagentReconnectSession(void) } else { - nxagentResetKeycodeConversion(); + nxagentKeycodeConversionSetup(); } nxagentXkbState.Initialized = 0; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 161515d2463b539e8d6e6ca8db625cb6f3eece0a Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Dec 2 17:08:31 2018 +0100 nxagent: add additional keyboard config option rmlvo Add possibility to pass more than model and layout via the keyboard parameter. --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 34 ++++++++++++++++++++---- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 11 ++++++-- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 89e51b6..d264d1c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -774,8 +774,33 @@ XkbError: goto XkbError; } - model = strndup(nxagentKeyboard, i); - layout = strdup(&nxagentKeyboard[i + 1]); + /* + The original nxagent only supports model/layout values + here. It uses these values together with the default rules + and empty variant and options. We use a more or less + compatible hack here: The special keyword rlmvo for model + means that the layout part of the string will contain a + full RMLVO config, separated by #, e.g. + rlmvo/base#pc105#de,us#nodeadkeys#lv3:rwin_switch + */ + if (strncmp(nxagentKeyboard, "rlmvo/", 6) == 0) + { + const char * sep = "#"; + char * rmlvo = strdup(&nxagentKeyboard[i+1]); + char * tmp = rmlvo; + /* strtok cannot handle empty fields, so use strsep */ + rules = strdup(strsep(&tmp, sep)); + model = strdup(strsep(&tmp, sep)); + layout = strdup(strsep(&tmp, sep)); + variant = strdup(strsep(&tmp, sep)); + options = strdup(strsep(&tmp, sep)); + free(rmlvo); + } + else + { + model = strndup(nxagentKeyboard, i); + layout = strdup(&nxagentKeyboard[i + 1]); + } /* * There is no description for pc105 on Solaris. @@ -783,8 +808,8 @@ XkbError: */ #ifdef TEST - fprintf(stderr, "nxagentKeyboardProc: Using keyboard model [%s] with layout [%s].\n", - model, layout); + fprintf(stderr, "%s: Using [rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", + __func__, rules, model, layout, variant, options); #endif #ifdef __sun @@ -793,7 +818,6 @@ XkbError: { #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: WARNING! Keyboard model 'pc105' unsupported on Solaris.\n"); - fprintf(stderr, "nxagentKeyboardProc: WARNING! Forcing keyboard model to 'pc104'.\n"); #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 84669ff..938c2eb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -603,7 +603,7 @@ start or resume a session in fullscreen mode (default: off) .TP 8 .B keyboard=<string> or kbtype=<string> -.BR query | clone | <model>/<layout> +.BR query | clone | <model>/<layout> | rmlvo/<rules>#<model>#<layout>#<variant>#<options> .RS 8 .TP 8 @@ -624,8 +624,15 @@ compatibility reasons it is not the default. .TP 8 .I <model>/<layout> use the given model and layout. You can not modify keyboard rules, -variant or options. Instead preset values are used. These are +variant or options this way. Instead preset values are used. These are \fIbase\fR for rules and empty strings for variant and options. +.TP 8 +.I rmlvo/<rules>#<model>#<layout>#<variant>#<options> +configure the keyboard according to the rmlvo +(Rules+Model+Layout+Variant+Options) description given after the / and +separated by #. This can be used to fully pass the keyboard +configuration of \fBnxagent\fR right after the start. Example: +rmlvo/base#pc105#de,us#nodeadkeys#lv3:rwin_switch .RE .TP 8 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit a70ec920dd33a04b74af876444602c587fe9ec80 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Dec 3 23:35:56 2018 +0100 Keyboard.c: add static keyword where appropriate --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 5c35d71..cfe73ac 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -78,11 +78,11 @@ is" without express or implied warranty. #include <errno.h> -void nxagentXkbGetNames(void); +static void nxagentXkbGetNames(void); void nxagentKeycodeConversionSetup(void); -void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *variant, char *options); +static void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *variant, char *options); #endif /* XKB */ @@ -1545,7 +1545,7 @@ void nxagentXkbClearNames(void) free(nxagentRemoteOptions); nxagentRemoteOptions = NULL; } -void nxagentXkbGetNames(void) +static void nxagentXkbGetNames(void) { Atom atom; #ifdef _XSERVER64 @@ -1627,7 +1627,7 @@ void nxagentXkbGetNames(void) return; } -void writeKeyboardfileData(FILE *out, char *rules, char *model, char *layout, char *variant, char *options) +static void writeKeyboardfileData(FILE *out, char *rules, char *model, char *layout, char *variant, char *options) { /* How to set "empty" values with setxkbmap, result of trial and error: @@ -1645,7 +1645,7 @@ void writeKeyboardfileData(FILE *out, char *rules, char *model, char *layout, ch fprintf(out, "options=\",%s\"\n", options ? options : ""); } -void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *variant, char *options) +static void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *variant, char *options) { if (rules && rules[0] != '\0') { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit a8c65ab6290d9516b733273098db50721e84bcec Merge: ab3e148 a70ec92 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 19 12:36:28 2018 +0100 Merge branch 'uli42-pr/improve_keyboard2' into 3.6.x Attributes GH PR #743: https://github.com/ArcticaProject/nx-libs/pull/743 nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 229 +++++++++++++---------- nx-X11/programs/Xserver/hw/nxagent/Keyboard.h | 3 +- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 8 +- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 20 +- 4 files changed, 156 insertions(+), 104 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 522106e207e7230da5e62fb88f2e47742fdf1b21 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Jul 22 22:21:05 2017 +0200 nxagent: bypass X2go's keyboard configuration hack If X2go runs in auto keyboard mode it will pass keyboard=null/null to the agent and set the keyboard afterwards with setxkbmap. This patch lets nxagent handle that situation internally (null/null will be interpreted as clone) and disables X2go's mechanism (by creating a dir that effectively blocks it; see x2gosetkeyboard) This is only activated if the agent is run as "x2goagent". Fixes ArcticaProject/nx-libs#368 --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 111 ++++++++++++++++------- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 10 ++ nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 3 +- 3 files changed, 92 insertions(+), 32 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index cfe73ac..af27c6e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -57,6 +57,7 @@ is" without express or implied warranty. #include "Events.h" #include "Options.h" #include "Error.h" +#include "Init.h" #include "compext/Compext.h" @@ -82,6 +83,7 @@ static void nxagentXkbGetNames(void); void nxagentKeycodeConversionSetup(void); +static void nxagentWriteKeyboardDir(void); static void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *variant, char *options); #endif /* XKB */ @@ -751,6 +753,15 @@ XkbError: fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL"); #endif + if (nxagentX2go == 1 && nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0)) + { + #ifdef TEST + fprintf(stderr, "%s: changing nxagentKeyboard from [null/null] to [clone].\n", __func__); + #endif + free(nxagentKeyboard); + nxagentKeyboard = strdup("clone"); + } + /* from nxagent changelog: 2.0.22: @@ -846,19 +857,6 @@ XkbError: __func__, nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions); #endif - /* - * Keyboard has always been tricky with nxagent. For that - * reason X2Go offers "auto" keyboard configuration. You can - * specify it in the client side session configuration. In - * "auto" mode x2goserver expects nxagent to write the - * remote keyboard config to a file on startup and - * x2goserver would then pick that file and pass it to - * setxkbmap. This functionality is obsoleted by the "clone" - * stuff but we still need it because x2goserver does not - * know about that yet. Once x2go starts using clone - * we can drop this here. - */ - nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions); /* Only setup keycode conversion if we are NOT in clone mode */ if (nxagentKeyboard && (strcmp(nxagentKeyboard, "clone") == 0)) @@ -868,10 +866,33 @@ XkbError: free(layout); layout = strdup(nxagentRemoteLayout); free(variant); variant = strdup(nxagentRemoteVariant); free(options); options = strdup(nxagentRemoteOptions); + /* + * when cloning we do not want X2Go to set the keyboard + * via a keyboard file generated by nxagent. The defined + * method for switching that off is the creation of a dir + * instead of a file. Which is achieved by passing NULL to + * nxagentWriteKeyboardFile. + */ + if (nxagentX2go == 1) + nxagentWriteKeyboardDir(); } else { nxagentKeycodeConversionSetup(); + /* + * Keyboard has always been tricky with nxagent. For that + * reason X2Go offers "auto" keyboard configuration. You can + * specify it in the client side session configuration. In + * "auto" mode x2goserver expects nxagent to write the + * remote keyboard config to a file on startup and + * x2goserver would then pick that file and pass it to + * setxkbmap. This functionality is obsoleted by the "clone" + * stuff but we still need it because x2goserver does not + * know about that yet. Once x2go starts using clone + * we can drop this here. + */ + if (nxagentX2go == 1) + nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions); } } #ifdef DEBUG @@ -1645,6 +1666,49 @@ static void writeKeyboardfileData(FILE *out, char *rules, char *model, char *lay fprintf(out, "options=\",%s\"\n", options ? options : ""); } +static char* getKeyboardFilePath(void) +{ + char *keyboard_file_path = NULL; + char *sessionpath = nxagentGetSessionPath(); + if (sessionpath) + { + if ((asprintf(&keyboard_file_path, "%s/keyboard", sessionpath) == -1)) + { + free(sessionpath); + FatalError("malloc for keyboard file path failed."); + } + free(sessionpath); + } + else + { + fprintf(stderr, "Warning: Failed to determine keyboard file path: SessionPath not defined\n"); + } + return keyboard_file_path; +} + +static void nxagentWriteKeyboardDir(void) +{ + char *keyboard_file_path = getKeyboardFilePath(); + + if (keyboard_file_path) + { + /* + * special case: if rules is NULL create a directory insteas of + * a file. This is the defined method to disable x2gosetkeyboard. + */ + if (mkdir(keyboard_file_path, 0555) < 0) + { + int save_err = errno; + fprintf(stderr, "Warning: Failed to create keyboard blocking directory '%s': %s\n", keyboard_file_path, strerror(save_err)); + } + else + { + fprintf(stderr, "Info: keyboard blocking directory created: '%s'\n", keyboard_file_path); + } + free(keyboard_file_path); + } +} + static void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *variant, char *options) { if (rules && rules[0] != '\0') @@ -1653,21 +1717,14 @@ static void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, cha writeKeyboardfileData(stderr, rules, model, layout, variant, options); #endif - char *sessionpath = nxagentGetSessionPath(); - if (sessionpath) + char *keyboard_file_path = getKeyboardFilePath(); + + if (keyboard_file_path) { - char *keyboard_file_path = NULL; FILE *keyboard_file; - if ((asprintf(&keyboard_file_path, "%s/keyboard", sessionpath) == -1)) - { - free(sessionpath); - FatalError("malloc for keyboard file path failed."); - } - free(sessionpath); if ((keyboard_file = fopen(keyboard_file_path, "w"))) { writeKeyboardfileData(keyboard_file, rules, model, layout, variant, options); - fclose(keyboard_file); fprintf(stderr, "Info: keyboard file created: '%s'\n", keyboard_file_path); } @@ -1678,14 +1735,6 @@ static void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, cha } free(keyboard_file_path); } - else - { - fprintf(stderr, "Warning: Failed to create keyboard file: SessionPath not defined\n"); - } - } - else - { - fprintf(stderr, "Warning: Failed to create the keyboard file\n"); } } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 91445a3..a921df6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -458,6 +458,16 @@ Bool nxagentReconnectSession(void) nxagentProcessOptions(nxagentOptionsFilenameOrString); + if (nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0)) + { + #ifdef TEST + fprintf(stderr, "nxagentReconnect: changing nxagentKeyboard from [null/null] to [clone].\n"); + #endif + + free(nxagentKeyboard); + nxagentKeyboard = strdup("clone"); + } + if (nxagentReconnectDisplay(reconnectLossyLevel[DISPLAY_STEP]) == 0) { failedStep = DISPLAY_STEP; diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 938c2eb..737d360 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -623,7 +623,8 @@ protocol functions and clone them. This is the recommended setting. For compatibility reasons it is not the default. .TP 8 .I <model>/<layout> -use the given model and layout. You can not modify keyboard rules, +use the given model and layout. A value of \fInull/null\fR is equivalent to +\fIclone\fR. You can not modify keyboard rules, variant or options this way. Instead preset values are used. These are \fIbase\fR for rules and empty strings for variant and options. .TP 8 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 669af5300f904d399edb96d17faf93104e055138 Merge: a8c65ab 522106e Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 19 12:38:59 2018 +0100 Merge branch 'uli42-pr/x2go_bypass' into 3.6.x Attributes GH PR #744: https://github.com/ArcticaProject/nx-libs/pull/744 nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 111 ++++++++++++++++------- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 10 ++ nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 3 +- 3 files changed, 92 insertions(+), 32 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit d98255968330e904e02cd129482f83f31e937fa6 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 19 12:39:59 2018 +0100 nxagent.1 man page: Grammar fix. --- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 737d360..c438c47 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -526,7 +526,7 @@ this is only relevant if you also specify \-keyboard=query. In that case \fBnxagent\fR will lock the keyboard settings and clients will get an error when trying to change keyboard settings via XKEYBOARD. With \-noxkblock the lock is not applied and clients are -allowed change the keyboard settings through XKEYBOARD. +allowed to change the keyboard settings through XKEYBOARD. .TP 8 .B \-tile WxH size of image tiles (minimum allowed: 32x32) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 633f4617b6720bcac8e0ead9e46fd14b60d598e6 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Oct 31 23:44:15 2018 +0100 XlibInt: check for XlibError before accessing other dpy fields This fixes an assertion being triggered on reconnect: assertion=assertion@entry=0x7f2f0bba6510 "(dpy->flags & XlibDisplayPrivSync) != 0", file=file@entry=0x7f2f0bba62fc "XlibInt.c", line=line@entry=895, --- nx-X11/lib/src/XlibInt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nx-X11/lib/src/XlibInt.c b/nx-X11/lib/src/XlibInt.c index 88698da..36e6501 100644 --- a/nx-X11/lib/src/XlibInt.c +++ b/nx-X11/lib/src/XlibInt.c @@ -892,6 +892,16 @@ void _XSeqSyncFunction( static int _XPrivSyncFunction (Display *dpy) { +#ifdef NX_TRANS_SOCKET + if (dpy->flags & XlibDisplayIOError) + { +#ifdef NX_TRANS_DEBUG + fprintf(stderr, "%s: Returning 0 with I/O error detected.\n", __func__); +#endif + return 0; + } +#endif /* NX_TRANS_SOCKET */ + #ifdef XTHREADS assert(!dpy->lock_fns); #endif -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 4a7faa8bd0b8918900f442d097a6e946415d1ea7 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jan 10 22:35:02 2019 +0100 Window.c: move WM_STATE handling to separate function --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 36 +++++++++++++++-------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 82f4991..c404d0a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -1822,6 +1822,18 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) return 1; } +void nxagentSetWMState(WindowPtr pWin, CARD32 desired) +{ + Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True); + nxagentWMStateRec wmState = {.state = desired, .icon = None}; + if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success) + { + #ifdef WARNING + fprintf(stderr, "%s: Changing WM_STATE failed.\n", __func__); + #endif + } +} + Bool nxagentRealizeWindow(WindowPtr pWin) { if (nxagentScreenTrap == 1) @@ -1843,14 +1855,7 @@ Bool nxagentRealizeWindow(WindowPtr pWin) /* add by dimbor */ if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) { - Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True); - nxagentWMStateRec wmState; - wmState.state = 1; /* NormalState */ - wmState.icon = None; - if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success) - { - fprintf(stderr, "nxagentRealizeWindow: Adding WM_STATE fail.\n"); - } + nxagentSetWMState(pWin, NormalState); } /* @@ -1878,7 +1883,7 @@ Bool nxagentRealizeWindow(WindowPtr pWin) #ifdef TEST if (nxagentOption(Rootless) && nxagentLastWindowDestroyed) { - fprintf(stderr, "nxagentRealizeWindow: Window realized. Stopped termination for rootless session.\n"); + fprintf(stderr, "%s: Window realized. Stopped termination for rootless session.\n", __func__); } #endif @@ -1899,14 +1904,11 @@ Bool nxagentUnrealizeWindow(WindowPtr pWin) /* add by dimbor */ if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) { - Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True); - nxagentWMStateRec wmState; - wmState.state = 3; /* WithdrawnState */ - wmState.icon = None; - if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success) - { - fprintf(stderr, "nxagentUnRealizeWindow: Changing WM_STATE failed.\n"); - } + /* + * The original _comment_ was WithdrawnState, while the _value_ + * was 3, which is IconicState. + */ + nxagentSetWMState(pWin, IconicState); } XUnmapWindow(nxagentDisplay, nxagentWindow(pWin)); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit d175fd4c6d7872bf51c8509a678fecd84a14850a Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jan 11 00:59:55 2019 +0100 Set default screen size to the whole screen in rootless mode This solves weird window (menu) placement and drawing behaviour on right/lowest 25% of the screen. Fixes ArcticaProject/nx-libs#757 (Part 1/2) --- nx-X11/programs/Xserver/hw/nxagent/Display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 448969d..1278749 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -1356,7 +1356,7 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. { if (!(nxagentUserGeometry.flag & WidthValue)) { - if (nxagentOption(Fullscreen)) + if (nxagentOption(Fullscreen) || nxagentOption(Rootless)) { nxagentChangeOption(RootWidth, DisplayWidth(nxagentDisplay, DefaultScreen(nxagentDisplay))); } @@ -1369,7 +1369,7 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. if (!(nxagentUserGeometry.flag & HeightValue)) { - if (nxagentOption(Fullscreen)) + if (nxagentOption(Fullscreen) || nxagentOption(Rootless)) { nxagentChangeOption(RootHeight, DisplayHeight(nxagentDisplay, DefaultScreen(nxagentDisplay))); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 4214a719a0c0564e7c4ced565e0a28ecdcc7f2d7 Merge: d982559 633f461 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Dec 22 22:02:15 2018 +0100 Merge branch 'uli42-pr/fix_xlibcrash' into 3.6.x Attributes GH PR #754: https://github.com/ArcticaProject/nx-libs/pull/754 nx-X11/lib/src/XlibInt.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit a61b1a72dc91503b34e3260262fb201191fab887 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Oct 31 23:43:58 2018 +0100 XlibInt.c: fix wrong debug message --- nx-X11/lib/src/XlibInt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/lib/src/XlibInt.c b/nx-X11/lib/src/XlibInt.c index 119126d..88698da 100644 --- a/nx-X11/lib/src/XlibInt.c +++ b/nx-X11/lib/src/XlibInt.c @@ -875,7 +875,7 @@ void _XSeqSyncFunction( if (dpy->flags & XlibDisplayIOError) { #ifdef NX_TRANS_DEBUG - fprintf(stderr, "_XSeqSyncFunction: Returning 0 with I/O error detected.\n"); + fprintf(stderr, "_XSeqSyncFunction: Returning with I/O error detected.\n"); #endif return; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 8dea30751d5917482527489ca292714a7874f42c Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jan 11 23:25:39 2019 +0100 Screen.c: move identical line out of both parts of an if clause --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index d8cf695..1af6215 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1011,6 +1011,8 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, resetAgentPosition = True; } + nxagentChangeOption(BorderWidth, 0); + if (nxagentOption(Fullscreen)) { nxagentChangeOption(X, 0); @@ -1019,7 +1021,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, nxagentChangeOption(Width, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay))); nxagentChangeOption(Height, HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay))); - nxagentChangeOption(BorderWidth, 0); if (nxagentReconnectTrap == False || nxagentResizeDesktopAtStartup) { @@ -1052,8 +1053,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, } else { - nxagentChangeOption(BorderWidth, 0); - if (nxagentReconnectTrap == False) { nxagentChangeOption(RootX, 0); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit d16a5fbb19c072b667be76633bc3f23f12ca82ef Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Jan 12 01:01:55 2019 +0100 Screen.c: fix handling of fullscreen startup If nxagent is started in fullscreen mode take care the saved size (that is applied on exit of the fullscreen mode) will be configured correctly. Also respect a user provided -geometry option (had been ignored here previously). Fixes ArcticaProject/nx-libs#449 --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index bd0236a..19057df 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1019,10 +1019,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, /* first time screen initialization or resize during reconnect */ if (nxagentReconnectTrap == False || nxagentResizeDesktopAtStartup) { - nxagentChangeOption(RootWidth, w); - nxagentChangeOption(RootHeight, h); - - if (nxagentOption(RootWidth) > w) + if (nxagentOption(RootWidth) >= w) { nxagentChangeOption(SavedWidth, w * 3 / 4); } @@ -1031,7 +1028,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, nxagentChangeOption(SavedWidth, nxagentOption(RootWidth)); } - if (nxagentOption(RootHeight) > h) + if (nxagentOption(RootHeight) >= h) { nxagentChangeOption(SavedHeight, h * 3 / 4); } @@ -1040,6 +1037,9 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, nxagentChangeOption(SavedHeight, nxagentOption(RootHeight)); } + nxagentChangeOption(RootWidth, w); + nxagentChangeOption(RootHeight, h); + nxagentChangeOption(RootX, 0); nxagentChangeOption(RootY, 0); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 3c92b5db9d3d90967410c4dc1d1f8a45554c724b Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Jan 13 23:47:53 2019 +0100 Screen.c: fix size calculation in rootless mode There's no need to reduce the size to 75% in rootless mode. We always want to have the full size then. Fixes ArcticaProject/nx-libs#757 (Part 2/2) --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index cfe0fd9..bd0236a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1080,12 +1080,26 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, if (nxagentOption(Width) > w) { - nxagentChangeOption(Width, w * 3 / 4); + if (nxagentOption(Rootless)) + { + nxagentChangeOption(Width, w); + } + else + { + nxagentChangeOption(Width, w * 3 / 4); + } } if (nxagentOption(Height) > h) { - nxagentChangeOption(Height, h * 3 / 4); + if (nxagentOption(Rootless)) + { + nxagentChangeOption(Height, h); + } + else + { + nxagentChangeOption(Height, h * 3 / 4); + } } /* -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 6c0098a3e64683f79e5dbbf601ac18d840a88726 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jan 11 21:58:50 2019 +0100 Extensions.c: fix first resolution being ignored Minor fix: The loop always started at index 3, comparing against the value at index 2. So the resolution at index 1 (320x240) was never taken into account for anything. --- nx-X11/programs/Xserver/hw/nxagent/Extensions.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c index d4f195b..3639922 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c @@ -318,10 +318,10 @@ static int nxagentRandRInitSizes(ScreenPtr pScreen) * Compute default size. */ - w[0] = w[2]; - h[0] = h[2]; + w[0] = w[1]; + h[0] = h[1]; - for (i = 3; i < nSizes - 1; i++) + for (i = 2; i < nSizes - 1; i++) { if ((w[i] <= maxWidth * 3 / 4) && (h[i] <= maxHeight * 3 / 4) && -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit c4c39bc949549795c39ecbb24967256119c1f342 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jan 11 22:39:34 2019 +0100 Extensions.c: Cleanup nxagentRandRInitSizes() --- nx-X11/programs/Xserver/hw/nxagent/Extensions.c | 77 +++++++++++-------------- 1 file changed, 33 insertions(+), 44 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c index 3639922..785724c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c @@ -269,40 +269,30 @@ int nxagentRandRGetInfo(ScreenPtr pScreen, Rotation *pRotations) static int nxagentRandRInitSizes(ScreenPtr pScreen) { - RRScreenSizePtr pSize; + const int refresh_rate = 60; + RRScreenSizePtr pSize = NULL; - int width; - int height; - - int maxWidth; - int maxHeight; + /* + Index[0]: default size + Index[nsizes-1]: current size + Index[nsizes-2]: max size + */ -/* + /* int w[] = {0, 160, 320, 640, 800, 1024, 1152, 1280, 1280, 1280, 1280, 1280, 1280, 1360, 1440, 1600, 1600, 1680, 1920, 1920, 0, 0}; int h[] = {0, 120, 240, 480, 600, 768, 864, 600, 720, 800, 854, 960, 1024, 768, 900, 900, 1200, 1050, 1080, 1200, 0, 0}; -*/ + */ int w[] = {0, 320, 640, 640, 800, 800, 1024, 1024, 1152, 1280, 1280, 1280, 1360, 1440, 1600, 1600, 1680, 1920, 1920, 0, 0}; int h[] = {0, 240, 360, 480, 480, 600, 600, 768, 864, 720, 800, 1024, 768, 900, 900, 1200, 1050, 1080, 1200, 0, 0}; - int i; - int nSizes; - - int mmWidth; - int mmHeight; - - /* - * Register all the supported sizes. The third - * parameter is the refresh rate. - */ - - maxWidth = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); - maxHeight = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); + int maxWidth = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); + int maxHeight = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); - nSizes = sizeof w / sizeof(int); + int nSizes = sizeof w / sizeof(int); /* * Add current and max sizes. @@ -321,7 +311,7 @@ static int nxagentRandRInitSizes(ScreenPtr pScreen) w[0] = w[1]; h[0] = h[1]; - for (i = 2; i < nSizes - 1; i++) + for (int i = 2; i < nSizes - 1; i++) { if ((w[i] <= maxWidth * 3 / 4) && (h[i] <= maxHeight * 3 / 4) && @@ -333,47 +323,46 @@ static int nxagentRandRInitSizes(ScreenPtr pScreen) } } - for (i = 0; i < nSizes; i++) + /* + * Register all the supported sizes at a fixed refresh rate. + */ + + for (int i = 0; i < nSizes; i++) { - width = w[i]; - height = h[i]; + int mmWidth, mmHeight; if (monitorResolution < 0) { - mmWidth = width * DisplayWidthMM(nxagentDisplay, DefaultScreen(nxagentDisplay)) / + mmWidth = w[i] * DisplayWidthMM(nxagentDisplay, DefaultScreen(nxagentDisplay)) / DisplayWidth(nxagentDisplay, DefaultScreen(nxagentDisplay)); - mmHeight = height * DisplayHeightMM(nxagentDisplay, DefaultScreen(nxagentDisplay)) / + mmHeight = h[i] * DisplayHeightMM(nxagentDisplay, DefaultScreen(nxagentDisplay)) / DisplayHeight(nxagentDisplay, DefaultScreen(nxagentDisplay)); } else { - mmWidth = (width * 254 + monitorResolution * 5) / (monitorResolution * 10); - mmHeight = (height * 254 + monitorResolution * 5) / (monitorResolution * 10); - - } - - if (mmWidth < 1) - { - mmWidth = 1; - } - - if (mmHeight < 1) - { - mmHeight = 1; + mmWidth = (w[i] * 254 + monitorResolution * 5) / (monitorResolution * 10); + mmHeight = (h[i] * 254 + monitorResolution * 5) / (monitorResolution * 10); } - pSize = RRRegisterSize(pScreen, width, height, mmWidth, mmHeight); + pSize = RRRegisterSize(pScreen, w[i], h[i], mmWidth < 1 ? 1 : mmWidth, mmHeight < 1 ? 1 : mmHeight); if (pSize == NULL) { return 0; } - RRRegisterRate (pScreen, pSize, 60); + RRRegisterRate (pScreen, pSize, refresh_rate); } - RRSetCurrentConfig(pScreen, RR_Rotate_0, 60, pSize); + /* + * the last registered size should be the current size + */ + + if (pSize) + { + RRSetCurrentConfig(pScreen, RR_Rotate_0, refresh_rate, pSize); + } return 1; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 43d3b655d4f158203b3e39025a3cafc314ba9ad7 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Jan 13 23:46:49 2019 +0100 Screen.c: improve readability of size calculations ... by using some short named variables and the min() macro. No change in behaviour. --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 122 +++++++++++++--------------- 1 file changed, 57 insertions(+), 65 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 1af6215..cfe0fd9 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -885,8 +885,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, #endif /* - * Forced geometry parameter - * to user geometry. + * Forced geometry parameter to user geometry. */ if (nxagentResizeDesktopAtStartup) @@ -903,32 +902,26 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, if (nxagentUserGeometry.flag & WidthValue) { - nxagentChangeOption(Width, nxagentUserGeometry.Width); - nxagentChangeOption(RootWidth, nxagentUserGeometry.Width); + int uw = nxagentUserGeometry.Width; - if (nxagentOption(SavedWidth) > nxagentUserGeometry.Width) - { - nxagentChangeOption(SavedWidth, nxagentUserGeometry.Width); - } + nxagentChangeOption(Width, uw); + nxagentChangeOption(RootWidth, uw); + nxagentChangeOption(SavedWidth, min(nxagentOption(SavedWidth), uw)); } if (nxagentUserGeometry.flag & HeightValue) { - nxagentChangeOption(Height, nxagentUserGeometry.Height); - nxagentChangeOption(RootHeight, nxagentUserGeometry.Height); + int uh = nxagentUserGeometry.Height; - if (nxagentOption(SavedHeight) > nxagentUserGeometry.Height) - { - nxagentChangeOption(SavedHeight, nxagentUserGeometry.Height); - } + nxagentChangeOption(Height, uh); + nxagentChangeOption(RootHeight, uh); + nxagentChangeOption(SavedHeight, min(nxagentOption(SavedHeight), uh)); } } /* - * This is first time the - * screen is initialized. - * Filling the geometry parameter - * from user geometry. + * This is first time the screen is initialized. + * Filling the geometry parameter from user geometry. */ if (nxagentReconnectTrap == False) @@ -971,10 +964,8 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, } /* - * Determine the size of the root window. - * It is the maximum size of the screen - * if we are either in rootless or in - * fullscreen mode. + * Determine the size of the root window. It is the maximum size of + * the screen if we are either in rootless or in fullscreen mode. */ if (nxagentOption(Rootless) == False && !nxagentWMIsRunning) @@ -1013,46 +1004,58 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, nxagentChangeOption(BorderWidth, 0); + /* get the screen size of the real X server once */ + int w = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); + int h = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); + if (nxagentOption(Fullscreen)) { nxagentChangeOption(X, 0); nxagentChangeOption(Y, 0); - nxagentChangeOption(Width, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay))); - nxagentChangeOption(Height, HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay))); - + nxagentChangeOption(Width, w); + nxagentChangeOption(Height, h); + /* first time screen initialization or resize during reconnect */ if (nxagentReconnectTrap == False || nxagentResizeDesktopAtStartup) { - nxagentChangeOption(RootWidth, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay))); - nxagentChangeOption(RootHeight, HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay))); + nxagentChangeOption(RootWidth, w); + nxagentChangeOption(RootHeight, h); - if (nxagentOption(RootWidth) > WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay))) + if (nxagentOption(RootWidth) > w) { - nxagentChangeOption(SavedWidth, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) * 3 / 4); + nxagentChangeOption(SavedWidth, w * 3 / 4); } else { nxagentChangeOption(SavedWidth, nxagentOption(RootWidth)); } - if (nxagentOption(RootHeight) > HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay))) + if (nxagentOption(RootHeight) > h) { - nxagentChangeOption(SavedHeight, HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) * 3 / 4); + nxagentChangeOption(SavedHeight, h * 3 / 4); } else { nxagentChangeOption(SavedHeight, nxagentOption(RootHeight)); } - } - nxagentChangeOption(RootX, ((WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) - - nxagentOption(RootWidth)) / 2)); - nxagentChangeOption(RootY, ((HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) - - nxagentOption(RootHeight)) / 2)); + nxagentChangeOption(RootX, 0); + nxagentChangeOption(RootY, 0); + } + else + { + /* center */ + nxagentChangeOption(RootX, (w - nxagentOption(RootWidth)) / 2); + nxagentChangeOption(RootY, (h - nxagentOption(RootHeight)) / 2); + } } else { + /* + * screen is initialized for the first time + */ + if (nxagentReconnectTrap == False) { nxagentChangeOption(RootX, 0); @@ -1063,53 +1066,44 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, } /* - * Be sure that the agent window won't be bigger + * Ensure that the agent window won't be bigger * than the root window. */ - if (nxagentOption(Width) > nxagentOption(RootWidth)) - { - nxagentChangeOption(Width, nxagentOption(RootWidth)); - } - - if (nxagentOption(Height) > nxagentOption(RootHeight)) - { - nxagentChangeOption(Height, nxagentOption(RootHeight)); - } + nxagentChangeOption(Width, min(nxagentOption(Width), nxagentOption(RootWidth))); + nxagentChangeOption(Height, min(nxagentOption(Height), nxagentOption(RootHeight))); /* * Be sure that the agent window won't be bigger * than the X server root window. */ - if (nxagentOption(Width) > WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay))) + if (nxagentOption(Width) > w) { - nxagentChangeOption(Width, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) * 3 / 4); + nxagentChangeOption(Width, w * 3 / 4); } - if (nxagentOption(Height) > HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay))) + if (nxagentOption(Height) > h) { - nxagentChangeOption(Height, HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) * 3 / 4); + nxagentChangeOption(Height, h * 3 / 4); } /* - * Forcing the agent window geometry to be equal to - * the root window geometry the first time the - * screen is initialized if the geometry hasn't been - * esplicitly set in the option file and if - * the root window isn't bigger than the X server - * root window.. + * Forcing the agent window geometry to be equal to the root + * window geometry the first time the screen is initialized if the + * geometry hasn't been explicitly set in the option file and if + * the root window isn't bigger than the X server root window.. */ if (nxagentReconnectTrap == False) { - if ((nxagentOption(RootWidth) < WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay))) && + if ((nxagentOption(RootWidth) < w) && !(nxagentUserGeometry.flag & WidthValue)) { nxagentChangeOption(Width, nxagentOption(RootWidth)); } - if ((nxagentOption(RootHeight) < HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay))) && + if ((nxagentOption(RootHeight) < h) && !(nxagentUserGeometry.flag & HeightValue)) { nxagentChangeOption(Height, nxagentOption(RootHeight)); @@ -1118,11 +1112,9 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, if (resetAgentPosition) { - nxagentChangeOption(X, ((WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) - - nxagentOption(Width)) / 2)); - - nxagentChangeOption(Y, ((HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) - - nxagentOption(Height)) / 2)); + /* center */ + nxagentChangeOption(X, (w - nxagentOption(Width)) / 2); + nxagentChangeOption(Y, (h - nxagentOption(Height)) / 2); } nxagentChangeOption(SavedWidth, nxagentOption(RootWidth)); @@ -1131,8 +1123,8 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, if (nxagentOption(Rootless)) { - nxagentChangeOption(RootWidth, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay))); - nxagentChangeOption(RootHeight, HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay))); + nxagentChangeOption(RootWidth, w); + nxagentChangeOption(RootHeight, h); } nxagentChangeOption(SavedRootWidth, nxagentOption(RootWidth)); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 889de46f759913742478d2cfe20f1f4a6c2effdc Author: Vadim <vtroshchinskiy@qindel.com> Date: Fri Jan 18 13:15:18 2019 +0100 Fix parsing ports set to unix sockets --- nxcomp/src/Loop.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp index ddffcd1..8e6f20e 100644 --- a/nxcomp/src/Loop.cpp +++ b/nxcomp/src/Loop.cpp @@ -7803,6 +7803,7 @@ int ParseEnvironmentOptions(const char *env, int force) strcpy(opts, env); char *nextOpts = opts; + bool nxdisplay_found = false; // // Ensure that DISPLAY environment variable @@ -7824,14 +7825,17 @@ int ParseEnvironmentOptions(const char *env, int force) else if (strncasecmp(opts, "nx/nx,", 6) == 0) { nextOpts += 6; + nxdisplay_found = true; } else if (strncasecmp(opts, "nx,", 3) == 0) { nextOpts += 3; + nxdisplay_found = true; } else if (strncasecmp(opts, "nx:", 3) == 0) { nextOpts += 3; + nxdisplay_found = true; } else if (force == 0) { @@ -7860,7 +7864,7 @@ int ParseEnvironmentOptions(const char *env, int force) value = strrchr(nextOpts, ':'); - if (value != NULL) + if (value != NULL && nxdisplay_found ) { char *check = value + 1; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit ca8236e7fe565e851362a744bfa0312274e1f856 Merge: 4214a71 d16a5fb Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Jan 17 12:06:34 2019 +0100 Merge branch 'uli42-pr/window_fixes' into 3.6.x Attributes GH PR #761: https://github.com/ArcticaProject/nx-libs/pull/761 nx-X11/programs/Xserver/hw/nxagent/Display.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/Extensions.c | 81 ++++++-------- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 141 ++++++++++++------------ nx-X11/programs/Xserver/hw/nxagent/Window.c | 36 +++--- 4 files changed, 129 insertions(+), 133 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 5c99eb7d5d3121c4fff11e73b923a4c7a88263fc Author: Vadim <vtroshchinskiy@qindel.com> Date: Fri Jan 18 12:28:51 2019 +0100 Make getUnixPath() return the right value when called without an argument. This fixes the verification in validateSpec() --- nxcomp/src/ChannelEndPoint.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nxcomp/src/ChannelEndPoint.cpp b/nxcomp/src/ChannelEndPoint.cpp index 7768df1..635dd1a 100644 --- a/nxcomp/src/ChannelEndPoint.cpp +++ b/nxcomp/src/ChannelEndPoint.cpp @@ -209,8 +209,6 @@ ChannelEndPoint::getUnixPath(char **unixPath) const { if (unixPath) *unixPath = NULL; - else - return false; long p; char *path = NULL; @@ -230,7 +228,9 @@ ChannelEndPoint::getUnixPath(char **unixPath) const { return false; } - *unixPath = strdup(path); + // Only return value wanted + if ( unixPath ) + *unixPath = strdup(path); return true; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 26e483d495cb06b9af5d04b44ae7176885433072 Merge: ca8236e 889de46 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Jan 25 16:37:29 2019 +0100 Merge branch 'theqvd-unix_socket_forwarding' into 3.6.x Attributes GH PR #764: https://github.com/ArcticaProject/nx-libs/pull/764 nxcomp/src/ChannelEndPoint.cpp | 6 +++--- nxcomp/src/Loop.cpp | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository nx-libs. commit 427ac344c53acf4cb361f24e1df771137f83ea6b Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Jan 31 14:10:36 2019 +0100 release 3.5.99.18 --- ChangeLog | 222 ++++++++++++++++++++++- VERSION | 2 +- debian/changelog | 7 + nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 2 +- nx-libs.spec | 2 +- nxproxy/man/nxproxy.1 | 2 +- 6 files changed, 231 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index aca1810..c363e9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,224 @@ -2018-11-20 16:03:22 +0100 Mike Gabriel (b0c5dcd51) +2019-01-31 14:10:36 +0100 Mike Gabriel (b5d411337) - * release 3.5.99.17 (HEAD -> 3.6.x, tag: 3.5.99.17) + * release 3.5.99.18 (HEAD -> 3.6.x, tag: 3.5.99.18) + +2019-01-25 16:37:29 +0100 Mike Gabriel (26e483d49) + + * Merge branch 'theqvd-unix_socket_forwarding' into 3.6.x + +2019-01-18 13:15:18 +0100 Vadim (889de46f7) + + * Fix parsing ports set to unix sockets + +2019-01-18 12:28:51 +0100 Vadim (5c99eb7d5) + + * Make getUnixPath() return the right value when called without an + argument. + +2019-01-17 12:06:34 +0100 Mike Gabriel (ca8236e7f) + + * Merge branch 'uli42-pr/window_fixes' into 3.6.x + +2019-01-12 01:01:55 +0100 Ulrich Sibiller (d16a5fbb1) + + * Screen.c: fix handling of fullscreen startup + +2019-01-13 23:47:53 +0100 Ulrich Sibiller (3c92b5db9) + + * Screen.c: fix size calculation in rootless mode + +2019-01-13 23:46:49 +0100 Ulrich Sibiller (43d3b655d) + + * Screen.c: improve readability of size calculations + +2019-01-11 23:25:39 +0100 Ulrich Sibiller (8dea30751) + + * Screen.c: move identical line out of both parts of an if clause + +2019-01-11 22:39:34 +0100 Ulrich Sibiller (c4c39bc94) + + * Extensions.c: Cleanup nxagentRandRInitSizes() + +2019-01-11 21:58:50 +0100 Ulrich Sibiller (6c0098a3e) + + * Extensions.c: fix first resolution being ignored + +2019-01-11 00:59:55 +0100 Ulrich Sibiller (d175fd4c6) + + * Set default screen size to the whole screen in rootless mode + +2019-01-10 22:35:02 +0100 Ulrich Sibiller (4a7faa8bd) + + * Window.c: move WM_STATE handling to separate function + +2018-12-22 22:02:15 +0100 Mike Gabriel (4214a719a) + + * Merge branch 'uli42-pr/fix_xlibcrash' into 3.6.x + +2018-10-31 23:44:15 +0100 Ulrich Sibiller (633f4617b) + + * XlibInt: check for XlibError before accessing other dpy fields + +2018-10-31 23:43:58 +0100 Ulrich Sibiller (a61b1a72d) + + * XlibInt.c: fix wrong debug message + +2018-12-19 12:39:59 +0100 Mike Gabriel (d98255968) + + * nxagent.1 man page: Grammar fix. + +2018-12-19 12:38:59 +0100 Mike Gabriel (669af5300) + + * Merge branch 'uli42-pr/x2go_bypass' into 3.6.x + +2017-07-22 22:21:05 +0200 Ulrich Sibiller (522106e20) + + * nxagent: bypass X2go's keyboard configuration hack + +2018-12-19 12:36:28 +0100 Mike Gabriel (a8c65ab62) + + * Merge branch 'uli42-pr/improve_keyboard2' into 3.6.x + +2018-12-03 23:35:56 +0100 Ulrich Sibiller (a70ec920d) + + * Keyboard.c: add static keyword where appropriate + +2018-12-03 22:03:58 +0100 Ulrich Sibiller (d5c9733b2) + + * nxagent: simplify keycode conversion setup + +2018-12-03 21:54:15 +0100 Ulrich Sibiller (1d6c241d3) + + * nxagent: store remote keyboard in global variables + +2018-12-02 17:08:31 +0100 Ulrich Sibiller (161515d24) + + * nxagent: add additional keyboard config option rmlvo + +2017-07-22 19:03:19 +0200 Ulrich Sibiller (1de6ca599) + + * nxagent: add keyboard=clone configuration option + +2018-12-19 12:31:05 +0100 Mike Gabriel (ab3e14850) + + * Merge branch 'uli42-pr/keyboard_cleanup' into 3.6.x + +2018-12-03 21:34:40 +0100 Ulrich Sibiller (26b033b84) + + * Reconnect.c: restore old keyboard value if no new one is given + +2018-12-03 21:52:33 +0100 Ulrich Sibiller (4dfe84eaf) + + * Keyboard.c: remove non-fitting comment + +2018-12-01 22:37:40 +0100 Ulrich Sibiller (21a0ce367) + + * nxagent: fix references to default rules in manpage + +2017-07-23 02:03:58 +0200 Ulrich Sibiller (3b62184a1) + + * Keyboard.c: improve creation of keyboard config file + +2018-12-01 18:17:40 +0100 Ulrich Sibiller (fb31220f2) + + * Keyboard.c: reformat nxagentKeycodeConversionSetup + +2018-12-02 00:09:00 +0100 Ulrich Sibiller (3c4a8da12) + + * Keyboard.c: use 'variant' all over the place + +2018-12-01 23:59:36 +0100 Ulrich Sibiller (d0d6c1bdb) + + * Keyboard.c: rename variables to better reflect their meaning + +2017-07-22 18:56:13 +0200 Ulrich Sibiller (269a352ff) + + * Keyboard.c: refactor keycode conversion + +2017-07-22 17:34:22 +0200 Ulrich Sibiller (d610e9c3c) + + * Keyboard.c: move keyboard file creation to extra function + +2018-12-19 12:25:53 +0100 Mike Gabriel (70cb1926c) + + * Merge branch 'uli42-pr/xnest_manpages' into 3.6.x + +2018-12-17 22:36:44 +0100 Ulrich Sibiller (c8947d8aa) + + * manpage: reformat some lines + +2018-12-17 22:36:34 +0100 Ulrich Sibiller (b405b962f) + + * manpage: add -name + +2018-12-17 22:36:07 +0100 Ulrich Sibiller (b8138d97d) + + * manpage: add/extend -dpi/-autodpi + +2018-12-17 22:35:35 +0100 Ulrich Sibiller (338e20510) + + * manpage: add -geometry + +2018-12-17 22:35:18 +0100 Ulrich Sibiller (51664049f) + + * manpage: add -depth + +2018-12-17 22:34:43 +0100 Ulrich Sibiller (3b508010d) + + * manpage: add -class + +2018-12-17 22:34:15 +0100 Ulrich Sibiller (0b454d2d3) + + * manpage: add -full + +2018-12-17 22:33:52 +0100 Ulrich Sibiller (79e4c20a0) + + * manpage: add -sync + +2018-12-19 12:20:10 +0100 Mike Gabriel (22fea29cf) + + * Merge branch 'uli42-pr/fb_fastpath' into 3.6.x + +2018-12-18 21:39:04 +0100 Ulrich Sibiller (034228d75) + + * fb: fix fast-path blt detection + +2018-12-18 21:32:37 +0100 Ulrich Sibiller (020ef045e) + + * fb: Fix memcpy abuse + +2018-12-19 12:18:27 +0100 Mike Gabriel (8d6a4a9b7) + + * Merge branch 'uli42-pr/fix_uninit' into 3.6.x + +2018-12-18 00:17:51 +0100 Ulrich Sibiller (44c59e12d) + + * Fix uninitialized bytes + +2018-12-18 00:05:50 +0100 Ulrich Sibiller (5b0bf752a) + + * xkb: Initialize pad bytes sent in replies of geometry requests. + +2018-12-17 23:58:16 +0100 Ulrich Sibiller (a4fad8f58) + + * Fix crash due to uninitialized VModMap fields. + +2018-11-22 13:16:20 +0100 Mike Gabriel (989398afe) + + * debian/*: Adopt packaging changes from official Debian package. + +2018-11-22 11:46:01 +0100 Mike Gabriel (6d7784eb0) + + * debian/nxagent.{post,pre}*: Fix versions in dpkg-maintscript-helper + calls. + +2018-11-22 11:45:29 +0100 Mike Gabriel (afa56ea64) + + * debian/changelog: post-release fix (UNRELEASED -> unstable). + +2018-11-20 16:03:22 +0100 Mike Gabriel (3a19d8d17) + + * release 3.5.99.17 (tag: 3.5.99.17) 2018-11-14 20:21:46 +0100 Ulrich Sibiller (623a74ae1) diff --git a/VERSION b/VERSION index 77a8ced..3919e36 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.5.99.17 +3.5.99.18 diff --git a/debian/changelog b/debian/changelog index f163297..ea77705 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nx-libs (2:3.5.99.18-0) unstable; urgency=medium + + * Upstream-provided Debian package for nx-libs. + See upstream ChangeLog for recent changes. + + -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Thu, 31 Jan 2019 14:09:11 +0100 + nx-libs (2:3.5.99.17-0) unstable; urgency=medium * Upstream-provided Debian package for nx-libs. diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index c438c47..ac06806 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -23,7 +23,7 @@ .\" other dealings in this Software without prior written authorization .\" from The Open Group. .ds q \N'34' -.TH nxagent 1 "Nov 2018" "Version 3.5.99.17" "NX Agent (Xserver)" +.TH nxagent 1 "Jan 2019" "Version 3.5.99.18" "NX Agent (Xserver)" .SH NAME nxagent \- nested Xserver optimized for remote computing .SH SYNOPSIS diff --git a/nx-libs.spec b/nx-libs.spec index a5170f3..585ddd1 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -10,7 +10,7 @@ %endif Name: nx-libs -Version: 3.5.99.17 +Version: 3.5.99.18 Release: 0.0build1%{?dist} Summary: NX X11 protocol compression libraries diff --git a/nxproxy/man/nxproxy.1 b/nxproxy/man/nxproxy.1 index ef40fb3..cebfd39 100644 --- a/nxproxy/man/nxproxy.1 +++ b/nxproxy/man/nxproxy.1 @@ -5,7 +5,7 @@ \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac -.TH nxproxy 1 "Nov 2018" "Version 3.5.99.17" "NX Proxy" +.TH nxproxy 1 "Jan 2019" "Version 3.5.99.18" "NX Proxy" .SH NAME nxproxy \- NX Proxy Tool .SH SYNOPSIS -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git