This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository nx-libs. from 1e16939 [PATCH] os: XDMCP options like -query etc. should imply -listen tcp new 489c173 Use min() [defined in include/misc.h] instead of MIN() [not defined in any Xorg header]. new 643e13b fix window title encoding (use utf8) for nxagent new 9a7c0b0 nxagent: Used 'Xutf8SetVMPropertis' instead of 'XSetStandardProperties' + 'Xutf8SetWMProperties' new aaae5d5 Merge branch 'Etersoft-fix-nxagent-window-title-encoding' into 3.6.x new 0154ef4 add list with versions of the xserver modules new c0bef5e Merge branch 'uli42-pr/track_versions' into 3.6.x new 129d1cc refactor nxagentGet(Default)EventMask new 9f4eb6a Merge branch 'uli42-pr/refactor_defaulteventmask' into 3.6.x new f8e76fd Events.c: mitigate compiler warning new 2fe89c5 Events.c: fix compiler warnings new 553b96f Events.c: fix wrong printf format specifiers new 0db1770 Events.c: drop variable that caused compilation warning new f9e4a54 Merge branch 'uli42-pr/fix_events_debug_warnings' into 3.6.x new f9c2d56 Fix broken 9a7c0b081fad98bfcfcceff9557781f4b39ec572 new b517b66 Merge branch 'uli42-pr/fix_wm_props' into 3.6.x new 3bd41aa Replace MIN/MAX macros by min/max from misc.h new fad80bc Merge branch 'uli42-pr/drop_double_min_max' into 3.6.x new f8e20d0 Args.c: rename nxagentParseOptions to nxagentParseSingleOption new 30a9627 Args.c: allow options to contain URL encoded characters new 930bd28 Merge branch 'uli42-pr/decode_options' into 3.6.x new c7eadb8 nxmissing.xpm: Add XPM marker so that image viewers recognize the image file format. new 4d6bae0 Application icon: Drop NoMachine logo as nxagent icon, switch to X11 icon for now. new 3738364 Call checkX2goAgent much earlier (in ddxProcessArgument) and adapt NXAGENTWINDOWNAMELENGTH to its result. new 25c7f02 Use basename() to derive nxagentProgName cleanly. new c2b4e42 X2Go XPM icon: white background, not transparent. new 31ac5a1 X2Go Agent XPM: Rename from x2go.xpm to x2goagent.xpm (like the symlink name we expect). new d3bbca7 Merge branch 'sunweaver-pr/drop-nomachine-icon' into 3.6.x new da9d1a5 nxagent: Fix an excessive request size limitation that broke big-requests. new c478ba2 Merge branch 'uli42-pr/fix_bigrequests' into 3.6.x new 6b2033b nxagent: use nxagentWMIsRunning as Bool all over the place new 1a8c453 nxagent: use nxagentWMPassed as Bool all over the place new f91f02d Pixmap.c: use some Bools as Bools not integers new 67432ac Render.c: improve Bool usage new 7b8aef8 nxagentInitAndCheckVisuals: adapt bool usage to match the previous function new 1584395 Window.c: improve Bool usage new 7f7895e Window.c: remove useless code new 450760b Events.c: improve Bool usage new 7392dd6 Merge branch 'uli42-pr/cleanup_wmisrunning' into 3.6.x new 97f768a X11.tmpl: whitespace fix new 71abe0b enable CLIENTIDS functions in xserver new 3dc4595 Merge branch 'uli42-pr/enableclientids' into 3.6.x new e1938c1 libNX_X11: upgrade to X.org upstream version 1.6.6 new 701e702 libNX_X11: upgrade to X.org upstream version 1.6.7 new 2eb4a65 Merge branch 'uli42-pr/libX11_1.6.6' into 3.6.x new 8baec5d Clipboard: print requested target in debugging mode new 6cdddad Clipboard.c: add function for debugging output new 35f6b32 NXproperty.c:add debug output new fab6911 Clipboard.c: introduce helper macros for easier debugging new 85a28a6 Clipboard.c: add macro for safe XFree calls with ptr clearance new e90306e Clipboard.c: some scope optimizations new 888de83 Clipboard.c: print X errors new 9a5f519 Clipboard.c: Code optimization (missing else) new 719488d Clipboard.c: add FIXME new 018b561 Clipboard.c: whitespace fixes new 1af67b4 Clipboard.c: GetWindowProperty() does not return BadMatch new 1c4c9f6 Clipboard.c: more debugging info for nxagentGetClipboardWindow() new 5d26add Clipboard.c: new debug function to reduce duplicate code new f8bfdc8 Clipboard.c: improve nxagentClearSelection() debug code new 934d9ea Clipboard.c: Use constant instead of hardcoded value new 2517d8c Clipboard.c: more DEBUG output new 6ea7558 Clipboard.c: fix fprintf type warnings new 60bce14 Clipboard.c: use __func__ everywhere new 2804320 Merge branch 'uli42-pr/clipboard_debug' into 3.6.x new e8c6a74 Window.c: convert old-style function definitions to ANSI C89 style new 2769cbb Window.c: indent FIXMEs new 7a0b401 Window.c: reformat/add braces for readability new 1fb32cf Window.c: scope improvements new ea27530 Window.c: whitespace cleanup new 9e6e431 Window.c: some code simplifications new df531c1 Window.c: silence compiler warnings new c8383b8 Window.c: indent ifdefs for better readability new 1eb5603 Window.c: save some lines by declaring loop variables in the loop new 728a3d1 Window.c: add FIXME new e2421bb Window.c: use C99 designated initializers at some places new 70b4946 Merge branch 'uli42-pr/small_improvements' into 3.6.x new 266c3d6 Lift Xi to 1.3.0.0 (identical to 1.2.0) new 122db3f Merge branch 'uli42-pr/Xi-1.2.0' into 3.6.x new 2db5191 Check nxagentXkbInfo.EventBase before use new 9808c66 Lift xkb to XORG-1.2.0 state new bebdf09 Keyboard.c: Remove (now) unused defines new 0fc5368 Keyboard.c: remove unnecessary includes new d54f1fb Keyboard.c: remove unused defines new 11a1f31 no more own XkbBaseDirectory handling new eb07ed5 Keyboard.c: do not define own RLMVO defaults new 4ed8145 XKB: provide XKB defines via Imakefile new 3fbef7d Lift xkb to XORG-1.3.0.0 state new b891e5f Keyboard.c: always ask for remote XKB new 6186383 Keyboard.c: simplify RLMVO string handling new 1b05251 Keyboard.c: simplify over-specific if new d8bbbcf Keyboard.c: guard XkbFreeKeyboard calls new 05e03b9 Keyboard.c: greatly simplify the code in nxagentKeyboardProc new b8ae794 Keyboard.c: fix keyboard=query logic new 59524cd Keyboard.c: simplify even more: free stuff at one place new 018b2d0 XkbSendNames: fix use of uninitialised bytes valgrind error. new 6947595 ProcXkbGetKbdByName: fix use of uninitialised bytes valgrind error. new 6625e78 XKB: Fix garbage initialization new 7487d7f XKB: Fix logic error new 3c1b1ef XKB: Remove unused DDX functions new 1ca0aee Event.c: improve DEBUG output new 824b629 XKB: Fix size_syms calculation bug new f23189e Make: Automatically determine xkb dir new 90b83a7 xkb: Fix memory leak if opening file fails new b01e29e xkb: Don't check for NULL before calling free new b09a72b Convert existing Xprintf style calls to asprintf style new 3965f24 adapt code-versions.txt new fccef5f Merge branch 'uli42-pr/xkb_1.3.0.0' into 3.6.x new 49607e9 Lift Xext to xorg 1.4.2 new d2dae84 Merge branch 'uli42-pr/Xext-1.4.2' into 3.6.x The 108 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: Makefile | 17 +- debian/control | 1 + doc/nxagent/x11.svg | 27 + nx-X11/config/cf/Imake.tmpl | 8 + nx-X11/config/cf/X11.tmpl | 2 +- nx-X11/config/cf/xorg.cf | 2 +- nx-X11/lib/include/X11/Xlibint.h | 125 +- nx-X11/lib/modules/im/ximcp/imCallbk.c | 6 +- nx-X11/lib/modules/im/ximcp/imDefIc.c | 82 +- nx-X11/lib/modules/im/ximcp/imInsClbk.c | 2 +- nx-X11/lib/modules/im/ximcp/imLcIm.c | 8 +- nx-X11/lib/modules/im/ximcp/imLcLkup.c | 6 +- nx-X11/lib/modules/om/generic/omGeneric.c | 32 +- nx-X11/lib/src/DisName.c | 2 +- nx-X11/lib/src/FSWrap.c | 2 +- nx-X11/lib/src/FontNames.c | 16 +- nx-X11/lib/src/GetFPath.c | 11 +- nx-X11/lib/src/GetImage.c | 16 +- nx-X11/lib/src/LiHosts.c | 19 +- nx-X11/lib/src/ListExt.c | 19 +- nx-X11/lib/src/SetHints.c | 4 +- nx-X11/lib/src/StColor.c | 1 + nx-X11/lib/src/StColors.c | 1 + nx-X11/lib/src/StrKeysym.c | 10 +- nx-X11/lib/src/XlibInt.c | 86 +- nx-X11/lib/src/xcms/LRGB.c | 3 + nx-X11/lib/src/xcms/cmsColNm.c | 2 +- nx-X11/lib/src/xcms/cmsLkCol.c | 3 +- nx-X11/lib/src/xcms/cmsProp.c | 1 + nx-X11/lib/src/xkb/XKBAlloc.c | 8 +- nx-X11/lib/src/xlibi18n/lcCT.c | 10 +- nx-X11/lib/src/xlibi18n/lcDB.c | 2 +- nx-X11/lib/src/xlibi18n/lcGeneric.c | 1 + nx-X11/lib/src/xlibi18n/lcPublic.c | 1 + nx-X11/programs/Xserver/Xext/dpms.c | 7 +- nx-X11/programs/Xserver/Xext/panoramiX.c | 46 +- nx-X11/programs/Xserver/Xext/panoramiX.h | 13 - nx-X11/programs/Xserver/Xext/panoramiXSwap.c | 4 + nx-X11/programs/Xserver/Xext/panoramiXh.h | 5 +- nx-X11/programs/Xserver/Xext/panoramiXprocs.c | 8 +- nx-X11/programs/Xserver/Xext/saver.c | 15 +- nx-X11/programs/Xserver/Xext/shm.c | 20 +- nx-X11/programs/Xserver/Xext/shmint.h | 2 - nx-X11/programs/Xserver/Xext/sleepuntil.c | 1 - nx-X11/programs/Xserver/Xext/sync.c | 24 +- nx-X11/programs/Xserver/Xext/xf86bigfont.c | 1 + nx-X11/programs/Xserver/Xext/xres.c | 64 +- nx-X11/programs/Xserver/Xext/xtest.c | 6 +- nx-X11/programs/Xserver/Xext/xvdisp.c | 24 +- nx-X11/programs/Xserver/Xext/xvmain.c | 4 +- nx-X11/programs/Xserver/Xext/xvmc.c | 2 +- nx-X11/programs/Xserver/Xi/allowev.c | 1 - nx-X11/programs/Xserver/Xi/chgdctl.c | 1 - nx-X11/programs/Xserver/Xi/chgfctl.c | 1 - nx-X11/programs/Xserver/Xi/chgkbd.c | 1 - nx-X11/programs/Xserver/Xi/chgkmap.c | 1 - nx-X11/programs/Xserver/Xi/chgprop.c | 1 - nx-X11/programs/Xserver/Xi/chgptr.c | 1 - nx-X11/programs/Xserver/Xi/closedev.c | 1 - nx-X11/programs/Xserver/Xi/devbell.c | 1 - nx-X11/programs/Xserver/Xi/exevents.c | 18 + nx-X11/programs/Xserver/Xi/extinit.c | 10 +- nx-X11/programs/Xserver/Xi/getbmap.c | 1 - nx-X11/programs/Xserver/Xi/getdctl.c | 1 - nx-X11/programs/Xserver/Xi/getfctl.c | 1 - nx-X11/programs/Xserver/Xi/getfocus.c | 1 - nx-X11/programs/Xserver/Xi/getkmap.c | 1 - nx-X11/programs/Xserver/Xi/getmmap.c | 1 - nx-X11/programs/Xserver/Xi/getprop.c | 1 - nx-X11/programs/Xserver/Xi/getselev.c | 1 - nx-X11/programs/Xserver/Xi/getvers.c | 1 - nx-X11/programs/Xserver/Xi/grabdev.c | 1 - nx-X11/programs/Xserver/Xi/grabdevb.c | 1 - nx-X11/programs/Xserver/Xi/grabdevk.c | 1 - nx-X11/programs/Xserver/Xi/gtmotion.c | 4 +- nx-X11/programs/Xserver/Xi/listdev.c | 1 - nx-X11/programs/Xserver/Xi/opendev.c | 3 +- nx-X11/programs/Xserver/Xi/selectev.c | 1 - nx-X11/programs/Xserver/Xi/sendexev.c | 1 - nx-X11/programs/Xserver/Xi/setbmap.c | 1 - nx-X11/programs/Xserver/Xi/setdval.c | 1 - nx-X11/programs/Xserver/Xi/setfocus.c | 1 - nx-X11/programs/Xserver/Xi/setmmap.c | 1 - nx-X11/programs/Xserver/Xi/setmode.c | 1 - nx-X11/programs/Xserver/Xi/stubs.c | 1 - nx-X11/programs/Xserver/Xi/ungrdev.c | 1 - nx-X11/programs/Xserver/Xi/ungrdevb.c | 1 - nx-X11/programs/Xserver/Xi/ungrdevk.c | 1 - nx-X11/programs/Xserver/code-versions.txt | 22 + nx-X11/programs/Xserver/hw/nxagent/Args.c | 85 +- nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 6 +- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 569 +++++++--- nx-X11/programs/Xserver/hw/nxagent/Display.c | 16 +- nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 5 +- nx-X11/programs/Xserver/hw/nxagent/Events.c | 95 +- nx-X11/programs/Xserver/hw/nxagent/Events.h | 4 +- nx-X11/programs/Xserver/hw/nxagent/Font.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Icons.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Init.c | 9 +- nx-X11/programs/Xserver/hw/nxagent/Init.h | 1 + nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 263 +---- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXproperty.c | 25 +- nx-X11/programs/Xserver/hw/nxagent/NXshm.c | 165 ++- nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c | 195 ++-- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 16 +- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Render.c | 12 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 76 +- nx-X11/programs/Xserver/hw/nxagent/Utils.h | 10 +- nx-X11/programs/Xserver/hw/nxagent/Window.c | 784 ++++++------- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 5 + nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm | 422 ++++++- nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm | 1 + nx-X11/programs/Xserver/hw/nxagent/x11.svg | 27 + nx-X11/programs/Xserver/hw/nxagent/x2go.xpm | 163 --- nx-X11/programs/Xserver/hw/nxagent/x2goagent.xpm | 165 +++ nx-X11/programs/Xserver/include/inputstr.h | 5 + nx-X11/programs/Xserver/include/os.h | 6 + nx-X11/programs/Xserver/include/xkbfile.h | 32 +- nx-X11/programs/Xserver/include/xkbsrv.h | 3 +- nx-X11/programs/Xserver/os/WaitFor.c | 6 +- nx-X11/programs/Xserver/os/io.c | 4 +- nx-X11/programs/Xserver/xkb/Imakefile | 18 +- nx-X11/programs/Xserver/xkb/XKBMAlloc.c | 2 +- nx-X11/programs/Xserver/xkb/XKBMisc.c | 7 +- nx-X11/programs/Xserver/xkb/ddxBeep.c | 1 + nx-X11/programs/Xserver/xkb/ddxInit.c | 45 - nx-X11/programs/Xserver/xkb/ddxKeyClick.c | 49 - nx-X11/programs/Xserver/xkb/ddxKillSrv.c | 5 - nx-X11/programs/Xserver/xkb/ddxList.c | 55 +- nx-X11/programs/Xserver/xkb/ddxLoad.c | 350 +----- nx-X11/programs/Xserver/xkb/ddxPrivate.c | 5 - nx-X11/programs/Xserver/xkb/ddxVT.c | 5 - nx-X11/programs/Xserver/xkb/maprules.c | 16 +- nx-X11/programs/Xserver/xkb/xkb.c | 298 ++--- nx-X11/programs/Xserver/xkb/xkbAccessX.c | 6 +- nx-X11/programs/Xserver/xkb/xkbActions.c | 4 - nx-X11/programs/Xserver/xkb/xkbEvents.c | 4 + nx-X11/programs/Xserver/xkb/xkbInit.c | 11 +- nx-X11/programs/Xserver/xkb/xkbLEDs.c | 24 +- nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c | 4 - nx-X11/programs/Xserver/xkb/xkbUtils.c | 6 +- nx-X11/programs/Xserver/xkb/xkbfmisc.c | 456 +++++++- nx-X11/programs/Xserver/xkb/xkbout.c | 1047 +++++++++++++++++ nx-X11/programs/Xserver/xkb/xkbtext.c | 1325 ++++++++++++++++++++++ nx-X11/programs/Xserver/xkb/xkmread.c | 94 +- nx-libs.spec | 2 + 149 files changed, 5341 insertions(+), 2555 deletions(-) create mode 100644 doc/nxagent/x11.svg create mode 100644 nx-X11/programs/Xserver/code-versions.txt create mode 100644 nx-X11/programs/Xserver/hw/nxagent/x11.svg delete mode 100644 nx-X11/programs/Xserver/hw/nxagent/x2go.xpm create mode 100644 nx-X11/programs/Xserver/hw/nxagent/x2goagent.xpm delete mode 100644 nx-X11/programs/Xserver/xkb/ddxInit.c delete mode 100644 nx-X11/programs/Xserver/xkb/ddxKeyClick.c create mode 100644 nx-X11/programs/Xserver/xkb/xkbout.c create mode 100644 nx-X11/programs/Xserver/xkb/xkbtext.c -- 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 9a7c0b081fad98bfcfcceff9557781f4b39ec572 Author: Pavel Vaynerman <pv@etersoft.ru> Date: Thu Jul 26 02:51:00 2018 +0300 nxagent: Used 'Xutf8SetVMPropertis' instead of 'XSetStandardProperties' + 'Xutf8SetWMProperties' --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 26d46b5..b7a8f54 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -867,9 +867,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int defaultVisualIndex = 0; - XTextProperty xtpWmName; - char* wmName = nxagentWindowName; - #ifdef TEST fprintf(stderr, "nxagentOpenScreen: Called for screen index [%d].\n", pScreen->myNum); @@ -1905,16 +1902,12 @@ N/A if (nxagentUserGeometry.flag & WidthValue || nxagentUserGeometry.flag & HeightValue) sizeHints->flags |= USSize; } - /* FIXME: deprecated, replaced by XSetWmProperties() */ - XSetStandardProperties(nxagentDisplay, - nxagentDefaultWindows[pScreen->myNum], - nxagentWindowName, - nxagentWindowName, - nxagentIconPixmap, - argv, argc, sizeHints); - - if (Xutf8TextListToTextProperty(nxagentDisplay, &wmName, 1, XCompoundTextStyle, &xtpWmName) >= Success) - XSetWMName(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], &xtpWmName); + + Xutf8SetWMProperties(nxagentDisplay, + nxagentDefaultWindows[pScreen->myNum], + nxagentWindowName, + nxagentWindowName, + argv , argc , &sizeHints, &wmHints, NULL); if (sizeHints) XFree(sizeHints); -- 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 489c17313090b58b5a4f898a47f23d50372923f2 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 21 18:50:16 2018 +0200 Use min() [defined in include/misc.h] instead of MIN() [not defined in any Xorg header]. Backport from X.org: commit 724dbc2f8bbe2f21bf16f20ca7b8bb555516626c Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue May 2 01:30:37 2006 +0000 Use min() [defined in include/misc.h] instead of MIN() [not defined in any Xorg header]. Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> --- nx-X11/programs/Xserver/os/WaitFor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/os/WaitFor.c b/nx-X11/programs/Xserver/os/WaitFor.c index 9133adf..55fb997 100644 --- a/nx-X11/programs/Xserver/os/WaitFor.c +++ b/nx-X11/programs/Xserver/os/WaitFor.c @@ -769,7 +769,7 @@ ScreenSaverTimeoutExpire(OsTimerPtr timer,CARD32 now,void * arg) if (timeout < ScreenSaverTime) { return nextTimeout > 0 ? - MIN(ScreenSaverTime - timeout, nextTimeout) : + min(ScreenSaverTime - timeout, nextTimeout) : ScreenSaverTime - timeout; } @@ -779,7 +779,7 @@ ScreenSaverTimeoutExpire(OsTimerPtr timer,CARD32 now,void * arg) if (ScreenSaverInterval > 0) { nextTimeout = nextTimeout > 0 ? - MIN(ScreenSaverInterval, nextTimeout) : + min(ScreenSaverInterval, nextTimeout) : ScreenSaverInterval; } @@ -823,7 +823,7 @@ SetScreenSaverTimer(void) if (ScreenSaverTime > 0) { timeout = timeout > 0 ? - MIN(ScreenSaverTime, timeout) : + min(ScreenSaverTime, timeout) : ScreenSaverTime; } -- 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 643e13bf3de6704f634d60342b738e0002f057b9 Author: Pavel Vaynerman <pv@etersoft.ru> Date: Sat Jun 9 14:11:34 2018 +0300 fix window title encoding (use utf8) for nxagent --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 6eae711..26d46b5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -441,8 +441,8 @@ Window nxagentCreateIconWindow(void) } } - XSetWMProperties(nxagentDisplay, w, - &windowName, &windowName, + Xutf8SetWMProperties(nxagentDisplay, w, + window_name, window_name, NULL , 0 , sizeHints, wmHints, NULL); if (sizeHints) @@ -867,6 +867,9 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int defaultVisualIndex = 0; + XTextProperty xtpWmName; + char* wmName = nxagentWindowName; + #ifdef TEST fprintf(stderr, "nxagentOpenScreen: Called for screen index [%d].\n", pScreen->myNum); @@ -1910,6 +1913,9 @@ N/A nxagentIconPixmap, argv, argc, sizeHints); + if (Xutf8TextListToTextProperty(nxagentDisplay, &wmName, 1, XCompoundTextStyle, &xtpWmName) >= Success) + XSetWMName(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], &xtpWmName); + if (sizeHints) XFree(sizeHints); -- 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 aaae5d574801b5952a4f5024366bddab8d0baa02 Merge: 489c173 9a7c0b0 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Aug 22 15:21:49 2018 +0200 Merge branch 'Etersoft-fix-nxagent-window-title-encoding' into 3.6.x Attributes GH PR #705: https://github.com/ArcticaProject/nx-libs/pull/705 nx-X11/programs/Xserver/hw/nxagent/Screen.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 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 0154ef4b9680699b250e2178a531e3ed5b1d0b27 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 25 23:39:06 2018 +0200 add list with versions of the xserver modules --- nx-X11/programs/Xserver/code-versions.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nx-X11/programs/Xserver/code-versions.txt b/nx-X11/programs/Xserver/code-versions.txt new file mode 100644 index 0000000..1337a1d --- /dev/null +++ b/nx-X11/programs/Xserver/code-versions.txt @@ -0,0 +1,22 @@ +An overview of where we stand with upgrading to latest xorg-xserver +code base. This ignores any security fixes that have been +backported, it rather describes what functionality level the modules +are at (roughly): + +module xorg version +composite 6.9/7.0 +damageext 6.9/7.0 +dbe 1.4.2 +dix 1.3.0.0 +fb 7.1/1.1 +GL 6.9/7.0 +mi 7.1/1.1 +miext 7.1/1.1 +os 7.1/1.1 +randr 1.18.0 +record 1.4.2 +render 6.9/7.0 +Xext 7.1/1.1 +xfixes 1.4.2 +Xi 7.1/1.1 +xkb 7.1/1.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 c0bef5e3962e7f2f056ff7c4b0798099ac867293 Merge: aaae5d5 0154ef4 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Aug 22 15:29:49 2018 +0200 Merge branch 'uli42-pr/track_versions' into 3.6.x Attributes GH PR #718: https://github.com/ArcticaProject/nx-libs/pull/718 nx-X11/programs/Xserver/code-versions.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -- 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 f8e76fd69157b6f466b2efc7d41b031d530e873c Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Mar 8 22:25:15 2018 +0100 Events.c: mitigate compiler warning "ISO C forbids assignment between function pointer and 'void *' [-pedantic]" --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index fad9f28..23a9182 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -821,7 +821,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) #ifdef TEST fprintf(stderr, "nxagentDispatchEvents: Going to handle new events with " - "predicate [%p].\n", predicate); + "predicate [%p].\n", *(void **)&predicate); #endif if (nxagentRemoteExposeRegion == NULL) -- 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 9f4eb6a0bbfc2035bb096d5cbcdf27afb50363d7 Merge: c0bef5e 129d1cc Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Aug 22 15:35:49 2018 +0200 Merge branch 'uli42-pr/refactor_defaulteventmask' into 3.6.x Attributes GH PR #692: https://github.com/ArcticaProject/nx-libs/pull/692 nx-X11/programs/Xserver/hw/nxagent/Events.c | 24 ++++++++---------------- nx-X11/programs/Xserver/hw/nxagent/Events.h | 4 ++-- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 17 ++++++----------- nx-X11/programs/Xserver/hw/nxagent/Window.c | 15 +++------------ 4 files changed, 19 insertions(+), 41 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 129d1cc910227717ec113a9008693afb741047ab Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 10 00:29:21 2018 +0200 refactor nxagentGet(Default)EventMask Fixes ArcticaProject/nx-libs#691. --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 24 ++++++++---------------- nx-X11/programs/Xserver/hw/nxagent/Events.h | 4 ++-- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 17 ++++++----------- nx-X11/programs/Xserver/hw/nxagent/Window.c | 15 +++------------ 4 files changed, 19 insertions(+), 41 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 0eca8e4..fad9f28 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -734,9 +734,9 @@ void nxagentInitDefaultEventMask(void) defaultEventMask = mask; } -void nxagentGetDefaultEventMask(Mask *mask_return) +Mask nxagentGetDefaultEventMask(void) { - *mask_return = defaultEventMask; + return defaultEventMask; } void nxagentSetDefaultEventMask(Mask mask) @@ -744,7 +744,7 @@ void nxagentSetDefaultEventMask(Mask mask) defaultEventMask = mask; } -void nxagentGetEventMask(WindowPtr pWin, Mask *mask_return) +Mask nxagentGetEventMask(WindowPtr pWin) { Mask mask = NoEventMask; @@ -774,7 +774,7 @@ void nxagentGetEventMask(WindowPtr pWin, Mask *mask_return) mask = ExposureMask | VisibilityChangeMask; } - *mask_return = mask; + return mask; } static int nxagentChangeMapPrivate(WindowPtr pWin, void * ptr) @@ -3729,9 +3729,7 @@ int nxagentHandleReparentNotify(XEvent* X) void nxagentEnableKeyboardEvents(void) { int i; - Mask mask; - - nxagentGetDefaultEventMask(&mask); + Mask mask = nxagentGetDefaultEventMask(); mask |= NXAGENT_KEYBOARD_EVENT_MASK; @@ -3750,9 +3748,7 @@ void nxagentEnableKeyboardEvents(void) void nxagentDisableKeyboardEvents(void) { int i; - Mask mask; - - nxagentGetDefaultEventMask(&mask); + Mask mask = nxagentGetDefaultEventMask(); mask &= ~NXAGENT_KEYBOARD_EVENT_MASK; @@ -3769,9 +3765,7 @@ void nxagentDisableKeyboardEvents(void) void nxagentEnablePointerEvents(void) { int i; - Mask mask; - - nxagentGetDefaultEventMask(&mask); + Mask mask = nxagentGetDefaultEventMask(); mask |= NXAGENT_POINTER_EVENT_MASK; @@ -3786,9 +3780,7 @@ void nxagentEnablePointerEvents(void) void nxagentDisablePointerEvents(void) { int i; - Mask mask; - - nxagentGetDefaultEventMask(&mask); + Mask mask = nxagentGetDefaultEventMask(); mask &= ~NXAGENT_POINTER_EVENT_MASK; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h index 5175be1..c0eb878 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h @@ -88,9 +88,9 @@ extern void nxagentDisablePointerEvents(void); */ extern void nxagentInitDefaultEventMask(void); -extern void nxagentGetDefaultEventMask(Mask *mask_return); +extern Mask nxagentGetDefaultEventMask(void); extern void nxagentSetDefaultEventMask(Mask mask); -extern void nxagentGetEventMask(WindowPtr pWin, Mask *mask_return); +extern Mask nxagentGetEventMask(WindowPtr pWin); /* * Bring keyboard device in known state. It needs diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index b7a8f54..11efbf3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -455,7 +455,7 @@ Window nxagentCreateIconWindow(void) * Enable events from the icon window. */ - nxagentGetDefaultEventMask(&mask); + mask = nxagentGetDefaultEventMask(); XSelectInput(nxagentDisplay, w, (mask & ~(KeyPressMask | KeyReleaseMask)) | StructureNotifyMask); @@ -1705,12 +1705,7 @@ N/A (nxagentOption(AllScreens) == 1 ? CWOverrideRedirect : 0); attributes.background_pixel = nxagentBlackPixel; - - /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ - Mask tmp_mask = attributes.event_mask; - nxagentGetDefaultEventMask(&tmp_mask); - attributes.event_mask = (int)tmp_mask; - + attributes.event_mask = nxagentGetDefaultEventMask(); attributes.colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen)); if (nxagentOption(AllScreens) == 1) @@ -1741,7 +1736,7 @@ N/A { nxagentDefaultWindows[pScreen->myNum] = nxagentParentWindow; - nxagentGetDefaultEventMask(&mask); + mask = nxagentGetDefaultEventMask(); XSelectInput(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], mask); } @@ -1870,7 +1865,7 @@ N/A strlen("X-AGENT")); } - nxagentGetDefaultEventMask(&mask); + mask = nxagentGetDefaultEventMask(); XSelectInput(nxagentDisplay, nxagentFullscreenWindow, mask); } @@ -2940,7 +2935,7 @@ int nxagentShadowCreateMainWindow(ScreenPtr pScreen, WindowPtr pWin, int width, mask = CWBackPixmap | CWEventMask | CWCursor; - nxagentGetDefaultEventMask(&maskb); + maskb = nxagentGetDefaultEventMask(); maskb |= ResizeRedirectMask | ExposureMask; vlist = values; @@ -3597,7 +3592,7 @@ Bool nxagentReconnectScreen(void *p0) h, 1))); - nxagentGetDefaultEventMask(&mask); + mask = nxagentGetDefaultEventMask(); mask |= NXAGENT_KEYBOARD_EVENT_MASK | NXAGENT_POINTER_EVENT_MASK; nxagentSetDefaultEventMask(mask); XSelectInput(nxagentDisplay, nxagentDefaultWindows[0], mask); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index b12fe76..5373d48 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -345,10 +345,7 @@ FIXME: We need to set save under on the real display? if (mask & CWEventMask) { - /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ - Mask tmp_mask = attributes.event_mask; - nxagentGetEventMask(pWin, &tmp_mask); - attributes.event_mask = (int)tmp_mask; + attributes.event_mask = nxagentGetEventMask(pWin); } #ifdef WARNING else @@ -2970,10 +2967,7 @@ FIXME: Do we need to set save unders attribute here? if (mask & CWEventMask) { - /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ - Mask tmp_mask = attributes.event_mask; - nxagentGetEventMask(pWin, &tmp_mask); - attributes.event_mask = (int)tmp_mask; + attributes.event_mask = nxagentGetEventMask(pWin); } #ifdef WARNING else @@ -3446,10 +3440,7 @@ void nxagentSetTopLevelEventMask(pWin) if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) { - /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ - Mask tmp_mask = attributes.event_mask = NoEventMask; - nxagentGetEventMask(pWin, &tmp_mask); - attributes.event_mask = (int)tmp_mask; + attributes.event_mask = nxagentGetEventMask(pWin); XChangeWindowAttributes(nxagentDisplay, nxagentWindow(pWin), mask, &attributes); } -- 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 0db17707384b62d2001618053c80d76dcf5cfb6c Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Mar 8 22:32:01 2018 +0100 Events.c: drop variable that caused compilation warning Fixes this message when compiling with TEST: Events.c:2725:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] message_data = validateString(NameForAtom(x.u.clientMessage.u.l.longs0)); --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index a137609..071e93b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2693,10 +2693,6 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) if (message_type == MakeAtom("WM_PROTOCOLS", strlen("WM_PROTOCOLS"), False)) { - #ifdef TEST - char *message_data; - #endif - xEvent x; memset(&x, 0, sizeof(xEvent)); @@ -2720,11 +2716,9 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) #ifdef TEST else { - message_data = validateString(NameForAtom(x.u.clientMessage.u.l.longs0)); + fprintf(stderr, "nxagentHandleClientMessageEvent: Sent client message of type WM_PROTOCOLS " + "and value [%s].\n", validateString(NameForAtom(x.u.clientMessage.u.l.longs0))); } - - fprintf(stderr, "nxagentHandleClientMessageEvent: Sent client message of type WM_PROTOCOLS " - "and value [%s].\n", message_data); #endif TryClientEvents(wClient(pWin), &x, 1, 1, 1, 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 f9c2d560d40721617d5813fed8bd04af8431c75c Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Aug 22 19:37:13 2018 +0200 Fix broken 9a7c0b081fad98bfcfcceff9557781f4b39ec572 Windowsize was wrong when run with nxagent :<someDisplay>. Basically three changes: - reference sizeHints and wmHints correctly (no &) - do not use uninitialized wmHints - set wmHints Xutf8SetWMProperties() call instead of separate call --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 33 +++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 11efbf3..036e5b4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -853,8 +853,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, unsigned long valuemask; XSetWindowAttributes attributes; XWindowAttributes gattributes; - XSizeHints* sizeHints; - XWMHints* wmHints; Mask mask; Bool resetAgentPosition = False; @@ -1870,6 +1868,9 @@ N/A XSelectInput(nxagentDisplay, nxagentFullscreenWindow, mask); } + XSizeHints* sizeHints; + XWMHints* wmHints; + if ((sizeHints = XAllocSizeHints())) { sizeHints->flags = PPosition | PMinSize | PMaxSize; @@ -1898,15 +1899,6 @@ N/A sizeHints->flags |= USSize; } - Xutf8SetWMProperties(nxagentDisplay, - nxagentDefaultWindows[pScreen->myNum], - nxagentWindowName, - nxagentWindowName, - argv , argc , &sizeHints, &wmHints, NULL); - - if (sizeHints) - XFree(sizeHints); - if ((wmHints = XAllocWMHints())) { wmHints->icon_pixmap = nxagentIconPixmap; @@ -1920,9 +1912,24 @@ N/A { wmHints->flags = IconPixmapHint; } + } - XSetWMHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], wmHints); - XFree(wmHints); + Xutf8SetWMProperties(nxagentDisplay, + nxagentDefaultWindows[pScreen->myNum], + nxagentWindowName, + nxagentWindowName, + argv , argc , sizeHints, wmHints, NULL); + + if (sizeHints) + { + XFree(sizeHints); + sizeHints = NULL; + } + + if (wmHints) + { + XFree(wmHints); + wmHints = NULL; } /* -- 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 b517b66efcbb30bb7f7add4fb5bfe48f3185b615 Merge: f9e4a54 f9c2d56 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Aug 22 20:18:48 2018 +0200 Merge branch 'uli42-pr/fix_wm_props' into 3.6.x Attributes GH PR #721: https://github.com/ArcticaProject/nx-libs/pull/721 nx-X11/programs/Xserver/hw/nxagent/Screen.c | 33 +++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 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 553b96f0551d660d0700de49da880cf99d9c9168 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Mar 8 22:29:53 2018 +0100 Events.c: fix wrong printf format specifiers --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 8fe4e1f..a137609 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2500,7 +2500,7 @@ FIXME: This can be maybe optimized by consuming the nxagentExposeQueue.exposures[index].remoteRegion, &sum); #ifdef TEST - fprintf(stderr, "nxagentHandleExposeEvent: Added region for window [%ld] to position [%d].\n", + fprintf(stderr, "nxagentHandleExposeEvent: Added region for window [%u] to position [%d].\n", nxagentWindow(pWin), index); #endif @@ -2520,7 +2520,7 @@ FIXME: This can be maybe optimized by consuming the nxagentSplashCount == 1 && X -> xexpose.count == 0) { #ifdef DEBUG - fprintf(stderr, "nxagentHandleExposeEvent: Clearing root tile window id [%ld].\n", + fprintf(stderr, "nxagentHandleExposeEvent: Clearing root tile window id [%u].\n", nxagentWindowPriv(nxagentRootTileWindow) -> window); #endif @@ -2759,7 +2759,7 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) else { #ifdef TEST - fprintf(stderr, "Events: WM_DELETE_WINDOW arrived Atom = %ld.\n", wmAtom); + fprintf(stderr, "Events: WM_DELETE_WINDOW arrived Atom = %u.\n", wmAtom); #endif if (X -> xclient.window == nxagentIconWindow) @@ -4127,7 +4127,7 @@ void nxagentSynchronizeExpose(void) { #ifdef TEST fprintf(stderr, "nxagentSynchronizeExpose: Going to call miWindowExposures" - " for window [%ld] - rects [%ld].\n", nxagentWindow(pWin), + " for window [%d] - rects [%d].\n", nxagentWindow(pWin), RegionNumRects(nxagentExposeQueueHead.remoteRegion)); #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 2fe89c5bf1ede82097ffcf1a9695b8df21c714ba Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Mar 8 22:28:29 2018 +0100 Events.c: fix compiler warnings format ‘%p’ expects argument of type ‘void *’ --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 23a9182..8fe4e1f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -1636,7 +1636,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was #ifdef TEST fprintf(stderr, "nxagentDispatchEvents: nxagentLastEnteredTopLevelWindow [%p].\n", - nxagentLastEnteredTopLevelWindow); + (void *)nxagentLastEnteredTopLevelWindow); #endif } @@ -4346,7 +4346,7 @@ int nxagentClipAndSendExpose(WindowPtr pWin, void * ptr) box = *RegionExtents(&pWin -> clipList); fprintf(stderr, "nxagentClipAndSendExpose: Clip list extents for window at [%p]: [%d] [%d] [%d] [%d].\n", - pWin, box.x1, box.y1, box.x2, box.y2); + (void *)pWin, box.x1, box.y1, box.x2, box.y2); #endif RegionIntersect(exposeRgn, remoteExposeRgn, &pWin -> clipList); @@ -4355,7 +4355,7 @@ int nxagentClipAndSendExpose(WindowPtr pWin, void * ptr) { #ifdef DEBUG fprintf(stderr, "nxagentClipAndSendExpose: Forwarding expose to window at [%p] pWin.\n", - pWin); + (void *)pWin); #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 f9e4a54c48ec9730d1e977a57dae89042e7bfb5e Merge: 9f4eb6a 0db1770 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Aug 22 15:37:48 2018 +0200 Merge branch 'uli42-pr/fix_events_debug_warnings' into 3.6.x Attributes GH PR #675: https://github.com/ArcticaProject/nx-libs/pull/675 nx-X11/programs/Xserver/hw/nxagent/Events.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 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 3bd41aaf7f882cb1df4ab62a064920b797c5b41d Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 23 22:57:27 2018 +0200 Replace MIN/MAX macros by min/max from misc.h We do not need two versions in the code --- nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 5 +++-- nx-X11/programs/Xserver/hw/nxagent/Font.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 17 +++++++++-------- nx-X11/programs/Xserver/hw/nxagent/Utils.h | 8 -------- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c index 5228705..88f3da3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c @@ -25,6 +25,7 @@ #include "dixstruct.h" #include "../../fb/fb.h" +#include "misc.h" #include "Agent.h" #include "Display.h" @@ -696,11 +697,11 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned for (y = box.y1; y < box.y2; y += h) { - h = MIN(box.y2 - y, tileHeight); + h = min(box.y2 - y, tileHeight); for (x = box.x1; x < box.x2; x += w) { - w = MIN(box.x2 - x, tileWidth); + w = min(box.x2 - x, tileWidth); /* * FIXME: This should not occur. diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index a1690eb..57909d7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -1415,7 +1415,7 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size) if (len) { - snprintf(fontServerPath, MIN(size, len + 1), "%s", path + 1); + snprintf(fontServerPath, min(size, len + 1), "%s", path + 1); #ifdef TEST fprintf(stderr, "nxagentGetFontServerPath: Got path [%s].\n", diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 61b4512..6def29a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -431,7 +431,7 @@ void nxagentDumpKeystrokes(void) { int maxlen = 0; for (int i = 0; nxagentSpecialKeystrokeNames[i]; i++) - maxlen = MAX(maxlen, strlen(nxagentSpecialKeystrokeNames[i])); + maxlen = min(maxlen, strlen(nxagentSpecialKeystrokeNames[i])); fprintf(stderr, "Current known keystrokes:\n"); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 036e5b4..b5aabf8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -55,6 +55,7 @@ is" without express or implied warranty. #include "../../randr/randrstr.h" #include "inputstr.h" #include "mivalidate.h" +#include "misc.h" #include "Agent.h" #include "Display.h" @@ -3641,10 +3642,10 @@ Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah, return FALSE; } - tx1 = MAX(ax1, bx1); - ty1 = MAX(ay1, by1); - tx2 = MIN(ax2, bx2); - ty2 = MIN(ay2, by2); + tx1 = max(ax1, bx1); + ty1 = max(ay1, by1); + tx2 = min(ax2, bx2); + ty2 = min(ay2, by2); ix = tx1 - ax1; iy = ty1 - ay1; @@ -4022,10 +4023,10 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) bbx1 = bby1 = INT_MAX; for (i = 0; i < number; i++) { - bbx2 = MAX(bbx2, screeninfo[i].x_org + screeninfo[i].width); - bby2 = MAX(bby2, screeninfo[i].y_org + screeninfo[i].height); - bbx1 = MIN(bbx1, screeninfo[i].x_org); - bby1 = MIN(bby1, screeninfo[i].y_org); + bbx2 = max(bbx2, screeninfo[i].x_org + screeninfo[i].width); + bby2 = max(bby2, screeninfo[i].y_org + screeninfo[i].height); + bbx1 = min(bbx1, screeninfo[i].x_org); + bby1 = min(bby1, screeninfo[i].y_org); } #ifdef DEBUG fprintf(stderr, "nxagentAdjustRandRXinerama: bounding box: left [%d] right [%d] top [%d] bottom [%d]\n", bbx1, bbx2, bby1, bby2); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Utils.h b/nx-X11/programs/Xserver/hw/nxagent/Utils.h index 8a33354..63904e2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Utils.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Utils.h @@ -40,14 +40,6 @@ #define nxagentScale(i, ratio) (((i) * (ratio)) >> (PRECISION)) -#ifndef MIN -#define MIN(A, B) ( (A) < (B) ? (A) : (B) ) -#endif - -#ifndef MAX -#define MAX(A, B) ( (A) > (B) ? (A) : (B) ); -#endif - static inline const char * validateString(const char *str) { return str ? str : "(null)"; } -- 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 30a96273380a53320c8950f945b1f52c111337ce Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 23 23:09:44 2018 +0200 Args.c: allow options to contain URL encoded characters Same as in nxcomp's option handling. We really only need it for "," (%2C) and "=" (%3D), currently, but it can handle all encoded characters. --- nx-X11/programs/Xserver/hw/nxagent/Args.c | 35 ++++++++++++++++++++++++ nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 5 ++++ 2 files changed, 40 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 30e3b86..801ee0b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -1037,6 +1037,39 @@ int ddxProcessArgument(int argc, char *argv[], int i) return 0; } +/* copy from nxcomp's Loop.cpp */ +static int +hexval(char c) { + if ((c >= '0') && (c <= '9')) + return c - '0'; + if ((c >= 'a') && (c <= 'f')) + return c - 'a' + 10; + if ((c >= 'A') && (c <= 'F')) + return c - 'A' + 10; + return -1; +} + +static void +URLDecodeInPlace(char *str) +{ + if (str) { + char *to = str; + while (str[0]) + { + if ((str[0] == '%') && + (hexval(str[1]) >= 0) && + (hexval(str[2]) >= 0)) + { + *(to++) = hexval(str[1]) * 16 + hexval(str[2]); + str += 3; + } + else + *(to++) = *(str++); + } + *to = '\0'; + } +} + static void nxagentParseSingleOption(char *name, char *value) { int size, argc; @@ -1048,6 +1081,8 @@ static void nxagentParseSingleOption(char *name, char *value) validateString(name), validateString(value)); #endif + URLDecodeInPlace(value); + if (!strcmp(name, "kbtype") || !strcmp(name, "keyboard") || !strcmp(name, "id") || diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index b9c81cd..6a0bfc1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -480,6 +480,11 @@ As <proxy-port> you can pick an arbitrary (unused) TCP port or Unix socket file path. This is the port / socket that you have to connect to with the \fBnxproxy\fR application. .PP +The right hand side of an option (the part following the "=" character) +can include URL encoded characters. It is required to URL encode at +least "," (as %2D) and "=" (as %3D) to avoid wrong parsing of the +options string. +.PP Available \fBnxagent\fR options (as an addition to nx/nx options supported by nxcomp already): .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 fad80bc4fda7edec2b6a7c19dcd1a03600646fec Merge: b517b66 3bd41aa Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Aug 24 10:55:02 2018 +0200 Merge branch 'uli42-pr/drop_double_min_max' into 3.6.x Attributes GH PR #724: https://github.com/ArcticaProject/nx-libs/pull/724 nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 5 +++-- nx-X11/programs/Xserver/hw/nxagent/Font.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 17 +++++++++-------- nx-X11/programs/Xserver/hw/nxagent/Utils.h | 8 -------- 5 files changed, 14 insertions(+), 20 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 f8e20d05f527daeb8e42e366ca2ebe1546b061df Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 23 23:08:30 2018 +0200 Args.c: rename nxagentParseOptions to nxagentParseSingleOption new name is more descriptive --- nx-X11/programs/Xserver/hw/nxagent/Args.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 262c1df..30e3b86 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -1037,14 +1037,14 @@ int ddxProcessArgument(int argc, char *argv[], int i) return 0; } -static void nxagentParseOptions(char *name, char *value) +static void nxagentParseSingleOption(char *name, char *value) { int size, argc; char *argv[2] = { NULL, NULL }; #ifdef TEST - fprintf(stderr, "nxagentParseOptions: Processing option '%s' = '%s'.\n", + fprintf(stderr, "nxagentParseSingleOption: Processing option '%s' = '%s'.\n", validateString(name), validateString(value)); #endif @@ -1081,7 +1081,7 @@ static void nxagentParseOptions(char *name, char *value) if (nxagentReconnectTrap == True) { #ifdef DEBUG - fprintf(stderr, "nxagentParseOptions: Ignoring option 'render' at reconnection.\n"); + fprintf(stderr, "nxagentParseSingleOption: Ignoring option 'render' at reconnection.\n"); #endif } else if (nxagentRenderEnable == UNDEFINED) @@ -1113,7 +1113,7 @@ static void nxagentParseOptions(char *name, char *value) if (nxagentReconnectTrap == True) { #ifdef DEBUG - fprintf(stderr, "nxagentParseOptions: Ignoring option 'fullscreen' at reconnection.\n"); + fprintf(stderr, "nxagentParseSingleOption: Ignoring option 'fullscreen' at reconnection.\n"); #endif } else if (!strcmp(value, "1")) @@ -1283,7 +1283,7 @@ static void nxagentParseOptions(char *name, char *value) if (nxagentReconnectTrap == True) { #ifdef DEBUG - fprintf(stderr, "nxagentParseOptions: Ignoring option 'autodpi' at reconnection.\n"); + fprintf(stderr, "nxagentParseSingleOption: Ignoring option 'autodpi' at reconnection.\n"); #endif } else if (!strcmp(value, "0")) @@ -1368,7 +1368,7 @@ static void nxagentParseOptions(char *name, char *value) if ((errno) && (0 == sleep_parse)) { - fprintf(stderr, "nxagentParseOptions: Unable to convert value [%s] of option [%s]. " + fprintf(stderr, "nxagentParseSingleOption: Unable to convert value [%s] of option [%s]. " "Ignoring option.\n", validateString(value), validateString(name)); @@ -1379,7 +1379,7 @@ static void nxagentParseOptions(char *name, char *value) { sleep_parse = UINT_MAX; - fprintf(stderr, "nxagentParseOptions: Warning: value [%s] of option [%s] " + fprintf(stderr, "nxagentParseSingleOption: Warning: value [%s] of option [%s] " "out of range, clamped to [%lu].\n", validateString(value), validateString(name), sleep_parse); } @@ -1388,7 +1388,7 @@ static void nxagentParseOptions(char *name, char *value) { sleep_parse = 0; - fprintf(stderr, "nxagentParseOptions: Warning: value [%s] of option [%s] " + fprintf(stderr, "nxagentParseSingleOption: Warning: value [%s] of option [%s] " "out of range, clamped to [%lu].\n", validateString(value), validateString(name), sleep_parse); } @@ -1427,7 +1427,7 @@ static void nxagentParseOptions(char *name, char *value) if ((errno) && (0 == tolerance_parse)) { - fprintf(stderr, "nxagentParseOptions: Unable to convert value [%s] of option [%s]. " + fprintf(stderr, "nxagentParseSingleOption: Unable to convert value [%s] of option [%s]. " "Ignoring option.\n", validateString(value), validateString(name)); @@ -1438,7 +1438,7 @@ static void nxagentParseOptions(char *name, char *value) { tolerance_parse = UINT_MAX; - fprintf(stderr, "nxagentParseOptions: Warning: value [%s] of option [%s] " + fprintf(stderr, "nxagentParseSingleOption: Warning: value [%s] of option [%s] " "out of range, clamped to [%lu].\n", validateString(value), validateString(name), tolerance_parse); } @@ -1447,7 +1447,7 @@ static void nxagentParseOptions(char *name, char *value) { tolerance_parse = 0; - fprintf(stderr, "nxagentParseOptions: Warning: value [%s] of option [%s] " + fprintf(stderr, "nxagentParseSingleOption: Warning: value [%s] of option [%s] " "out of range, clamped to [%lu].\n", validateString(value), validateString(name), tolerance_parse); } @@ -1460,7 +1460,7 @@ static void nxagentParseOptions(char *name, char *value) case ToleranceChecksBypass: break; default: - fprintf(stderr, "nxagentParseOptions: Warning: value [%s] of " + fprintf(stderr, "nxagentParseSingleOption: Warning: value [%s] of " "option [%s] unknown, will be mapped to " "\"Bypass\" [%u] value internally.\n", validateString(value), validateString(name), @@ -1495,7 +1495,7 @@ static void nxagentParseOptions(char *name, char *value) else { #ifdef DEBUG - fprintf(stderr, "nxagentParseOptions: Ignored option [%s] with value [%s].\n", + fprintf(stderr, "nxagentParseSingleOption: Ignored option [%s] with value [%s].\n", validateString(name), validateString(value)); #endif @@ -1563,7 +1563,7 @@ static void nxagentParseOptionString(char *string) value = NULL; } - nxagentParseOptions(option, value); + nxagentParseSingleOption(option, value); } } -- 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 373836468b2c21f1c3706e521a603b9dba9dd41a Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Apr 14 03:05:17 2018 +0200 Call checkX2goAgent much earlier (in ddxProcessArgument) and adapt NXAGENTWINDOWNAMELENGTH to its result. --- nx-X11/programs/Xserver/hw/nxagent/Args.c | 15 ++++++++++++++- nx-X11/programs/Xserver/hw/nxagent/Init.c | 7 +------ nx-X11/programs/Xserver/hw/nxagent/Init.h | 1 + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 801ee0b..cdcde12 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -56,6 +56,7 @@ is" without express or implied warranty. #include "servermd.h" #include "opaque.h" +#include "Init.h" #include "Agent.h" #include "Display.h" #include "Args.h" @@ -189,6 +190,11 @@ int ddxProcessArgument(int argc, char *argv[], int i) nxagentProgName = argv[0]; + /* + * Check if we running as X2Go Agent + */ + checkX2goAgent(); + static Bool resetOptions = True; if (resetOptions == True) @@ -1805,7 +1811,14 @@ N/A if (*nxagentWindowName == '\0') { - snprintf(nxagentWindowName, NXAGENTWINDOWNAMELENGTH, "NX"); + if(nxagentX2go) + { + snprintf(nxagentWindowName, NXAGENTWINDOWNAMELENGTH, "X2Go Agent"); + } + else + { + snprintf(nxagentWindowName, NXAGENTWINDOWNAMELENGTH, "NX Agent"); + } } /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index 12f7f0b..01acbbc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -192,7 +192,7 @@ int nxagentX2go; * Checking if agent is x2go agent */ -void checkX2goAgent() +void checkX2goAgent(void) { extern const char *nxagentProgName; if( strcasecmp(nxagentProgName,"x2goagent") == 0) @@ -221,11 +221,6 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) #endif /* - * Check if we running as X2Go Agent - */ - checkX2goAgent(); - - /* * Print our pid and version information. */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.h b/nx-X11/programs/Xserver/hw/nxagent/Init.h index 34a1706..1bea176 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.h @@ -46,6 +46,7 @@ extern int nxagentBackingStore; extern int nxagentSaveUnder; extern int nxagentX2go; +void checkX2goAgent(void); extern ServerGrabInfoRec nxagentGrabServerInfo; -- 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 930bd283339d899aa0e2e521521ec56959f2a72c Merge: fad80bc 30a9627 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Aug 24 11:55:24 2018 +0200 Merge branch 'uli42-pr/decode_options' into 3.6.x Attributes GH PR #725: https://github.com/ArcticaProject/nx-libs/pull/725 nx-X11/programs/Xserver/hw/nxagent/Args.c | 63 ++++++++++++++++++------ nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 5 ++ 2 files changed, 54 insertions(+), 14 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 c7eadb8ae1dd5473ea7bd701055d8b6d6879eef1 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Apr 14 02:23:52 2018 +0200 nxmissing.xpm: Add XPM marker so that image viewers recognize the image file format. --- nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm | 1 + 1 file changed, 1 insertion(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm b/nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm index 3fb4362..e6cf0fc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm +++ b/nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm @@ -23,6 +23,7 @@ /* */ /**************************************************************************/ +/* XPM */ static char *placeholderXpm[] = { /* columns rows colors chars-per-pixel */ "14 16 10 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 4d6bae08291f85794948ec5d7e839a0aa583a32f Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Apr 14 02:25:21 2018 +0200 Application icon: Drop NoMachine logo as nxagent icon, switch to X11 icon for now. --- doc/nxagent/x11.svg | 27 ++ nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm | 422 ++++++++++++++++++++++--- nx-X11/programs/Xserver/hw/nxagent/x11.svg | 27 ++ 3 files changed, 427 insertions(+), 49 deletions(-) diff --git a/doc/nxagent/x11.svg b/doc/nxagent/x11.svg new file mode 100644 index 0000000..0d41320 --- /dev/null +++ b/doc/nxagent/x11.svg @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<!-- copyright: 2006, Marian Sigler --> +<!-- license: Public Domain --> +<!-- URL: https://en.wikipedia.org/wiki/File:X11.svg --> +<!-- Comment: Self-drawn using Inkscape and gedit, based on X11.png + https://commons.wikimedia.org/wiki/File:X11.png --> + +<svg + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="275" + height="275" + id="svg2"> + <defs + id="defs4" /> + <g + transform="translate(-295.17857,-338.61217)" + id="layer1"> + <path + d="m 296.78571,612.63003 c 0,0 104.06285,-132.7859 104.06285,-132.7859 0,0 -104.06285,-140.24982 -104.06285,-140.24982 l 67.30299,0 c 0,0 83.34749,113.48826 83.34749,113.48826 l -126.86477,159.54746 -23.78571,0 z M 417.28794,500.06578 544.11662,339.59431 c 0,0 24.45481,0 24.45481,0 L 464.47749,471.26578 c 0,0 104.09394,141.36425 104.09394,141.36425 l -67.30357,0 c 0,0 -83.97992,-112.56425 -83.97992,-112.56425 z" + id="path2830" + style="fill:#000000" /> + </g> +</svg> diff --git a/nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm b/nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm index bcdaa22..c2665de 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm +++ b/nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm @@ -1,49 +1,373 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com) */ -/* Copyright (c) 2008-2014 Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> */ -/* Copyright (c) 2011-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>*/ -/* Copyright (c) 2014-2016 Mihai Moldovan <ionic@ionic.de> */ -/* Copyright (c) 2014-2016 Ulrich Sibiller <uli42@gmx.de> */ -/* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */ -/* */ -/* NXAGENT, NX protocol compression and NX extensions to this software */ -/* are copyright of the aforementioned persons and companies. */ -/* */ -/* Redistribution and use of the present software is allowed according */ -/* to terms specified in the file LICENSE which comes in the source */ -/* distribution. */ -/* */ -/* All rights reserved. */ -/* */ -/* NOTE: This software has received contributions from various other */ -/* contributors, only the core maintainers and supporters are listed as */ -/* copyright holders. Please contact us, if you feel you should be listed */ -/* as copyright holder, as well. */ -/* */ -/**************************************************************************/ - -/* XPM */ -static char *nxagentIconData[] = { -"16 16 5 1", -" c None", -"! c black", -"# c #FF0000", -"$ c #424242", -"% c #750202", -" ", -"############### ", -"# #$", -"# #% #######% #$", -"# #% #%%#%%#% #$", -"# #% #% #% #% #$", -"# #% #% #% #% #$", -"# #% #% #% #% #$", -"# %% #% #% #% #$", -"# #% #% #% #$", -"# #% #% #% #% #$", -"# %% %% %% %% #$", -"# #$", -"###############$", -" $$$$$$$$$$$$$$$", -" "}; +/* XPM */ +static char * nxagentIconData[] = { +"128 128 242 2", +" c None", +". c #323232", +"+ c #FFFFFF", +"@ c #F2F2F2", +"# c #747474", +"$ c #737373", +"% c #717171", +"& c #D7D7D7", +"* c #D8D8D8", +"= c #787878", +"- c #757575", +"; c #F3F3F3", +"> c #FDFDFD", +", c #7D7D7D", +"' c #000000", +") c #252525", +"! c #F5F5F5", +"~ c #313131", +"{ c #8A8A8A", +"] c #F7F7F7", +"^ c #4B4B4B", +"/ c #636363", +"( c #FBFBFB", +"_ c #5D5D5D", +": c #020202", +"< c #5E5E5E", +"[ c #FAFAFA", +"} c #D9D9D9", +"| c #272727", +"1 c #040404", +"2 c #9B9B9B", +"3 c #888888", +"4 c #080808", +"5 c #3C3C3C", +"6 c #E6E6E6", +"7 c #ACACAC", +"8 c #0E0E0E", +"9 c #1C1C1C", +"0 c #C6C6C6", +"a c #B2B2B2", +"b c #181818", +"c c #232323", +"d c #C7C7C7", +"e c #F9F9F9", +"f c #7B7B7B", +"g c #010101", +"h c #464646", +"i c #E7E7E7", +"j c #D3D3D3", +"k c #2F2F2F", +"l c #121212", +"m c #A2A2A2", +"n c #EBEBEB", +"o c #767676", +"p c #ECECEC", +"q c #4E4E4E", +"r c #CCCCCC", +"s c #222222", +"t c #0B0B0B", +"u c #A8A8A8", +"v c #F8F8F8", +"w c #4C4C4C", +"x c #F4F4F4", +"y c #989898", +"z c #0D0D0D", +"A c #282828", +"B c #D5D5D5", +"C c #FEFEFE", +"D c #A9A9A9", +"E c #262626", +"F c #E4E4E4", +"G c #030303", +"H c #EEEEEE", +"I c #050505", +"J c #C3C3C3", +"K c #2E2E2E", +"L c #979797", +"M c #F0F0F0", +"N c #202020", +"O c #101010", +"P c #C9C9C9", +"Q c #4A4A4A", +"R c #626262", +"S c #9A9A9A", +"T c #E9E9E9", +"U c #414141", +"V c #686868", +"W c #A0A0A0", +"X c #E2E2E2", +"Y c #404040", +"Z c #8C8C8C", +"` c #BFBFBF", +" . c #191919", +".. c #161616", +"+. c #BCBCBC", +"@. c #373737", +"#. c #A3A3A3", +"$. c #303030", +"%. c #5B5B5B", +"&. c #727272", +"*. c #F6F6F6", +"=. c #595959", +"-. c #878787", +";. c #DCDCDC", +">. c #0A0A0A", +",. c #2D2D2D", +"'. c #CDCDCD", +"). c #B5B5B5", +"!. c #C2C2C2", +"~. c #131313", +"{. c #848484", +"]. c #424242", +"^. c #070707", +"/. c #535353", +"(. c #707070", +"_. c #AFAFAF", +":. c #969696", +"<. c #EAEAEA", +"[. c #2A2A2A", +"}. c #B4B4B4", +"|. c #171717", +"1. c #CECECE", +"2. c #4F4F4F", +"3. c #D1D1D1", +"4. c #1E1E1E", +"5. c #565656", +"6. c #7F7F7F", +"7. c #3B3B3B", +"8. c #BABABA", +"9. c #696969", +"0. c #CBCBCB", +"a. c #090909", +"b. c #E1E1E1", +"c. c #9C9C9C", +"d. c #AEAEAE", +"e. c #C8C8C8", +"f. c #060606", +"g. c #818181", +"h. c #D2D2D2", +"i. c #343434", +"j. c #5A5A5A", +"k. c #0F0F0F", +"l. c #828282", +"m. c #EDEDED", +"n. c #7C7C7C", +"o. c #A7A7A7", +"p. c #CFCFCF", +"q. c #1F1F1F", +"r. c #E8E8E8", +"s. c #A6A6A6", +"t. c #6E6E6E", +"u. c #7A7A7A", +"v. c #6D6D6D", +"w. c #B9B9B9", +"x. c #0C0C0C", +"y. c #B6B6B6", +"z. c #333333", +"A. c #9D9D9D", +"B. c #FCFCFC", +"C. c #808080", +"D. c #6F6F6F", +"E. c #3F3F3F", +"F. c #868686", +"G. c #444444", +"H. c #E3E3E3", +"I. c #DBDBDB", +"J. c #ADADAD", +"K. c #141414", +"L. c #A1A1A1", +"M. c #2B2B2B", +"N. c #111111", +"O. c #EFEFEF", +"P. c #E5E5E5", +"Q. c #434343", +"R. c #B1B1B1", +"S. c #515151", +"T. c #BEBEBE", +"U. c #1D1D1D", +"V. c #939393", +"W. c #898989", +"X. c #F1F1F1", +"Y. c #2C2C2C", +"Z. c #D4D4D4", +"`. c #AAAAAA", +" + c #383838", +".+ c #7E7E7E", +"++ c #4D4D4D", +"@+ c #8D8D8D", +"#+ c #5C5C5C", +"$+ c #E0E0E0", +"%+ c #BBBBBB", +"&+ c #1A1A1A", +"*+ c #353535", +"=+ c #575757", +"-+ c #363636", +";+ c #ABABAB", +">+ c #B3B3B3", +",+ c #8E8E8E", +"'+ c #B0B0B0", +")+ c #BDBDBD", +"!+ c #858585", +"~+ c #3D3D3D", +"{+ c #616161", +"]+ c #484848", +"^+ c #3E3E3E", +"/+ c #B7B7B7", +"(+ c #585858", +"_+ c #A4A4A4", +":+ c #909090", +"<+ c #474747", +"[+ c #DADADA", +"}+ c #494949", +"|+ c #676767", +"1+ c #C5C5C5", +"2+ c #777777", +"3+ c #C4C4C4", +"4+ c #242424", +"5+ c #606060", +"6+ c #646464", +"7+ c #D0D0D0", +"8+ c #8F8F8F", +"9+ c #838383", +"0+ c #292929", +"a+ c #DEDEDE", +"b+ c #D6D6D6", +"c+ c #555555", +"d+ c #DDDDDD", +"e+ c #212121", +"f+ c #949494", +"g+ c #CACACA", +"h+ c #6B6B6B", +"i+ c #656565", +"j+ c #919191", +"k+ c #8B8B8B", +"l+ c #545454", +"m+ c #C0C0C0", +"n+ c #A5A5A5", +"o+ c #525252", +"p+ c #454545", +"q+ c #9E9E9E", +"r+ c #C1C1C1", +"s+ c #DFDFDF", +" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +" . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . ", +" . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . ", +". . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . ", +". . . . + + @ # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % & + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + * = $ $ $ $ $ $ $ $ - ; + + . . . . ", +". . . + + + > , ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ) ! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; ~ ' ' ' ' ' ' ' ' ' { > + + + . . . ", +". . . + + + + ] ^ ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ( _ : ' ' ' ' ' ' ' ' < [ + + + + . . . ", +". . . + + + + + } | ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 1 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 4 ' ' ' ' ' ' ' ' 5 6 + + + + + . . . ", +". . + + + + + + + 7 8 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 9 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a b ' ' ' ' ' ' ' ' c d + + + + + + . . . ", +". . + + + + + + + e f g ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' h i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + j k ' ' ' ' ' ' ' ' l m + + + + + + + . . . ", +". . + + + + + + + + n ^ ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' : o ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + p q ' ' ' ' ' ' ' ' 1 = > + + + + + + + . . . ", +". . + + + + + + + + + r s ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' t u + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + v # ' ' ' ' ' ' ' ' ' w x + + + + + + + + . . . ", +". . + + + + + + + + + + y z ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' A B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C D ' ' ' ' ' ' ' ' ' E F + + + + + + + + + . . . ", +". . + + + + + + + + + + + < G ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' _ H + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + B I ' ' ' ' ' ' ' ' z J + + + + + + + + + + . . . ", +". . + + + + . + + + + + + ( K ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' L ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + M N ' ' ' ' ' ' ' ' 1 L + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + B O ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' : P + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [ Q ' ' ' ' ' ' ' ' ' R + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + S : ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' | T + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - ' ' ' ' ' ' ' ' ' U C + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + V ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' _ > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + W 1 ' ' ' ' ' ' ' ' A X + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + M Y ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' Z + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ` .' ' ' ' ' ' ' ' ..` + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + r .' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' O +.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + & @.' ' ' ' ' ' ' ' g S C + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + C #.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' $.F + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + M %.' ' ' ' ' ' ' ' ' &.! + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + *.# ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' g =.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C -.g ' ' ' ' ' ' ' ' w 6 + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + ;.Y ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' t Z + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a >.' ' ' ' ' ' ' ' ,.'.+ + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + ).9 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ) !.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + j 9 ' ' ' ' ' ' ' ' ~.m + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + {.4 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' q i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T ].' ' ' ' ' ' ' ' ^.- + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + > /.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' , e + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ] (.' g ' ' ' ' ' ' ' q + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + ;.,.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ^._.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + :.' ' ' ' ' ' ' ' ' . <.+ + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + C + ).z ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' [.* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + }.I ' ' ' ' ' ' ' ' |.1.+ + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + 3 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 2.v + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.4.' ' ' ' ' ' ' ' : D + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + ( 5.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 6.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + H 7.' ' ' ' ' ' ' ' ' { + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + i E ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ^.8.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _ g ' ' ' ' ' ' g ' 9.; + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + 0.g ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' .<.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {.a.' ' ' ' ' ' ' ' Y b.+ + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + ( c.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ].+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + d. .' ' ' ' ' ' ' ' 9 e.+ + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + H %.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' f.g.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + h.i.' ' ' ' ' ' ' ' 4 m + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + & [.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' l 8.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + n j.' ' ' ' ' ' ' ' ' o C + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + d.k.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' $.b.+ + + + + + + + + + + + + + + + + + + + + + + + + + e l.' ' ' ' ' ' ' ' ' 2.m.+ + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + > n.G ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' / ] + + + + + + + + + + + + + + + + + + + + + + + + + o.: ' ' ' ' ' ' ' ' K j + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + <.w ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' t L + + + + + + + + + + + + + + + + + + + + + + + + e.b ' ' ' ' ' ' ' ' l }.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + + + + + + p.N ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' q.d + + + + + + + + + + + + + + + + + + + + + + r.$.' ' ' ' ' ' ' ' ' :.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + s.f.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ].<.+ + + + + + + + + + + + + + + + + + + + + ^ ' ' ' ' ' ' ' ' ' % + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + t.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' u.[ + + + + + + + + + + + + + + + + + + + v.g ' ' ' ' ' ' ' ' h ! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > i.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' w.+ + + + + + + + + + + + + + + + + + y >.' ' ' ' ' ' ' ' 9 i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 x.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' k.i + + + + + + + + + + + + + + + + P |.' ' ' ' ' ' ' ' : P C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + y.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 5 > + + + + + + + + + + + + + + T z.' ' ' ' ' ' ' ' ' A.B.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + &.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' C.+ + + + + + + + + + + + + v %.' ' ' ' ' ' ' ' ' D.x + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; E.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ).+ + + + + + + + + + + C F.I ' ' ' ' ' ' ' ' G.H.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.q.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' q.I.+ + + + + + + + + + J.K.' ' ' ' ' ' ' ' E d + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C L.a.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 2.! + + + + + + + + h.M.' ' ' ' ' ' ' ' N.s.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *.D.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' I C.+ + + + + + + O.h ' ' ' ' ' ' ' ' I 6.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + P.Q.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' |.R.+ + + + + + V ' ' ' ' ' ' ' ' ' S.[ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T.U.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 7.} + + + + V.' ' ' ' ' ' ' ' ' E m.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + W.>.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 9.X.+ + d : ' ' ' ' ' ' ' ' ^.& + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.: ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' Y.Z.+ T ~.' ' ' ' ' ' ' ' ' R.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X.) ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 8 `.+ B. +' ' ' ' ' ' ' ' ' .++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ` 8 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 1 g.+ + V g ' ' ' ' ' ' ' ' ++> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C + @+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' %.; + V.4 ' ' ' ' ' ' ' ' $.6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' @.$++ %+&+' ' ' ' ' ' ' ' &+J + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + r.z.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' |.J + & *+' ' ' ' ' ' ' ' x.c.C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + J N.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' g `.+ n =+' ' ' ' ' ' ' ' ' $ e + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > L ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' W.+ e g.' ' ' ' ' ' ' ' ' 2.M + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X.9.' ' ' ' ' ' ' ' ' ' ' ' ' ' #+( + a : ' ' ' ' ' ' ' ' ' U 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Z.-+' ' ' ' ' ' ' ' ' ' ' ' Y.@ + I.O ' ' ' ' ' ' ' ' ' ' ' o B.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ;+K.' ' ' ' ' ' ' ' ' ' k.} + ; $.' ' ' ' ' ' ' ' ' ' ' ' 4 D + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _ ' ' ' ' ' ' ' ' ' G >++ B.%.' ' ' ' ' ' ' ' ' ' ' ' ' ' ,.j + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8.c ' ' ' ' ' ' ' ' ' l.e + ,+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' #+H + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + I.7.' ' ' ' ' ' ' ' ' %.m.+ '+: ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' @++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + M _ ' ' ' ' ' ' ' ' ' @.& + 0.9 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 4 )++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + B.!+' ' ' ' ' ' ' ' ' 9 T.+ b.~+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' E F + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + y.4 ' ' ' ' ' ' ' ' a.2 + e {+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ]++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $+|.' ' ' ' ' ' ' ' : (.+ + { ^.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' : u.+ C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > $.' ' ' ' ' ' ' ' ' ^+C + >+K.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' O /++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (+' ' ' ' ' ' ' ' ' b H + Z.,.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' A 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @+' ' ' ' ' ' ' ' ' f.3.+ + )+x.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 5.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )+^.' ' ' ' ' ' ' ' ' _++ + + + :+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' >.@++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } s ' ' ' ' ' ' ' ' ' % + + + + + H #+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' s ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + p <+' ' ' ' ' ' ' ' ' S.x + + + + + + B z.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' G.H.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [ # G ' ' ' ' ' ' ' ' i.[++ + + + + + + + a ~.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' - v + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + W z ' ' ' ' ' ' ' ' U.w.+ + + + + + + + + + 6.: ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' f.u C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + d U.' ' ' ' ' ' ' ' >.V.+ + + + + + + + + + + [ }+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' b } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 +' ' ' ' ' ' ' ' g |+B.+ + + + + + + + + + + + r.b ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 7.> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *.{+' ' ' ' ' ' ' ' ' ~+@ + + + + + + + + + + + + + + 1+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 2++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > y ' ' ' ' ' ' ' ' ' U.} + + + + + + + + + + + + + + + + W.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ).+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3+' ' ' ' ' ' ' ' ' z }.+ + + + + + + + + + + + + + + + + + ++' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' k.H.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $+~.' ' ' ' ' ' ' ' 1 C.+ C + + + + + + + + + + + + + + + + + i 4+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' E.( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + M ^+' ' ' ' ' ' ' ' ' 5++ + + + + + + + + + + + + + + + + + + + + +.x.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' G u.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6+' ' ' ' ' ' ' ' ' Q.! + + + + + + + + + + + + + + + + + + + + + [ -.g ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' k.J.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + ,+I ' ' ' ' ' ' ' ' [.} + + + + + + + + + + + + + + + + + + + + + + + H (+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' k Z.+ + + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '+|.' ' ' ' ' ' ' ' k.%++ + + + + + + + + + + + + + + + + + + + + + + + + Z.$.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' _ O.+ + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7+. ' ' ' ' ' ' ' ' ' :.> + + + + + + + + + + + + + + + + + + + + + + + + + + o.~.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' : 8+> + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + + m.5.' ' ' ' ' ' ' ' ' v.x + + + + + + + + + + + + + + + + + + + + + + + + + + + + (.I ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' N.J + + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + ( 9+' ' ' ' ' ' ' ' ' h H.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + B.5 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' *+6 + + + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + + + _.1 ' ' ' ' ' ' ' ' 0+d + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a+..' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' $ *.+ + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + + + + + h.q.' ' ' ' ' ' ' ' ~.W + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + s.^.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' `.+ + + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + + T ].' ' ' ' ' ' ' ' I 2++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + t.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' t b++ + + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + ( D.' g ' ' ' ' ' ' ' c++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C G.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' +O.+ + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + + + + :+' ' ' ' ' ' ' ' ' @.T + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + d+e+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' |++ + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + C + '+t ' ' ' ' ' ' ' ' |.h.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + >+4 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 1 L + + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + + + + + + + j N ' ' ' ' ' ' ' ' ' ).+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ( -.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 4.d + + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + x 7.' ' ' ' ' ' ' ' ' f+B.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + n =.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' Y p + + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + + 5+G ' ' ' ' ' ' ' ' V X.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + g+[.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' : (.+ + + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + + :+x.' ' ' ' ' ' ' ' U H.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L.k.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' k.#.+ + + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + + w.4.' ' ' ' ' ' ' ' q.e.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + h+g ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' . 7++ + + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + + ;.Y ' ' ' ' ' ' ' ' x.#.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + p E.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' _ m.+ + + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + + X.i+' ' ' ' ' ' ' ' G u.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3+4.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' j+B.+ + + + + + + + + + + + + + . . . ", +". . + + + + . + + + + + + + + + + > k+' ' ' ' ' ' ' ' ' l+O.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C + y f.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' x.m++ + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + + '+t ' ' ' ' ' ' ' ' $.;.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + v.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' k F + + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + + * U.' ' ' ' ' ' ' ' O !.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ 5 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' c++ + + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + ] *+' ' ' ' ' ' ' ' ' n++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } K.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' !++ + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + + (+' ' ' ' ' ' ' ' ' g.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' x.J + + + + + + + + + + + . . . ", +". . + + + + + + + + + + + + l.1 ' ' ' ' ' ' ' ' o+( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + v {.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 4+@ + + + + + + + + + + . . . ", +". . + + + + . + + + + + + %+t ' ' ' ' ' ' ' ' E O.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T p+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' : S.+ + + + + + + + + + . . . ", +". . + + + + + + + + + + $+s ' ' ' ' ' ' ' ' z 3.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.U.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' t 8++ + + + + + + + + . . . ", +". . + + + + + + + + + @ <+' ' ' ' ' ' ' ' 1 o.C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + q+^.' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' U.r++ + + + + + + + . . . ", +". . + + + + + + + + ( $ G ' ' ' ' ' ' ' ' n.v + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *.h+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' Q.P.+ + + + + + + . . . ", +". . + + + + + + + + A.8 ' ' ' ' ' ' ' ' S.T + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + s+^+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' $ v + + + + + + . . . ", +". . + + + + + + + 1+e+' ' ' ' ' ' ' ' k j + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + m+ .' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' x.s.C + + + + + . . . ", +". . + + + + + + i 5 ' ' ' ' ' ' ' ' |.w.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + :.1 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' e+B + + + + + . . . ", +". . . + + + + [ {+' ' ' ' ' ' ' ' ^.f++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _ ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' h ! + + + + . . . ", +". . . + + + > -.' ' ' ' ' ' ' ' ' 6++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ! 0+' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' f B.+ + + . . . ", +". . . + + + ; - $ $ $ $ $ $ $ $ 6.[ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + * % $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ @ + + . . . . ", +". . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . ", +". . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . ", +" . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . ", +" . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . ", +" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "}; diff --git a/nx-X11/programs/Xserver/hw/nxagent/x11.svg b/nx-X11/programs/Xserver/hw/nxagent/x11.svg new file mode 100644 index 0000000..0d41320 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/x11.svg @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<!-- copyright: 2006, Marian Sigler --> +<!-- license: Public Domain --> +<!-- URL: https://en.wikipedia.org/wiki/File:X11.svg --> +<!-- Comment: Self-drawn using Inkscape and gedit, based on X11.png + https://commons.wikimedia.org/wiki/File:X11.png --> + +<svg + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="275" + height="275" + id="svg2"> + <defs + id="defs4" /> + <g + transform="translate(-295.17857,-338.61217)" + id="layer1"> + <path + d="m 296.78571,612.63003 c 0,0 104.06285,-132.7859 104.06285,-132.7859 0,0 -104.06285,-140.24982 -104.06285,-140.24982 l 67.30299,0 c 0,0 83.34749,113.48826 83.34749,113.48826 l -126.86477,159.54746 -23.78571,0 z M 417.28794,500.06578 544.11662,339.59431 c 0,0 24.45481,0 24.45481,0 L 464.47749,471.26578 c 0,0 104.09394,141.36425 104.09394,141.36425 l -67.30357,0 c 0,0 -83.97992,-112.56425 -83.97992,-112.56425 z" + id="path2830" + style="fill:#000000" /> + </g> +</svg> -- 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 d3bbca712dc7109539f9af985fe2d30a7c9b0419 Merge: 930bd28 31ac5a1 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Aug 24 23:54:13 2018 +0200 Merge branch 'sunweaver-pr/drop-nomachine-icon' into 3.6.x Attributes GH PR #687: https://github.com/ArcticaProject/nx-libs/pull/687 Reviewed by Ulrich Sibiller <uli42@gmx.de> -- Fri, 24 Aug 2018 21:47:34 +0000 (UTC) doc/nxagent/x11.svg | 27 ++ nx-X11/programs/Xserver/hw/nxagent/Args.c | 22 +- nx-X11/programs/Xserver/hw/nxagent/Icons.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Init.c | 9 +- nx-X11/programs/Xserver/hw/nxagent/Init.h | 1 + nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm | 422 ++++++++++++++++++++--- nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm | 1 + nx-X11/programs/Xserver/hw/nxagent/x11.svg | 27 ++ nx-X11/programs/Xserver/hw/nxagent/x2go.xpm | 163 --------- nx-X11/programs/Xserver/hw/nxagent/x2goagent.xpm | 165 +++++++++ 10 files changed, 616 insertions(+), 223 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 31ac5a179dd19d37595217e68921f1b87ec34ed3 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Apr 14 22:35:18 2018 +0200 X2Go Agent XPM: Rename from x2go.xpm to x2goagent.xpm (like the symlink name we expect). --- nx-X11/programs/Xserver/hw/nxagent/Icons.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/{x2go.xpm => x2goagent.xpm} | 0 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Icons.h b/nx-X11/programs/Xserver/hw/nxagent/Icons.h index a87a5a1..7b2280a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Icons.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Icons.h @@ -32,7 +32,7 @@ #define NXAGENT_ICON_NAME "nxagent.xpm" -#define X2GOAGENT_ICON_NAME "x2go.xpm" +#define X2GOAGENT_ICON_NAME "x2goagent.xpm" #define NXAGENT_PLACEHOLDER_NAME "nxmissing.xpm" diff --git a/nx-X11/programs/Xserver/hw/nxagent/x2go.xpm b/nx-X11/programs/Xserver/hw/nxagent/x2goagent.xpm similarity index 100% rename from nx-X11/programs/Xserver/hw/nxagent/x2go.xpm rename to nx-X11/programs/Xserver/hw/nxagent/x2goagent.xpm -- 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 da9d1a5298d34f36accfac0af3640d11e4f70543 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Oct 6 20:59:25 2018 +0200 nxagent: Fix an excessive request size limitation that broke big-requests. Fixes ArcticaProject/nx-libs#301, #631 Backport from xorg-xserver: commit ca82d4bddf235c9b68d51d68636bab40eafb9889 Author: Eric Anholt <eric@anholt.net> Date: Fri Aug 31 13:00:23 2007 -0700 Bug #7186: Fix an excessive request size limitation that broke big-requests. MAXBUFSIZE appears to be a leftover of some previous time. Instead, just use maxBigRequestSize when bigreqs are available (limiting buffers to ~16MB). When bigreqs are not available, needed won't be larger than the maximum size of a non-bigreqs request (256kB). --- nx-X11/programs/Xserver/os/io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c index 6eeee34..ad1fdcd 100644 --- a/nx-X11/programs/Xserver/os/io.c +++ b/nx-X11/programs/Xserver/os/io.c @@ -301,7 +301,8 @@ ReadRequestFromClient(ClientPtr client) */ oci->lenLastReq = 0; - if (needed > MAXBUFSIZE) +#ifdef BIGREQS + if (needed > maxBigRequestSize << 2) { /* request is too big for us to handle */ /* @@ -312,6 +313,7 @@ ReadRequestFromClient(ClientPtr client) oci->lenLastReq = gotnow; return needed; } +#endif if ((gotnow == 0) || ((oci->bufptr - oci->buffer + needed) > oci->size)) { -- 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 c2b4e42a2e34b16acb2d1406458818a493a39b32 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Apr 14 22:29:03 2018 +0200 X2Go XPM icon: white background, not transparent. --- nx-X11/programs/Xserver/hw/nxagent/x2go.xpm | 250 ++++++++++++++-------------- 1 file changed, 126 insertions(+), 124 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/x2go.xpm b/nx-X11/programs/Xserver/hw/nxagent/x2go.xpm index 46a74ea..dcfd8e1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/x2go.xpm +++ b/nx-X11/programs/Xserver/hw/nxagent/x2go.xpm @@ -1,6 +1,7 @@ /**************************************************************************/ /* */ /* Copyright 2008 Heinz-M. Graesing <heinz-m.graesing@obviously-nice.de> */ +/* Copyright 2018 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> */ /* */ /* NXAGENT, NX protocol compression and NX extensions to this software */ /* are copyright of the aforementioned persons and companies. */ @@ -15,8 +16,9 @@ /* XPM */ static char *x2goagentIconData[]={ -"128 128 17 1", +"128 128 18 1", ". c None", +": c #FFFFFF", "m c #323232", "l c #323232", "f c #323232", @@ -36,128 +38,128 @@ static char *x2goagentIconData[]={ ".....#abccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccbde.....", "...fbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccgf...", "..#ccccaheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeijccckf..", -".ecccgl..................................................................................................................ejcckf.", -".bccd.....................................................................................................................mdccg.", -"#cca.......................................................................................................................mjcce", -"gckm........................................................................................................................eccd", -"ccn..........................................................................................................................jcb", -"cce..........................................................................................................................icc", -"ccm..........................................................................................................................ecc", -"cc...........................................................................................................................ecc", -"cc...........................................................................................................................ecc", -"cc...........................................................................................................................ecc", -"cc...........................................................................................................................ecc", -"cc............................................meeee..........................................................................ecc", -"cc.........eeeeeeeeoiiiiiiiinggggggggjccccccccccccc....#ggggggggggggggggggggggggggggf.............ggggggggggggggggggggggf....ecc", -"cc....meeeeoiiiiiiiinggggggggjccccccccccccccccccccc....icccccccccccccccccccccccccccce.............cccccccccccccccccccccce....ecc", -"cc....................................meeeeeeeeoiii....icccccccccccccccccccccccccccce.............cccccccccccccccccccccce....ecc", -"cc.......................................................menbccccccccccccccccccbhe..................logccccccccccccghe.......ecc", -"cc...........................................................iccccccccccccccccdm.......................#cccccccccke..........ecc", -"cc..............................................lee...........#cccccccccccccckm.........................jccccccckm...........ecc", -"cc........feeeeeeeeoiiiiiiiiiaggggggggjcccccccccccc............icccccccccccccd..........................icccccccf............ecc", -"cc....meeeeeoiiiiiiiinggggggggjcccccccccccccccccccciiiiii#m.....jcccccccccccci..........................icccccci.............ecc", -"cc......................................eeeeeeeeeiiiiiiiiigl....eccccccccccccd..........................dcccccj..............ecc", -"cc...............................................................dcccccccccccj..........................bccccce..............ecc", -"cc...............................................................lccccccccccccl........................lccccca...............ecc", -"cc.............................................meeeeeeee#iiiie....dccccccccccch........................icccccl...............ecc", -"cc.........meeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccb....ecccccccccccb........................bccccn................ecc", -"cc....meeeeiiiiiiiiiaggggggggbcccccccccccccccccccccccccccccccc#....gccccccccccco......................#cccckm................ecc", -"cc....................................meeeeeeeeeiiiiiiiiiaggggd....#cccccccccccg......................bcccci.................ecc", -"cc..................................................................bcccccccccccf....................#cccckm.................ecc", -"cc..................................................................hcccccccccccd...................mkcccci..................ecc", -"cc............................................meeeeeeeeoiiiiiiiil...mkcccccccccccl..................icccckm..................ecc", -"cc.........eeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccccccn....dccccccccccci.................mkcccci...................ecc", -"cc....meeeeeiiiiiiiiiaggggggggbccccccccccccccccccccccccccccccccckm...lccccccccccck.................icccckm...................ecc", -"cc.....................................leeeeeeeeoiiiiiiiiigggggggo....accccccccccc#...............mkcccch....................ecc", -"cc....................................................................ecccccccccccb...............iccccb.....................ecc", -"cc.....................................................................jccccccccccce.............mkcccc#.....................ecc", -"cc.............................................meeeeeeeeehiiiiiiii#....#ccccccccccca.............nccccb......................ecc", -"cc........feeeeeeee#iiiiiiiiigggggggggkccccccccccccccccccccccccccccl....kcccccccccccl...........lccccc#......................ecc", -"cc....meeeeeoiiiiiiiiigggggggggkcccccccccccccccccccccccccccccccccccd....icccccccccccd...........dccccb.......................ecc", -"cc......................................leeeeeeeeoiiiiiiiingggggggga....mccccccccccckm.........lccccc#.......................ecc", -"cc.......................................................................dccccccccccch.........dccccb........................ecc", -"cc.......................................................................lcccccccccccb........lccccc#........................ecc", -"cc.............................................meeeeeeeeoiiiiiiiingggo....gccccccccccc#.......dccccg.........................ecc", -"cc.........meeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccccccccccg....occcccccccccg......lccccce.........................ecc", -"cc....meeeeiiiiiiiiiaggggggggbcccccccccccccccccccccccccccccccccccccccce....bccccccccccce.....gccccg..........................ecc", -"cc....................................meeeeeeeeeiiiiiiiiigggggggggkcccd....#cccccccccccd....eccccce..........................ecc", -"cc.........................................................................mkcccccccccccl...gccccg...........................ecc", -"cc..........................................................................nccccccccccci..eccccce...........................ecc", -"cc............................................meeeeeeeeoiiiiiiiingggggggm...lccccccccccckm.gccccg............................ecc", -"cc.........eeeeeeeeoiiiiiiiinggggggggjcccccccccccccccccccccccccccccccccc#....dccccccccccc#eccccce............................ecc", -"cc....meeeeeiiiiiiiiiaggggggggkcccccccccccccccccccccccccccccccccccccccccb....ecccccccccccbgccccg.............................ecc", -"cc.....................................leeeeeeeeoiiiiiiiiigggggggggkccccco....gccccccccccccccccl.............................ecc", -"cc............................................................................#cccccccccccccccd..............................ecc", -"cc.............................................................................bccccccccccccccl..............................ecc", -"cc.............................................leeeeeeeeeiiiiiiiiiagggggggi....icccccccccccccd...............................ecc", -"cc........feeeeeeee#iiiiiiiingggggggggkccccccccccccccccccccccccccccccccccckm...mkccccccccccccl...............................ecc", -"cc....meeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccccccccccci....dccccccccccca................................ecc", -"cc......................................leeeeeeeeoiiiiiiiiigggggggggccccccck....lccccccccccckm...............................ecc", -"cc...............................................................................accccccccccc#...............................ecc", -"cc...............................................................................ecccccccccccb...............................ecc", -"cc............................................leeeeeeeeeiiiiiiiiiaggggggggbcce....bccccccccccce..............................ecc", -"cc.......feeeeeeee#iiiiiiiiigggggggggkcccccccccccccccccccccccccccccccccccccccd....#cccccccccccg..............................ecc", -"cc....meeeeeeoiiiiiiiingggggggggccccccccccccccccccccccccccccccccccccccccccccccl....kcccccccccccl.............................ecc", -"cc.......................................feeeeeeeehiiiiiiiidggggggggbccccccccci....ncccccccccccd.............................ecc", -"cc...........................................................................mm....bccccccccccccm............................ecc", -"cc................................................................................#ccccccccccccci............................ecc", -"cc..........................................leeeeeeee#iiiiiiiidggggggggbcccccl....bccccccccccccck............................ecc", -"cc......feeeeeeeehiiiiiiiiaggggggggkccccccccccccccccccccccccccccccccccccccccd....#ccccccccccccccc#...........................ecc", -"cc....meeeeeee#iiiiiiiidggggggggjcccccccccccccccccccccccccccccccccccccccccccl....bcccccccccccccccb...........................ecc", -"cc.......................................meeeeeeeeeiiiiiiiiigggggggggkcccccd....#cccccbccccccccccce..........................ecc", -"cc..............................................................................bccccdhcccccccccccg..........................ecc", -"cc.............................................................................#ccccclmkcccccccccccl.........................ecc", -"cc..........................................meeeeeeeeeiiiiiiiiiaggggggggbkm....bccccd..ncccccccccccd.........................ecc", -"cc.....leeeeeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccccci....hcccckl..lccccccccccccm........................ecc", -"cc....meeeeeeeehiiiiiiiidggggggggbcccccccccccccccccccccccccccccccccccccckm...mkcccci....dccccccccccci........................ecc", -"cc........................................leeeeeeee#iiiiiiiinggggggggjcci....icccckm....eccccccccccck........................ecc", -"cc..........................................................................mkcccci......gccccccccccc#.......................ecc", -"cc..........................................................................icccckm......#cccccccccccb.......................ecc", -"cc.........................................leeeeeeeeoiiiiiiiiigggggggga....mkcccci........bccccccccccce......................ecc", -"cc....meeeeeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccci....icccckm........hcccccccccccg......................ecc", -"cc.....feeeeeeeehiiiiiiiiaggggggggkcccccccccccccccccccccccccccccccccckm...mkcccci.........mkcccccccccccl.....................ecc", -"cc.........................................feeeeeeeehiiiiiiiiagggggggh....icccckm..........icccccccccccd.....................ecc", -"cc.......................................................................mkcccci...........lccccccccccccm....................ecc", -"cc.......................................................................icccckm............dccccccccccci....................ecc", -"cc...........................................eeeeeeeeehiiiiiiiidggga....mkcccci.............fccccccccccck....................ecc", -"cc......feeeeeeee#iiiiiiiingggggggggccccccccccccccccccccccccccccccci....iccccb...............gccccccccccc#...................ecc", -"cc....meeeeeeeoiiiiiiiiigggggggggbcccccccccccccccccccccccccccccccckm...mkcccc#...............occcccccccccb...................ecc", -"cc........................................meeeeeeeeeiiiiiiiiidgggg#....iccccb.................bccccccccccce..................ecc", -"cc....................................................................mkcccc#.................#cccccccccccg..................ecc", -"cc....................................................................iccccb..................mkcccccccccccl.................ecc", -"cc..........................................eeeeeeeeeiiiiiiiiiaga....mkcccc#...................icccccccccccd.................ecc", -"cc.....leeeeeeee#iiiiiiiinggggggggjccccccccccccccccccccccccccccci....iccccb....................lccccccccccccm................ecc", -"cc....meeeeeeee#iiiiiiiiigggggggggkcccccccccccccccccccccccccccckm...mkcccc#.....................dccccccccccci................ecc", -"cc.........................................leeeeeeeeoiiiiiiiiiah....iccccb......................lccccccccccck................ecc", -"cc.................................................................mkcccc#.......................gccccccccccc#...............ecc", -"cc.................................................................dccccj........................ecccccccccccj...............ecc", -"cc..........................................leeeeeeeeeiiiiiiih....lccccce.........................bccccccccccce..............ecc", -"cc....meeeeeeeeeiiiiiiiiidgggggggggcccccccccccccccccccccccccci....dccccg..........................#ccccccccccca..............ecc", -"cc.....feeeeeeeeiiiiiiiinggggggggbcccccccccccccccccccccccccckm...lccccce...........................kcccccccccccl.............ecc", -"cc........................................leeeeeeeehiiiiiiiih....dccccg............................ncccccccccccd.............ecc", -"cc..............................................................lccccce............................fccccccccccccf............ecc", -"cc..............................................................dccccb..............................jcccccccccccg............ecc", -"cc.........................................meeeeeeeeoiiiiil....lcccccn..............................icccccccccccce...........ecc", -"cc......feeeeeeeehiiiiiiiigggggggggccccccccccccccccjgggggo.....gccccc#..............................eccccccccccccbm..........ecc", -"cc....meeeeeeeoiiiiiiiiidgggggggggccccccccccccccccc...........hcccccco...............................cccccccccccccn..........ecc", -"cc.........................................leeeeeee..........ecccccccn..............................lcccccccccccccc#.........ecc", -"cc..........................................................#kccccccckf.............................nccccccccccccccc#........ecc", -"cc........................................................ldcccccccccck#m.........................lncccccccccccccccccdl......ecc", -"cc.........................................feeeeeee....ogjcccccccccccccccggi..................oggbcccccccccccccccccccccja....ecc", -"cc.....leeeeeeee#iiiiiiiidggggggggbcccccccccccccccc....icccccccccccccccccccg..................icccccccccccccccccccccccccc....ecc", -"cc....meeeeeeeehiiiiiiiiaggggggggkccccccccccccccccc....icccccccccccccccccccg..................icccccccccccccccccccccccccc....ecc", -"cc........................................feeeeeeee..........................................................................ecc", -"cc...........................................................................................................................ecc", -"cc...........................................................................................................................ecc", -"cc...........................................................................................................................ecc", -"cc...........................................................................................................................ecc", -"cc...........................................................................................................................ecc", -"cce..........................................................................................................................hcc", -"ccn..........................................................................................................................acb", -"jcb.........................................................................................................................lcca", -"hcci........................................................................................................................acc#", -"mkcc#......................................................................................................................dccb.", -".occci...................................................................................................................macccf.", -"..#cccbne.............................................................................................................menkccc#..", +".ecccgl::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ejcckf.", +".bccd:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::mdccg.", +"#cca:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::mjcce", +"gckm::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::eccd", +"ccn::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::jcb", +"cce::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::icc", +"ccm::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::meeee::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc:::::::::eeeeeeeeoiiiiiiiinggggggggjccccccccccccc::::#ggggggggggggggggggggggggggggf:::::::::::::ggggggggggggggggggggggf::::ecc", +"cc::::meeeeoiiiiiiiinggggggggjccccccccccccccccccccc::::icccccccccccccccccccccccccccce:::::::::::::cccccccccccccccccccccce::::ecc", +"cc::::::::::::::::::::::::::::::::::::meeeeeeeeoiii::::icccccccccccccccccccccccccccce:::::::::::::cccccccccccccccccccccce::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::menbccccccccccccccccccbhe::::::::::::::::::logccccccccccccghe:::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::iccccccccccccccccdm:::::::::::::::::::::::#cccccccccke::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::lee:::::::::::#cccccccccccccckm:::::::::::::::::::::::::jccccccckm:::::::::::ecc", +"cc::::::::feeeeeeeeoiiiiiiiiiaggggggggjcccccccccccc::::::::::::icccccccccccccd::::::::::::::::::::::::::icccccccf::::::::::::ecc", +"cc::::meeeeeoiiiiiiiinggggggggjcccccccccccccccccccciiiiii#m:::::jcccccccccccci::::::::::::::::::::::::::icccccci:::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::eeeeeeeeeiiiiiiiiigl::::eccccccccccccd::::::::::::::::::::::::::dcccccj::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::dcccccccccccj::::::::::::::::::::::::::bccccce::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::lccccccccccccl::::::::::::::::::::::::lccccca:::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::meeeeeeee#iiiie::::dccccccccccch::::::::::::::::::::::::icccccl:::::::::::::::ecc", +"cc:::::::::meeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccb::::ecccccccccccb::::::::::::::::::::::::bccccn::::::::::::::::ecc", +"cc::::meeeeiiiiiiiiiaggggggggbcccccccccccccccccccccccccccccccc#::::gccccccccccco::::::::::::::::::::::#cccckm::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::meeeeeeeeeiiiiiiiiiaggggd::::#cccccccccccg::::::::::::::::::::::bcccci:::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::bcccccccccccf::::::::::::::::::::#cccckm:::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::hcccccccccccd:::::::::::::::::::mkcccci::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::meeeeeeeeoiiiiiiiil:::mkcccccccccccl::::::::::::::::::icccckm::::::::::::::::::ecc", +"cc:::::::::eeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccccccn::::dccccccccccci:::::::::::::::::mkcccci:::::::::::::::::::ecc", +"cc::::meeeeeiiiiiiiiiaggggggggbccccccccccccccccccccccccccccccccckm:::lccccccccccck:::::::::::::::::icccckm:::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::leeeeeeeeoiiiiiiiiigggggggo::::accccccccccc#:::::::::::::::mkcccch::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecccccccccccb:::::::::::::::iccccb:::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::jccccccccccce:::::::::::::mkcccc#:::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::meeeeeeeeehiiiiiiii#::::#ccccccccccca:::::::::::::nccccb::::::::::::::::::::::ecc", +"cc::::::::feeeeeeee#iiiiiiiiigggggggggkccccccccccccccccccccccccccccl::::kcccccccccccl:::::::::::lccccc#::::::::::::::::::::::ecc", +"cc::::meeeeeoiiiiiiiiigggggggggkcccccccccccccccccccccccccccccccccccd::::icccccccccccd:::::::::::dccccb:::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::leeeeeeeeoiiiiiiiingggggggga::::mccccccccccckm:::::::::lccccc#:::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::dccccccccccch:::::::::dccccb::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::lcccccccccccb::::::::lccccc#::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::meeeeeeeeoiiiiiiiingggo::::gccccccccccc#:::::::dccccg:::::::::::::::::::::::::ecc", +"cc:::::::::meeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccccccccccg::::occcccccccccg::::::lccccce:::::::::::::::::::::::::ecc", +"cc::::meeeeiiiiiiiiiaggggggggbcccccccccccccccccccccccccccccccccccccccce::::bccccccccccce:::::gccccg::::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::meeeeeeeeeiiiiiiiiigggggggggkcccd::::#cccccccccccd::::eccccce::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::mkcccccccccccl:::gccccg:::::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::nccccccccccci..eccccce:::::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::meeeeeeeeoiiiiiiiingggggggm:::lccccccccccckm.gccccg::::::::::::::::::::::::::::ecc", +"cc:::::::::eeeeeeeeoiiiiiiiinggggggggjcccccccccccccccccccccccccccccccccc#::::dccccccccccc#eccccce::::::::::::::::::::::::::::ecc", +"cc::::meeeeeiiiiiiiiiaggggggggkcccccccccccccccccccccccccccccccccccccccccb::::ecccccccccccbgccccg:::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::leeeeeeeeoiiiiiiiiigggggggggkccccco::::gccccccccccccccccl:::::::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#cccccccccccccccd::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::bccccccccccccccl::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::leeeeeeeeeiiiiiiiiiagggggggi::::icccccccccccccd:::::::::::::::::::::::::::::::ecc", +"cc::::::::feeeeeeee#iiiiiiiingggggggggkccccccccccccccccccccccccccccccccccckm:::mkccccccccccccl:::::::::::::::::::::::::::::::ecc", +"cc::::meeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccccccccccci::::dccccccccccca::::::::::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::leeeeeeeeoiiiiiiiiigggggggggccccccck::::lccccccccccckm:::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::accccccccccc#:::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecccccccccccb:::::::::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::leeeeeeeeeiiiiiiiiiaggggggggbcce::::bccccccccccce::::::::::::::::::::::::::::::ecc", +"cc:::::::feeeeeeee#iiiiiiiiigggggggggkcccccccccccccccccccccccccccccccccccccccd::::#cccccccccccg::::::::::::::::::::::::::::::ecc", +"cc::::meeeeeeoiiiiiiiingggggggggccccccccccccccccccccccccccccccccccccccccccccccl::::kcccccccccccl:::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::feeeeeeeehiiiiiiiidggggggggbccccccccci::::ncccccccccccd:::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::mm::::bccccccccccccm::::::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#ccccccccccccci::::::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::leeeeeeee#iiiiiiiidggggggggbcccccl::::bccccccccccccck::::::::::::::::::::::::::::ecc", +"cc::::::feeeeeeeehiiiiiiiiaggggggggkccccccccccccccccccccccccccccccccccccccccd::::#ccccccccccccccc#:::::::::::::::::::::::::::ecc", +"cc::::meeeeeee#iiiiiiiidggggggggjcccccccccccccccccccccccccccccccccccccccccccl::::bcccccccccccccccb:::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::meeeeeeeeeiiiiiiiiigggggggggkcccccd::::#cccccbccccccccccce::::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::bccccdhcccccccccccg::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#ccccclmkcccccccccccl:::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::meeeeeeeeeiiiiiiiiiaggggggggbkm::::bccccd..ncccccccccccd:::::::::::::::::::::::::ecc", +"cc:::::leeeeeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccccci::::hcccckl..lccccccccccccm::::::::::::::::::::::::ecc", +"cc::::meeeeeeeehiiiiiiiidggggggggbcccccccccccccccccccccccccccccccccccccckm:::mkcccci::::dccccccccccci::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::leeeeeeee#iiiiiiiinggggggggjcci::::icccckm::::eccccccccccck::::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::mkcccci::::::gccccccccccc#:::::::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::icccckm::::::#cccccccccccb:::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::leeeeeeeeoiiiiiiiiigggggggga::::mkcccci::::::::bccccccccccce::::::::::::::::::::::ecc", +"cc::::meeeeeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccci::::icccckm::::::::hcccccccccccg::::::::::::::::::::::ecc", +"cc:::::feeeeeeeehiiiiiiiiaggggggggkcccccccccccccccccccccccccccccccccckm:::mkcccci:::::::::mkcccccccccccl:::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::feeeeeeeehiiiiiiiiagggggggh::::icccckm::::::::::icccccccccccd:::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::mkcccci:::::::::::lccccccccccccm::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::icccckm::::::::::::dccccccccccci::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::eeeeeeeeehiiiiiiiidggga::::mkcccci:::::::::::::fccccccccccck::::::::::::::::::::ecc", +"cc::::::feeeeeeee#iiiiiiiingggggggggccccccccccccccccccccccccccccccci::::iccccb:::::::::::::::gccccccccccc#:::::::::::::::::::ecc", +"cc::::meeeeeeeoiiiiiiiiigggggggggbcccccccccccccccccccccccccccccccckm:::mkcccc#:::::::::::::::occcccccccccb:::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::meeeeeeeeeiiiiiiiiidgggg#::::iccccb:::::::::::::::::bccccccccccce::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::mkcccc#:::::::::::::::::#cccccccccccg::::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::iccccb::::::::::::::::::mkcccccccccccl:::::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::eeeeeeeeeiiiiiiiiiaga::::mkcccc#:::::::::::::::::::icccccccccccd:::::::::::::::::ecc", +"cc:::::leeeeeeee#iiiiiiiinggggggggjccccccccccccccccccccccccccccci::::iccccb::::::::::::::::::::lccccccccccccm::::::::::::::::ecc", +"cc::::meeeeeeee#iiiiiiiiigggggggggkcccccccccccccccccccccccccccckm:::mkcccc#:::::::::::::::::::::dccccccccccci::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::leeeeeeeeoiiiiiiiiiah::::iccccb::::::::::::::::::::::lccccccccccck::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::mkcccc#:::::::::::::::::::::::gccccccccccc#:::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::dccccj::::::::::::::::::::::::ecccccccccccj:::::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::leeeeeeeeeiiiiiiih::::lccccce:::::::::::::::::::::::::bccccccccccce::::::::::::::ecc", +"cc::::meeeeeeeeeiiiiiiiiidgggggggggcccccccccccccccccccccccccci::::dccccg::::::::::::::::::::::::::#ccccccccccca::::::::::::::ecc", +"cc:::::feeeeeeeeiiiiiiiinggggggggbcccccccccccccccccccccccccckm:::lccccce:::::::::::::::::::::::::::kcccccccccccl:::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::leeeeeeeehiiiiiiiih::::dccccg::::::::::::::::::::::::::::ncccccccccccd:::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::lccccce::::::::::::::::::::::::::::fccccccccccccf::::::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::dccccb::::::::::::::::::::::::::::::jcccccccccccg::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::meeeeeeeeoiiiiil::::lcccccn::::::::::::::::::::::::::::::icccccccccccce:::::::::::ecc", +"cc::::::feeeeeeeehiiiiiiiigggggggggccccccccccccccccjgggggo:::::gccccc#::::::::::::::::::::::::::::::eccccccccccccbm::::::::::ecc", +"cc::::meeeeeeeoiiiiiiiiidgggggggggccccccccccccccccc:::::::::::hcccccco:::::::::::::::::::::::::::::::cccccccccccccn::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::leeeeeee::::::::::ecccccccn::::::::::::::::::::::::::::::lcccccccccccccc#:::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#kccccccckf:::::::::::::::::::::::::::::nccccccccccccccc#::::::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::::::::::::::::::ldcccccccccck#m:::::::::::::::::::::::::lncccccccccccccccccdl::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::feeeeeee::::ogjcccccccccccccccggi::::::::::::::::::oggbcccccccccccccccccccccja::::ecc", +"cc:::::leeeeeeee#iiiiiiiidggggggggbcccccccccccccccc::::icccccccccccccccccccg::::::::::::::::::icccccccccccccccccccccccccc::::ecc", +"cc::::meeeeeeeehiiiiiiiiaggggggggkccccccccccccccccc::::icccccccccccccccccccg::::::::::::::::::icccccccccccccccccccccccccc::::ecc", +"cc::::::::::::::::::::::::::::::::::::::::feeeeeeee::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cc:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ecc", +"cce::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::hcc", +"ccn::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::acb", +"jcb:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::lcca", +"hcci::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::acc#", +"mkcc#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::dccb.", +".occci:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::macccf.", +"..#cccbne:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::menkccc#..", "...okccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccbe...", "....mhjccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccg#....."}; -- 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 25c7f02523520beb73a34f7345b00277f6f5696b Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Apr 14 03:09:33 2018 +0200 Use basename() to derive nxagentProgName cleanly. --- nx-X11/programs/Xserver/hw/nxagent/Args.c | 7 +++++-- nx-X11/programs/Xserver/hw/nxagent/Init.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index cdcde12..949892f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -40,6 +40,7 @@ is" without express or implied warranty. #include <stdio.h> #include <string.h> #include <errno.h> +#include <libgen.h> #ifdef __sun #include <strings.h> @@ -125,7 +126,7 @@ extern int _XGetBitsPerPixel(Display *dpy, int depth); extern char dispatchExceptionAtReset; -const char *nxagentProgName; +char *nxagentProgName; char nxagentDisplayName[NXAGENTDISPLAYNAMELENGTH]; Bool nxagentSynchronize = False; @@ -188,7 +189,9 @@ int ddxProcessArgument(int argc, char *argv[], int i) * Ensure that the options are set to their defaults. */ - nxagentProgName = argv[0]; + char *basec = strdup(argv[0]); + nxagentProgName = strdup(basename(basec)); + free(basec); /* * Check if we running as X2Go Agent diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index 01acbbc..d95c4b7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -194,7 +194,7 @@ int nxagentX2go; void checkX2goAgent(void) { - extern const char *nxagentProgName; + extern char *nxagentProgName; if( strcasecmp(nxagentProgName,"x2goagent") == 0) { fprintf(stderr, "\nrunning as X2Go Agent\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 6b2033bd2c1ae12b91127d26d3f99d8299f6495e Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Sep 24 21:03:15 2018 +0200 nxagent: use nxagentWMIsRunning as Bool all over the place has been used as integer sometimes (technically correct, but not nice) Fixes ArcticaProject/nx-libs#698 --- nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 6 +++--- nx-X11/programs/Xserver/hw/nxagent/Events.c | 10 +++++----- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Window.c | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c index 1e9a4bd..c36c38e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c @@ -106,7 +106,7 @@ static void catchAndRedirect(Display* dpy, XErrorEvent* X) X -> request_code == X_ChangeWindowAttributes && X -> resourceid == DefaultRootWindow(dpy)) { - nxagentWMIsRunning = TRUE; + nxagentWMIsRunning = True; } else { @@ -122,7 +122,7 @@ static void startWMDetection(void) * window. */ - nxagentWMIsRunning = FALSE; + nxagentWMIsRunning = False; previousErrorHandler = XSetErrorHandler((XErrorHandler)&catchAndRedirect); @@ -166,7 +166,7 @@ static void finishWMDetection(Bool verbose) void nxagentWMDetect() { Bool verbose = False; - int windowManagerWasRunning = nxagentWMIsRunning; + Bool windowManagerWasRunning = nxagentWMIsRunning; startWMDetection(); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 071e93b..c0263cc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2046,7 +2046,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was * event that would trigger xinerama updates. So we do that once * the nxagent window gets mapped. */ - if (nxagentWMIsRunning == 0 && + if (!nxagentWMIsRunning && X.xmap.window == nxagentDefaultWindows[nxagentScreen(X.xmap.window)->myNum]) { nxagentChangeScreenConfig(nxagentScreen(X.xmap.window)->myNum, nxagentOption(Width), @@ -2767,7 +2767,7 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) if (X -> xclient.window == (nxagentOption(Fullscreen) ? nxagentIconWindow : nxagentDefaultWindows[0]) || - nxagentWMIsRunning == 0) + !nxagentWMIsRunning) { *result = doCloseSession; } @@ -3353,7 +3353,7 @@ int nxagentHandleConfigureNotify(XEvent* X) * by the window manager are relevant, see ICCCM Chapter 4, * "Configuring the Window" */ - Bool updatePos = (nxagentWMIsRunning == 0 || X -> xconfigure.send_event != 0); + Bool updatePos = (!nxagentWMIsRunning || X -> xconfigure.send_event != 0); int newX = X -> xconfigure.x; int newY = X -> xconfigure.y; @@ -3395,7 +3395,7 @@ int nxagentHandleConfigureNotify(XEvent* X) count++; #endif - if (nxagentWMIsRunning == 0 || X -> xconfigure.send_event) + if (!nxagentWMIsRunning || X -> xconfigure.send_event) { updatePos = True; newX = X -> xconfigure.x; @@ -3626,7 +3626,7 @@ int nxagentHandleReparentNotify(XEvent* X) return 1; } - else if (nxagentWMIsRunning == 1 && nxagentOption(Fullscreen) == 0 && + else if (nxagentWMIsRunning && nxagentOption(Fullscreen) == 0 && nxagentOption(WMBorderWidth) == -1) { XlibWindow w; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 9a6cbf2..6d15f20 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -402,7 +402,7 @@ void nxagentDisconnectSession(void) nxagentDisconnectAllGCs(); nxagentDisconnectDisplay(); - nxagentWMIsRunning = 0; + nxagentWMIsRunning = False; #ifdef TEST fprintf(stderr, "nxagentDisconnectSession: Disconnection completed. SigHup is [%d]. IoError is [%d].\n", diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index b5aabf8..8df5ec5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -977,7 +977,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, * fullscreen mode. */ - if (nxagentOption(Rootless) == False && nxagentWMIsRunning == False) + if (nxagentOption(Rootless) == False && !nxagentWMIsRunning) { #ifdef TEST fprintf(stderr, "nxagentOpenScreen: Forcing fullscreen mode with no window manager running.\n"); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 5373d48..bde1c7d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -762,7 +762,7 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) isItTimeToYield = 1; - if (nxagentWMIsRunning == 0) + if (!nxagentWMIsRunning) { #ifdef WARNING fprintf(stderr, "Warning: Can't switch to window mode, no window manager " @@ -2552,7 +2552,7 @@ void nxagentMapDefaultWindows(void) * Windows client. */ - if (nxagentOption(Shadow) == 0 || nxagentWMIsRunning == 0) + if (nxagentOption(Shadow) == 0 || !nxagentWMIsRunning) { #ifdef TEST fprintf(stderr, "nxagentMapDefaultWindows: Mapping default window id [%ld].\n", @@ -2561,7 +2561,7 @@ void nxagentMapDefaultWindows(void) XMapWindow(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum]); - if (nxagentOption(Fullscreen) == 1 && nxagentWMIsRunning == 1) + if (nxagentOption(Fullscreen) == 1 && nxagentWMIsRunning) { nxagentMaximizeToFullScreen(pScreen); } -- 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 c478ba2937b6a7e6c55b615ddeac3ca525f6a743 Merge: d3bbca7 da9d1a5 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Oct 22 14:17:04 2018 +0200 Merge branch 'uli42-pr/fix_bigrequests' into 3.6.x Attributes GH PR #729: https://github.com/ArcticaProject/nx-libs/pull/729 nx-X11/programs/Xserver/os/io.c | 4 +++- 1 file changed, 3 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 f91f02d9d0cff938e9d50770de2071d366d7095f Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Sep 24 21:19:08 2018 +0200 Pixmap.c: use some Bools as Bools not integers --- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c index 421e023..be154f9 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c @@ -860,10 +860,10 @@ void nxagentReconnectPixmap(void *p0, XID x1, void *p2) Bool *pBool = (Bool*) p2; nxagentPrivPixmapPtr pPixmapPriv; - if (*pBool == 0 || pPixmap == NULL || + if (!*pBool || pPixmap == NULL || NXDisplayError(nxagentDisplay) == 1) { - *pBool = 0; + *pBool = False; #ifdef TEST fprintf(stderr, "nxagentReconnectPixmap: Ignoring pixmap at [%p] while " @@ -929,7 +929,7 @@ void nxagentReconnectPixmap(void *p0, XID x1, void *p2) nxagentSplitTrap = 0; - if (*pBool == 0) + if (!*pBool) { #ifdef PANIC fprintf(stderr, "nxagentReconnectPixmap: PANIC! Failed to synchronize the pixmap.\n"); @@ -1035,7 +1035,7 @@ static void nxagentCheckOnePixmapIntegrity(void *p0, XID x1, void *p2) PixmapPtr pPixmap = (PixmapPtr) p0; Bool *pBool = (Bool*) p2; - if (*pBool == False) + if (!*pBool) { return; } @@ -1065,7 +1065,7 @@ static void nxagentCheckOnePixmapIntegrity(void *p0, XID x1, void *p2) Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap) { - Bool integrity = 1; + Bool integrity = True; XImage *image; char *data; int format; @@ -1121,11 +1121,11 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap) if (image != NULL && memcmp(image -> data, data, length) != 0) { - integrity = 0; + integrity = False; } else { - integrity = 1; + integrity = True; #ifdef TEST fprintf(stderr, "nxagentCheckPixmapIntegrity: Pixmap at [%p] has been realized. " @@ -1135,7 +1135,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap) #ifdef WARNING - if (integrity == 0) + if (!integrity) { int i; -- 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 1a8c4532e6640e20eba772c0e4f8f36b933c66ae Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Sep 24 21:08:18 2018 +0200 nxagent: use nxagentWMPassed as Bool all over the place has been used as integer sometimes (technically correct, but not nice) --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 5cfa927..22d5f19 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -142,7 +142,7 @@ void nxagentWaitDisplay(void); void nxagentListRemoteFonts(const char *, int); unsigned int nxagentWMtimeout = 0; -Bool nxagentWMPassed = 0; +Bool nxagentWMPassed = False; /* * Timeouts based on screen saver time. diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 8df5ec5..d8cf695 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -3057,7 +3057,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr if (result == 1) { - if (nxagentWMPassed == 0) + if (!nxagentWMPassed) { nxagentRemoveSplashWindow(NULL); } -- 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 1584395554707c75599f58c2bf8dfd3434053e13 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Sep 24 21:47:28 2018 +0200 Window.c: improve Bool usage --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index bde1c7d..55eeaa0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -310,7 +310,7 @@ Bool nxagentCreateWindow(pWin) /* FIXME: We need to set save under on the real display? */ - if (nxagentSaveUnder == True) + if (nxagentSaveUnder) { mask |= CWSaveUnder; attributes.save_under = False; @@ -749,7 +749,7 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) return; } - if (switchOn == 0) + if (!switchOn) { nxagentWMDetect(); @@ -793,7 +793,7 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) XSendEvent(nxagentDisplay, DefaultRootWindow(nxagentDisplay), False, SubstructureRedirectMask, &e); - if (switchOn == 1) + if (switchOn) { nxagentFullscreenWindow = nxagentDefaultWindows[pScreen -> myNum]; @@ -2683,7 +2683,7 @@ void nxagentDisconnectWindow(void * p0, XID x1, void * p2) nxagentDisconnectCursor(pCursor, (XID)0, pBool); - if (*pBool == False) + if (!*pBool) { #ifdef WARNING fprintf(stderr, "nxagentDisconnectWindow: WARNING failed disconnection of cursor at [%p]" @@ -2937,7 +2937,7 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer /* FIXME: Do we need to set save unders attribute here? */ - if (nxagentSaveUnder == True) + if (nxagentSaveUnder) { mask |= CWSaveUnder; attributes.save_under = pWin->saveUnder; -- 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 67432ac25901bd56a13a3c8885be796f39918880 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Sep 24 21:24:49 2018 +0200 Render.c: improve Bool usage --- nx-X11/programs/Xserver/hw/nxagent/Render.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index b58a16f..9d91b1f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -2784,7 +2784,7 @@ void nxagentReconnectGlyphSet(void* p0, XID x1, void *p2) Bool nxagentReconnectAllGlyphSet(void *p) { - Bool success = TRUE; + Bool success = True; int i; nxagentQueryFormats(); @@ -2826,7 +2826,7 @@ void nxagentReconnectPicture(void * p0, XID x1, void *p2) * and that the involved objects are valid. */ - if (*pBool == 0 || pPicture == NULL || + if (!*pBool || pPicture == NULL || nxagentPicture(pPicture) != 0) { return; @@ -2959,7 +2959,7 @@ Bool nxagentReconnectAllPicture(void *p) fprintf(stderr, "nxagentReconnectAllPicture: Going to recreate all pictures.\n"); #endif - for (i = 0, r = 1; i < MAXCLIENTS; i++) + for (i = 0, r = True; i < MAXCLIENTS; i++) { if (clients[i]) { @@ -2967,7 +2967,7 @@ Bool nxagentReconnectAllPicture(void *p) #ifdef WARNING - if (r == False) + if (!r) { fprintf(stderr, "nxagentReconnectAllPicture: WARNING! Failed to recreate " "picture for client [%d].\n", i); @@ -3015,7 +3015,7 @@ Bool nxagentDisconnectAllPicture(void) fprintf(stderr, "nxagentDisconnectAllPicture.\n"); #endif - for (i = 0, r = 1; i < MAXCLIENTS; i++) + for (i = 0, r = True; i < MAXCLIENTS; i++) { if (clients[i]) { @@ -3023,7 +3023,7 @@ Bool nxagentDisconnectAllPicture(void) #ifdef WARNING - if (r == False) + if (!r) { fprintf(stderr, "nxagentDisconnectAllPicture: WARNING! Failed to disconnect " "picture for client [%d].\n", i); -- 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 7b8aef83ab2ac6c0b059064951e03f0bb18b5e77 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Sep 24 21:36:50 2018 +0200 nxagentInitAndCheckVisuals: adapt bool usage to match the previous function One question remains: why are we using "bool" instead of "Bool" here? --- nx-X11/programs/Xserver/hw/nxagent/Display.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 3ca3db2..448969d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -2492,12 +2492,10 @@ static int nxagentInitAndCheckVisuals(int flexibility) long viMask; int i, n; - int matched; - int compatible; + bool matched; + bool compatible = true; int viNumList; - compatible = 1; - viMask = VisualScreenMask; viTemplate.screen = DefaultScreen(nxagentDisplay); viTemplate.depth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay)); @@ -2507,7 +2505,7 @@ static int nxagentInitAndCheckVisuals(int flexibility) for (i = 0; i < nxagentNumVisuals; i++) { - matched = 0; + matched = false; for (n = 0; n < viNumList; n++) { @@ -2528,7 +2526,7 @@ FIXME: Should the visual be ignored in this case? #endif } - matched = 1; + matched = true; nxagentVisualHasBeenIgnored[i] = FALSE; @@ -2538,7 +2536,7 @@ FIXME: Should the visual be ignored in this case? } } - if (matched == 0) + if (!matched) { if (nxagentVisuals[i].class == DirectColor) { @@ -2564,7 +2562,7 @@ FIXME: Should the visual be ignored in this case? fprintf(stderr, "\tbits_per_rgb = %d\n", nxagentVisuals[i].bits_per_rgb); #endif - compatible = 0; + compatible = false; break; } @@ -2573,7 +2571,7 @@ FIXME: Should the visual be ignored in this case? XFree(viList); - if (compatible == 1) + if (compatible) { #ifdef TEST fprintf(stderr, "nxagentInitAndCheckVisuals: New visuals match with old visuals.\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 7f7895ee5674bf2bd507632408432cd5bd7090e3 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Sep 24 21:47:45 2018 +0200 Window.c: remove useless code --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 55eeaa0..d25424d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -2725,8 +2725,6 @@ Bool nxagentReconnectAllWindows(void *p0) { int flexibility = *(int *) p0; - flexibility = flexibility; - #if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_WINDOW_DEBUG) fprintf(stderr, "nxagentReconnectAllWindows\n"); #endif @@ -2845,8 +2843,6 @@ Bool nxagentSetWindowCursors(void *p0) { int flexibility = *(int *) p0; - flexibility = flexibility; - #if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_WINDOW_DEBUG) fprintf(stderr, "nxagentSetWindowCursors: Going to loop over the windows.\n"); #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 450760bcafc8d2a708b9f6087f3c0c2cdab046a8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Sep 24 21:49:23 2018 +0200 Events.c: improve Bool usage --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index c0263cc..94480c4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -373,7 +373,7 @@ void nxagentRemoteWindowID(Window window, Bool newline) } } - if (newline == TRUE) + if (newline) { fprintf(stderr, "\n"); } @@ -411,7 +411,7 @@ void nxagentRemoteWindowInfo(Window win, int indent, Bool newLine) (attributes.override_redirect == 0) ? "No" : "Yes" ); - if (newLine == TRUE) + if (newLine) { fprintf(stderr, "\n"); } @@ -537,7 +537,7 @@ void nxagentInternalWindowInfo(WindowPtr pWin, int indent, Bool newLine) (pWin -> overrideRedirect == 0) ? "No" : "Yes"); - if (newLine == TRUE) + if (newLine) { fprintf(stderr, "\n"); } @@ -4061,8 +4061,7 @@ void nxagentHandleCollectPropertyEvent(XEvent *X) nxagentImportProperty(window, property, atomReturnType, resultFormat, ulReturnItems, ulReturnBytesLeft, pszReturnData); } - - if (result == 0) + else { #ifdef DEBUG fprintf (stderr, "nxagentHandleCollectPropertyEvent: Failed to get reply data for client [%d].\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 7392dd6a9b550538a5b7f2aa5204c805c15a9d6a Merge: c478ba2 450760b Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Oct 22 14:35:08 2018 +0200 Merge branch 'uli42-pr/cleanup_wmisrunning' into 3.6.x Attributes GH PR #728: https://github.com/ArcticaProject/nx-libs/pull/728 nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 6 +++--- nx-X11/programs/Xserver/hw/nxagent/Display.c | 16 +++++++--------- nx-X11/programs/Xserver/hw/nxagent/Events.c | 19 +++++++++---------- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 16 ++++++++-------- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Render.c | 12 ++++++------ nx-X11/programs/Xserver/hw/nxagent/Screen.c | 4 ++-- nx-X11/programs/Xserver/hw/nxagent/Window.c | 20 ++++++++------------ 9 files changed, 45 insertions(+), 52 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 71abe0bebc85e839bf8cd67ad1d6f9cf0a9a5a96 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Oct 21 23:54:10 2018 +0200 enable CLIENTIDS functions in xserver these can be used to determine the PID and name of an X11 client, e.g. in debugging. --- nx-X11/config/cf/xorg.cf | 2 +- nx-X11/programs/Xserver/include/os.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf index 578d82a..6f1f430 100644 --- a/nx-X11/config/cf/xorg.cf +++ b/nx-X11/config/cf/xorg.cf @@ -594,7 +594,7 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 #ifndef XFree86ServerOSDefines # define XFree86ServerOSDefines -DDDXOSINIT -DSERVER_LOCK -DDDXOSFATALERROR \ - -DDDXOSVERRORF + -DDDXOSVERRORF -DCLIENTIDS #endif #ifndef XFree86ConsoleDefines diff --git a/nx-X11/programs/Xserver/include/os.h b/nx-X11/programs/Xserver/include/os.h index be41e01..920b474 100644 --- a/nx-X11/programs/Xserver/include/os.h +++ b/nx-X11/programs/Xserver/include/os.h @@ -557,4 +557,10 @@ extern int snprintf(char *str, size_t size, const char *format, ...) extern int vsnprintf(char *str, size_t size, const char *format, va_list ap); #endif +#ifdef DEBUG +#define DebugF ErrorF +#else +#define DebugF(...) /* */ +#endif + #endif /* OS_H */ -- 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 97f768a26f19a730155fc73efdfe737cefee3462 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Oct 21 23:53:42 2018 +0200 X11.tmpl: whitespace fix --- nx-X11/config/cf/X11.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index b7f9a60..a5349e0 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -633,7 +633,7 @@ FCHOWN_DEFINES = -DHAS_FCHOWN XvMCExtensionDefines \ GlxDefines \ SiteExtensionDefines \ - XResExtensionDefines + XResExtensionDefines #endif #define ExtensionDefines BaseExtensionDefines ExtensionOSDefines #endif /* ExtensionDefines */ -- 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 701e702a121029098a6123bee9e43a9b81f4b3d9 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Oct 22 22:44:23 2018 +0200 libNX_X11: upgrade to X.org upstream version 1.6.7 This commit is the only change between Xorg's libX11 1.6.6 and 1.6.7 that affects our code. So were are effectively now on par with libX11 1.6.7 (commit f3c978476e0be6813268af494efb7ac507451116) From: Bhavi Dhingra <b.dhingra@samsung.com> Date: Mon, 28 Sep 2015 08:33:40 +0000 Subject: [PATCH] XcmsLookupColor: fully initialize XColor structs passed to _XColor_to_XcmsRGB Fixes https://gitlab.freedesktop.org/xorg/lib/libx11/issues/44 aka https://bugs.freedesktop.org/show_bug.cgi?id=92154 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> --- nx-X11/lib/src/xcms/cmsLkCol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nx-X11/lib/src/xcms/cmsLkCol.c b/nx-X11/lib/src/xcms/cmsLkCol.c index 15e9874..a81c4cb 100644 --- a/nx-X11/lib/src/xcms/cmsLkCol.c +++ b/nx-X11/lib/src/xcms/cmsLkCol.c @@ -76,7 +76,8 @@ XcmsLookupColor ( register int n; xLookupColorReply reply; register xLookupColorReq *req; - XColor def, scr; + XColor def = {0,}; + XColor scr = {0,}; /* * 0. Check for invalid arguments. -- 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 e1938c189223164f3a75cf848e90ecc1d2e55d15 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Aug 22 22:30:34 2018 +0200 libNX_X11: upgrade to X.org upstream version 1.6.6 We are at X.Org libX11 upstream commit 733f64b Fixes: ArcticaProject/nx-libs #716, #719 and #720 --- nx-X11/lib/include/X11/Xlibint.h | 125 +++++++++++++++++++++++++++++- nx-X11/lib/modules/im/ximcp/imCallbk.c | 6 +- nx-X11/lib/modules/im/ximcp/imDefIc.c | 82 +++++++++++++------- nx-X11/lib/modules/im/ximcp/imInsClbk.c | 2 +- nx-X11/lib/modules/im/ximcp/imLcIm.c | 8 +- nx-X11/lib/modules/im/ximcp/imLcLkup.c | 6 +- nx-X11/lib/modules/om/generic/omGeneric.c | 32 +++----- nx-X11/lib/src/DisName.c | 2 +- nx-X11/lib/src/FSWrap.c | 2 +- nx-X11/lib/src/FontNames.c | 16 +--- nx-X11/lib/src/GetFPath.c | 11 ++- nx-X11/lib/src/GetImage.c | 16 ++-- nx-X11/lib/src/LiHosts.c | 19 +++-- nx-X11/lib/src/ListExt.c | 19 ++--- nx-X11/lib/src/SetHints.c | 4 +- nx-X11/lib/src/StColor.c | 1 + nx-X11/lib/src/StColors.c | 1 + nx-X11/lib/src/StrKeysym.c | 10 +-- nx-X11/lib/src/XlibInt.c | 86 ++++++++++---------- nx-X11/lib/src/xcms/LRGB.c | 3 + nx-X11/lib/src/xcms/cmsColNm.c | 2 +- nx-X11/lib/src/xcms/cmsProp.c | 1 + nx-X11/lib/src/xkb/XKBAlloc.c | 8 +- nx-X11/lib/src/xlibi18n/lcCT.c | 10 +-- nx-X11/lib/src/xlibi18n/lcDB.c | 2 +- nx-X11/lib/src/xlibi18n/lcGeneric.c | 1 + nx-X11/lib/src/xlibi18n/lcPublic.c | 1 + 27 files changed, 311 insertions(+), 165 deletions(-) diff --git a/nx-X11/lib/include/X11/Xlibint.h b/nx-X11/lib/include/X11/Xlibint.h index b325182..d38c87e 100644 --- a/nx-X11/lib/include/X11/Xlibint.h +++ b/nx-X11/lib/include/X11/Xlibint.h @@ -63,6 +63,7 @@ from The Open Group. * Warning, there be dragons here.... */ +#include <stdint.h> #include <nx-X11/Xlib.h> #include <nx-X11/Xproto.h> /* to declare xEvent */ #include <nx-X11/XlibConf.h> /* for configured options like XTHREADS */ @@ -231,10 +232,122 @@ struct _XDisplay XGenericEventCookie * /* in */, XGenericEventCookie * /* out*/); void *cookiejar; /* cookie events returned but not claimed */ +#ifndef LONG64 + unsigned long last_request_read_upper32bit; + unsigned long request_upper32bit; +#endif }; #define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n) +/* + * access "last_request_read" and "request" with 64bit + * warning: the value argument of the SET-macros must not + * have any side-effects because it may get called twice. + */ +#ifndef LONG64 +/* accessors for 32-bit unsigned long */ + +#define X_DPY_GET_REQUEST(dpy) \ + ( \ + ((uint64_t)(((struct _XDisplay*)dpy)->request)) \ + + (((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) << 32) \ + ) + +#define X_DPY_SET_REQUEST(dpy, value) \ + ( \ + (((struct _XDisplay*)dpy)->request = \ + (value) & 0xFFFFFFFFUL), \ + (((struct _XDisplay*)dpy)->request_upper32bit = \ + ((uint64_t)(value)) >> 32), \ + (void)0 /* don't use the result */ \ + ) + +#define X_DPY_GET_LAST_REQUEST_READ(dpy) \ + ( \ + ((uint64_t)(((struct _XDisplay*)dpy)->last_request_read)) \ + + ( \ + ((uint64_t)( \ + ((struct _XDisplay*)dpy)->last_request_read_upper32bit \ + )) << 32 \ + ) \ + ) + +#define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \ + ( \ + (((struct _XDisplay*)dpy)->last_request_read = \ + (value) & 0xFFFFFFFFUL), \ + (((struct _XDisplay*)dpy)->last_request_read_upper32bit = \ + ((uint64_t)(value)) >> 32), \ + (void)0 /* don't use the result */ \ + ) + +/* + * widen a 32-bit sequence number to a 64 sequence number. + * This macro makes the following assumptions: + * - ulseq refers to a sequence that has already been sent + * - ulseq means the most recent possible sequence number + * with these lower 32 bits. + * + * The following optimization is used: + * The comparison result is taken a 0 or 1 to avoid a branch. + */ +#define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) \ + ( \ + ((uint64_t)ulseq) \ + + \ + (( \ + ((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) \ + - (uint64_t)( \ + (ulseq) > (((struct _XDisplay*)dpy)->request) \ + ) \ + ) << 32) \ + ) + +#define X_DPY_REQUEST_INCREMENT(dpy) \ + ( \ + ((struct _XDisplay*)dpy)->request++, \ + ( \ + (((struct _XDisplay*)dpy)->request == 0) ? ( \ + ((struct _XDisplay*)dpy)->request_upper32bit++ \ + ) : 0 \ + ), \ + (void)0 /* don't use the result */ \ + ) + + +#define X_DPY_REQUEST_DECREMENT(dpy) \ + ( \ + ( \ + (((struct _XDisplay*)dpy)->request == 0) ? (\ + ((struct _XDisplay*)dpy)->request--, /* wrap */ \ + ((struct _XDisplay*)dpy)->request_upper32bit-- \ + ) : ( \ + ((struct _XDisplay*)dpy)->request-- \ + ) \ + ), \ + (void)0 /* don't use the result */ \ + ) + +#else +/* accessors for 64-bit unsigned long */ +#define X_DPY_GET_REQUEST(dpy) \ + (((struct _XDisplay*)dpy)->request) +#define X_DPY_SET_REQUEST(dpy, value) \ + ((struct _XDisplay*)dpy)->request = (value) + +#define X_DPY_GET_LAST_REQUEST_READ(dpy) \ + (((struct _XDisplay*)dpy)->last_request_read) +#define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \ + ((struct _XDisplay*)dpy)->last_request_read = (value) + +#define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) ulseq + +#define X_DPY_REQUEST_INCREMENT(dpy) ((struct _XDisplay*)dpy)->request++ +#define X_DPY_REQUEST_DECREMENT(dpy) ((struct _XDisplay*)dpy)->request-- +#endif + + #ifndef _XEVENT_ /* * _QEvent datatype for use in input queueing. @@ -484,12 +597,13 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len); * GetEmptyReq is for those requests that have no arguments * at all. */ + #define GetEmptyReq(name, req) \ req = (xReq *) _XGetRequest(dpy, X_##name, SIZEOF(xReq)) /* * MakeBigReq sets the CARD16 "req->length" to 0 and inserts a new CARD32 - * length, after req->length, before the data in the request. The new length + * length, after req->length, before the data in the request. The new length * includes the "n" extra 32-bit words. * * Do not use MakeBigReq if there is no data already in the request. @@ -524,7 +638,7 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len); * or by "badlen" if "n" is too large. * * Do not use SetReqLen if "req" does not already have data after the - * xReq header. req->length must already be >= 2. + * xReq header. req->length must already be >= 2. */ #ifndef __clang_analyzer__ #define SetReqLen(req,n,badlen) \ @@ -563,7 +677,7 @@ extern void _XFlushGCCache(Display *dpy, GC gc); dpy->bufptr += ((len) + 3) & ~3;\ } else\ _XSend(dpy, data, len);\ - } +} #endif /* DataRoutineIsProcedure */ @@ -701,6 +815,11 @@ typedef struct _XInternalAsync { XPointer data; } _XAsyncHandler; +/* + * This struct is part of the ABI and is defined by value + * in user-code. This means that we cannot make + * the sequence-numbers 64bit. + */ typedef struct _XAsyncEState { unsigned long min_sequence_number; unsigned long max_sequence_number; diff --git a/nx-X11/lib/modules/im/ximcp/imCallbk.c b/nx-X11/lib/modules/im/ximcp/imCallbk.c index 4e091d8..ead0806 100644 --- a/nx-X11/lib/modules/im/ximcp/imCallbk.c +++ b/nx-X11/lib/modules/im/ximcp/imCallbk.c @@ -624,16 +624,16 @@ _XimPreeditCaretCallback(Xim im, */ { CARD8 buf[sz_ximPacketHeader + sz_ximPreeditCaretReply]; - INT16 len = sz_XIMID + sz_XICID + sz_ximPreeditCaretReply; + INT16 rlen = sz_XIMID + sz_XICID + sz_ximPreeditCaretReply; int p; - _XimSetHeader((XPointer)buf, XIM_PREEDIT_CARET_REPLY, 0, &len); + _XimSetHeader((XPointer)buf, XIM_PREEDIT_CARET_REPLY, 0, &rlen); p = XIM_HEADER_SIZE; *(CARD16*)&buf[p] = (CARD16)im->private.proto.imid; p += sz_CARD16; *(CARD16*)&buf[p] = (CARD16)ic->private.proto.icid; p += sz_CARD16; *(CARD32*)&buf[p] = (CARD32)cbs.position; - if (!(_XimWriteData(im, len, buf))) { + if (!(_XimWriteData(im, rlen, buf))) { return XimCbError; } _XimFlushData(im); diff --git a/nx-X11/lib/modules/im/ximcp/imDefIc.c b/nx-X11/lib/modules/im/ximcp/imDefIc.c index 3cf4682..30c2d01 100644 --- a/nx-X11/lib/modules/im/ximcp/imDefIc.c +++ b/nx-X11/lib/modules/im/ximcp/imDefIc.c @@ -231,10 +231,9 @@ _XimReCreateIC(ic) _XimRegisterFilter(ic); MARK_IC_CONNECTED(ic); - if (save_ic->private.proto.ic_resources) - Xfree(save_ic->private.proto.ic_resources); - if (save_ic->private.proto.ic_inner_resources) - Xfree(save_ic->private.proto.ic_inner_resources); + + Xfree(save_ic->private.proto.ic_resources); + Xfree(save_ic->private.proto.ic_inner_resources); Xfree(save_ic); return True; @@ -833,7 +832,7 @@ _XimDestroyICCheck( && (imid == im->private.proto.imid) && (buf_s[2] & XIM_ICID_VALID) && (icid == ic->private.proto.icid)) - ret = False; + ret = False; return ret; } @@ -845,22 +844,22 @@ _XimProtoICFree( Xim im = (Xim)ic->core.im; #endif - if (ic->private.proto.preedit_font) { - Xfree(ic->private.proto.preedit_font); - ic->private.proto.preedit_font = NULL; - } - if (ic->private.proto.status_font) { - Xfree(ic->private.proto.status_font); - ic->private.proto.status_font = NULL; - } + + Xfree(ic->private.proto.preedit_font); + ic->private.proto.preedit_font = NULL; + + + Xfree(ic->private.proto.status_font); + ic->private.proto.status_font = NULL; + if (ic->private.proto.commit_info) { _XimFreeCommitInfo(ic); ic->private.proto.commit_info = NULL; } - if (ic->private.proto.ic_inner_resources) { - Xfree(ic->private.proto.ic_inner_resources); - ic->private.proto.ic_inner_resources = NULL; - } + + Xfree(ic->private.proto.ic_inner_resources); + ic->private.proto.ic_inner_resources = NULL; + #ifdef XIM_CONNECTABLE if (IS_SERVER_CONNECTED(im) && IS_RECONNECTABLE(im)) { @@ -868,18 +867,16 @@ _XimProtoICFree( } #endif /* XIM_CONNECTABLE */ - if (ic->private.proto.saved_icvalues) { - Xfree(ic->private.proto.saved_icvalues); - ic->private.proto.saved_icvalues = NULL; - } - if (ic->private.proto.ic_resources) { - Xfree(ic->private.proto.ic_resources); - ic->private.proto.ic_resources = NULL; - } - if (ic->core.hotkey) { - Xfree(ic->core.hotkey); - ic->core.hotkey = NULL; - } + Xfree(ic->private.proto.saved_icvalues); + ic->private.proto.saved_icvalues = NULL; + + + Xfree(ic->private.proto.ic_resources); + ic->private.proto.ic_resources = NULL; + + + Xfree(ic->core.hotkey); + ic->core.hotkey = NULL; return; } @@ -927,6 +924,30 @@ _XimProtoDestroyIC( return; } +/* + * Some functions require the request queue from the server to be flushed + * so that the ordering of client initiated status changes and those requested + * by the server is well defined. + * _XimSync() would be the function of choice here as it should get a + * XIM_SYNC_REPLY back from the server. + * This however isn't implemented in the piece of junk that is used by most + * input servers as the server side protocol if to XIM. + * Since this code is not shipped as a library together with the client side + * XIM code but is duplicated by every input server around the world there + * is no easy fix to this but this ugly hack below. + * Obtaining an IC value from the server sends a request and empties out the + * event/server request queue until the answer to this request is found. + * Thus it is guaranteed that any pending server side request gets processed. + * This is what the hack below is doing. + */ + +static void +BrokenSyncWithServer(XIC xic) +{ + CARD32 dummy; + XGetICValues(xic, XNFilterEvents, &dummy, NULL); +} + static void _XimProtoSetFocus( XIC xic) @@ -957,6 +978,7 @@ _XimProtoSetFocus( } } #endif /* XIM_CONNECTABLE */ + BrokenSyncWithServer(xic); buf_s[0] = im->private.proto.imid; /* imid */ buf_s[1] = ic->private.proto.icid; /* icid */ @@ -1003,6 +1025,8 @@ _XimProtoUnsetFocus( } #endif /* XIM_CONNECTABLE */ + BrokenSyncWithServer(xic); + buf_s[0] = im->private.proto.imid; /* imid */ buf_s[1] = ic->private.proto.icid; /* icid */ diff --git a/nx-X11/lib/modules/im/ximcp/imInsClbk.c b/nx-X11/lib/modules/im/ximcp/imInsClbk.c index 3ae6b1b..214e0a9 100644 --- a/nx-X11/lib/modules/im/ximcp/imInsClbk.c +++ b/nx-X11/lib/modules/im/ximcp/imInsClbk.c @@ -108,7 +108,7 @@ _XimFilterPropertyNotify( } lock = True; - for( ii = 0; ii < nitems; ii++, atoms ) { + for( ii = 0; ii < nitems; ii++ ) { if(XGetSelectionOwner (display, atoms[ii])) { for( icb = callback_list; icb; icb = icb->next ) { if( !icb->call && !icb->destroy ) { diff --git a/nx-X11/lib/modules/im/ximcp/imLcIm.c b/nx-X11/lib/modules/im/ximcp/imLcIm.c index b3662bc..41d4fb3 100644 --- a/nx-X11/lib/modules/im/ximcp/imLcIm.c +++ b/nx-X11/lib/modules/im/ximcp/imLcIm.c @@ -82,8 +82,8 @@ struct _XimCacheStruct { DTCharIndex mbused; DTCharIndex wcused; DTCharIndex utf8used; - char fname[1]; - /* char encoding[1] */ + char fname[]; + /* char encoding[] */ }; static struct _XimCacheStruct* _XimCache_mmap = NULL; @@ -281,7 +281,7 @@ _XimReadCachedDefaultTree( assert (m->id == XIM_CACHE_MAGIC); assert (m->version == XIM_CACHE_VERSION); if (size != m->size || - size < XOffsetOf (struct _XimCacheStruct, fname) + namelen + encodinglen) { + size < sizeof (struct _XimCacheStruct) + namelen + encodinglen) { fprintf (stderr, "Ignoring broken XimCache %s [%s]\n", name, encoding); munmap (m, size); return False; @@ -442,7 +442,7 @@ _XimWriteCachedDefaultTree( int fd; FILE *fp; struct _XimCacheStruct *m; - int msize = (XOffsetOf(struct _XimCacheStruct, fname) + int msize = (sizeof(struct _XimCacheStruct) + strlen(name) + strlen(encoding) + 2 + XIM_CACHE_TREE_ALIGNMENT-1) & -XIM_CACHE_TREE_ALIGNMENT; DefTreeBase *b = &im->private.local.base; diff --git a/nx-X11/lib/modules/im/ximcp/imLcLkup.c b/nx-X11/lib/modules/im/ximcp/imLcLkup.c index 878b8e3..ac9a170 100644 --- a/nx-X11/lib/modules/im/ximcp/imLcLkup.c +++ b/nx-X11/lib/modules/im/ximcp/imLcLkup.c @@ -61,8 +61,8 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes, ||(ic->private.local.brl_committed != 0))) { if (ic->private.local.brl_committed != 0) { /* Braille Event */ unsigned char pattern = ic->private.local.brl_committed; - char mb[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)]; - ret = _Xlcwctomb(ic->core.im->core.lcd, mb, BRL_UC_ROW | pattern); + char mb2[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)]; + ret = _Xlcwctomb(ic->core.im->core.lcd, mb2, BRL_UC_ROW | pattern); if(ret > bytes) { if(status) *status = XBufferOverflow; return(ret); @@ -74,7 +74,7 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes, } else { if(status) *status = XLookupChars; } - memcpy(buffer, mb, ret); + memcpy(buffer, mb2, ret); } else { if(keysym) { if(status) *status = XLookupKeySym; diff --git a/nx-X11/lib/modules/om/generic/omGeneric.c b/nx-X11/lib/modules/om/generic/omGeneric.c index 68eec01..ec612d3 100644 --- a/nx-X11/lib/modules/om/generic/omGeneric.c +++ b/nx-X11/lib/modules/om/generic/omGeneric.c @@ -1617,15 +1617,14 @@ free_fontdataOM( FontData font_data, int font_data_count) { + if (!font_data) + return; + for( ; font_data_count-- ; font_data++) { - if(font_data->name){ Xfree(font_data->name); font_data->name = NULL; - } - if(font_data->scopes){ Xfree(font_data->scopes); font_data->scopes = NULL; - } } } @@ -1639,51 +1638,41 @@ close_om( if ((data = gen->data)) { for (count = gen->data_num; count-- > 0; data++) { - if (data->charset_list){ Xfree(data->charset_list); data->charset_list = NULL; - } + /* free font_data for om */ - if (data->font_data) { free_fontdataOM(data->font_data,data->font_data_count); Xfree(data->font_data); data->font_data = NULL; - } + /* free substitute for om */ - if (data->substitute) { free_fontdataOM(data->substitute,data->substitute_num); Xfree(data->substitute); data->substitute = NULL; - } + /* free vmap for om */ - if (data->vmap) { free_fontdataOM(data->vmap,data->vmap_num); Xfree(data->vmap); data->vmap = NULL; - } + /* free vrotate for om */ - if (data->vrotate) { Xfree(data->vrotate); data->vrotate = NULL; - } } Xfree(gen->data); gen->data = NULL; } - if (gen->object_name){ Xfree(gen->object_name); gen->object_name = NULL; - } - if (om->core.res_name){ Xfree(om->core.res_name); om->core.res_name = NULL; - } - if (om->core.res_class){ + Xfree(om->core.res_class); om->core.res_class = NULL; - } + if (om->core.required_charset.charset_list && om->core.required_charset.charset_count > 0){ XFreeStringList(om->core.required_charset.charset_list); @@ -1692,10 +1681,9 @@ close_om( Xfree((char*)om->core.required_charset.charset_list); om->core.required_charset.charset_list = NULL; } - if (om->core.orientation_list.orientation){ + Xfree(om->core.orientation_list.orientation); om->core.orientation_list.orientation = NULL; - } Xfree(om); diff --git a/nx-X11/lib/src/DisName.c b/nx-X11/lib/src/DisName.c index 87a1e2f..5a90ab3 100644 --- a/nx-X11/lib/src/DisName.c +++ b/nx-X11/lib/src/DisName.c @@ -60,5 +60,5 @@ XDisplayName( return( (char *)display ); if ( (d = getenv( "DISPLAY" )) != (char *)NULL ) return( d ); - return( "" ); + return( (char *) "" ); } diff --git a/nx-X11/lib/src/FSWrap.c b/nx-X11/lib/src/FSWrap.c index 0159657..1b244f4 100644 --- a/nx-X11/lib/src/FSWrap.c +++ b/nx-X11/lib/src/FSWrap.c @@ -195,7 +195,7 @@ XCreateFontSet ( if (oc && def_string) { *def_string = oc->core.default_string; if (!*def_string) - *def_string = ""; + *def_string = (char *)""; } if (oc == NULL) diff --git a/nx-X11/lib/src/FontNames.c b/nx-X11/lib/src/FontNames.c index 9ffdfd2..ec7d90f 100644 --- a/nx-X11/lib/src/FontNames.c +++ b/nx-X11/lib/src/FontNames.c @@ -88,24 +88,16 @@ int *actualCount) /* RETURN */ * unpack into null terminated strings. */ chstart = ch; - chend = ch + (rlen + 1); + chend = ch + rlen; length = *(unsigned char *)ch; *ch = 1; /* make sure it is non-zero for XFreeFontNames */ for (i = 0; i < rep.nFonts; i++) { if (ch + length < chend) { flist[i] = ch + 1; /* skip over length */ ch += length + 1; /* find next length ... */ - if (ch <= chend) { - length = *(unsigned char *)ch; - *ch = '\0'; /* and replace with null-termination */ - count++; - } else { - Xfree(chstart); - Xfree(flist); - flist = NULL; - count = 0; - break; - } + length = *(unsigned char *)ch; + *ch = '\0'; /* and replace with null-termination */ + count++; } else { Xfree(chstart); Xfree(flist); diff --git a/nx-X11/lib/src/GetFPath.c b/nx-X11/lib/src/GetFPath.c index 3d87e4f..87d2576 100644 --- a/nx-X11/lib/src/GetFPath.c +++ b/nx-X11/lib/src/GetFPath.c @@ -69,15 +69,20 @@ char **XGetFontPath( /* * unpack into null terminated strings. */ - chend = ch + (nbytes + 1); - length = *ch; + chend = ch + nbytes; + length = *(unsigned char *)ch; for (i = 0; i < rep.nPaths; i++) { if (ch + length < chend) { flist[i] = ch+1; /* skip over length */ ch += length + 1; /* find next length ... */ - length = *ch; + length = *(unsigned char *)ch; *ch = '\0'; /* and replace with null-termination */ count++; + } else if (i == 0) { + Xfree(flist); + Xfree(ch); + flist = NULL; + break; } else flist[i] = NULL; } diff --git a/nx-X11/lib/src/GetImage.c b/nx-X11/lib/src/GetImage.c index d80f671..96d9ce3 100644 --- a/nx-X11/lib/src/GetImage.c +++ b/nx-X11/lib/src/GetImage.c @@ -105,14 +105,16 @@ XImage *XGetImage ( planes = 1; } - if (!image) + if (!image) { Xfree(data); - if (planes < 1 || image->height < 1 || image->bytes_per_line < 1 || - INT_MAX / image->height <= image->bytes_per_line || - INT_MAX / planes <= image->height * image->bytes_per_line || - nbytes < planes * image->height * image->bytes_per_line) { - XDestroyImage(image); - image = NULL; + } else { + if (planes < 1 || image->height < 1 || image->bytes_per_line < 1 || + INT_MAX / image->height <= image->bytes_per_line || + INT_MAX / planes <= image->height * image->bytes_per_line || + nbytes < planes * image->height * image->bytes_per_line) { + XDestroyImage(image); + image = NULL; + } } UnlockDisplay(dpy); SyncHandle(); diff --git a/nx-X11/lib/src/LiHosts.c b/nx-X11/lib/src/LiHosts.c index 29c36ff..315e4db 100644 --- a/nx-X11/lib/src/LiHosts.c +++ b/nx-X11/lib/src/LiHosts.c @@ -119,11 +119,16 @@ XHostAddress *XListHosts ( _XRead (dpy, (char *) buf, nbytes); for (i = 0; i < reply.nHosts; i++) { + if (bp > buf + nbytes - SIZEOF(xHostEntry)) + goto fail; op->family = ((xHostEntry *) bp)->family; op->length =((xHostEntry *) bp)->length; if (op->family == FamilyServerInterpreted) { char *tp = (char *) (bp + SIZEOF(xHostEntry)); - char *vp = memchr(tp, 0, op->length); + char *vp; + if (tp > (char *) (buf + nbytes - op->length)) + goto fail; + vp = memchr(tp, 0, op->length); if (vp != NULL) { sip->type = tp; @@ -138,6 +143,8 @@ XHostAddress *XListHosts ( sip++; } else { op->address = (char *) (bp + SIZEOF(xHostEntry)); + if (op->address > (char *) (buf + nbytes - op->length)) + goto fail; } bp += SIZEOF(xHostEntry) + (((op->length + 3) >> 2) << 2); op++; @@ -149,9 +156,9 @@ XHostAddress *XListHosts ( UnlockDisplay(dpy); SyncHandle(); return (outbuf); +fail: + *enabled = reply.enabled; + *nhosts = 0; + Xfree(outbuf); + return (NULL); } - - - - - diff --git a/nx-X11/lib/src/ListExt.c b/nx-X11/lib/src/ListExt.c index 7fdf993..a795041 100644 --- a/nx-X11/lib/src/ListExt.c +++ b/nx-X11/lib/src/ListExt.c @@ -74,19 +74,20 @@ char **XListExtensions( /* * unpack into null terminated strings. */ - chend = ch + (rlen + 1); - length = *ch; + chend = ch + rlen; + length = *(unsigned char *)ch; for (i = 0; i < rep.nExtensions; i++) { if (ch + length < chend) { list[i] = ch+1; /* skip over length */ ch += length + 1; /* find next length ... */ - if (ch <= chend) { - length = *ch; - *ch = '\0'; /* and replace with null-termination */ - count++; - } else { - list[i] = NULL; - } + length = *(unsigned char *)ch; + *ch = '\0'; /* and replace with null-termination */ + count++; + } else if (i == 0) { + Xfree(list); + Xfree(ch); + list = NULL; + break; } else list[i] = NULL; } diff --git a/nx-X11/lib/src/SetHints.c b/nx-X11/lib/src/SetHints.c index eed360f..db5e752 100644 --- a/nx-X11/lib/src/SetHints.c +++ b/nx-X11/lib/src/SetHints.c @@ -211,7 +211,7 @@ XSetCommand ( int argc) { register int i; - register int nbytes; + size_t nbytes; register char *buf, *bp; for (i = 0, nbytes = 0; i < argc; i++) { nbytes += safestrlen(argv[i]) + 1; @@ -295,7 +295,7 @@ XSetClassHint( { char *class_string; char *s; - int len_nm, len_cl; + size_t len_nm, len_cl; len_nm = safestrlen(classhint->res_name); len_cl = safestrlen(classhint->res_class); diff --git a/nx-X11/lib/src/StColor.c b/nx-X11/lib/src/StColor.c index d5a217f..221fae1 100644 --- a/nx-X11/lib/src/StColor.c +++ b/nx-X11/lib/src/StColor.c @@ -50,6 +50,7 @@ XStoreColor( citem->green = def->green; citem->blue = def->blue; citem->flags = def->flags; /* do_red, do_green, do_blue */ + citem->pad = 0; UnlockDisplay(dpy); diff --git a/nx-X11/lib/src/StColors.c b/nx-X11/lib/src/StColors.c index 17a215c..fa1814c 100644 --- a/nx-X11/lib/src/StColors.c +++ b/nx-X11/lib/src/StColors.c @@ -53,6 +53,7 @@ XStoreColors( citem.green = defs[i].green; citem.blue = defs[i].blue; citem.flags = defs[i].flags; + citem.pad = 0; /* note that xColorItem doesn't contain all 16-bit quantities, so we can't use Data16 */ diff --git a/nx-X11/lib/src/StrKeysym.c b/nx-X11/lib/src/StrKeysym.c index 125acec..d7a9b75 100644 --- a/nx-X11/lib/src/StrKeysym.c +++ b/nx-X11/lib/src/StrKeysym.c @@ -115,7 +115,7 @@ XStringToKeysym(_Xconst char *s) { XrmValue result; XrmRepresentation from_type; - char c; + char d; XrmQuark names[2]; names[0] = _XrmInternalStringToQuark(s, p - s - 1, sig, False); @@ -126,10 +126,10 @@ XStringToKeysym(_Xconst char *s) val = 0; for (i = 0; i < result.size - 1; i++) { - c = ((char *)result.addr)[i]; - if ('0' <= c && c <= '9') val = (val<<4)+c-'0'; - else if ('a' <= c && c <= 'f') val = (val<<4)+c-'a'+10; - else if ('A' <= c && c <= 'F') val = (val<<4)+c-'A'+10; + d = ((char *)result.addr)[i]; + if ('0' <= d && d <= '9') val = (val<<4)+d-'0'; + else if ('a' <= d && d <= 'f') val = (val<<4)+d-'a'+10; + else if ('A' <= d && d <= 'F') val = (val<<4)+d-'A'+10; else return NoSymbol; } return val; diff --git a/nx-X11/lib/src/XlibInt.c b/nx-X11/lib/src/XlibInt.c index 5afc651..119126d 100644 --- a/nx-X11/lib/src/XlibInt.c +++ b/nx-X11/lib/src/XlibInt.c @@ -836,8 +836,12 @@ _XWaitForReadable( static int sync_hazard(Display *dpy) { - unsigned long span = dpy->request - dpy->last_request_read; - unsigned long hazard = min((dpy->bufmax - dpy->buffer) / SIZEOF(xReq), 65535 - 10); + /* + * "span" and "hazard" need to be signed such that the ">=" comparision + * works correctly in the case that hazard is greater than 65525 + */ + int64_t span = X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy); + int64_t hazard = min((dpy->bufmax - dpy->buffer) / SIZEOF(xReq), 65535 - 10); return span >= 65535 - hazard - 10; } @@ -876,7 +880,7 @@ void _XSeqSyncFunction( return; } #endif /* NX_TRANS_SOCKET */ - if ((dpy->request - dpy->last_request_read) >= (65535 - BUFSIZE/SIZEOF(xReq))) { + if ((X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy)) >= (65535 - BUFSIZE/SIZEOF(xReq))) { GetEmptyReq(GetInputFocus, req); (void) _XReply (dpy, (xReply *)&rep, 0, xTrue); sync_while_locked(dpy); @@ -2072,9 +2076,9 @@ _XSetLastRequestRead( register Display *dpy, register xGenericReply *rep) { - register unsigned long newseq, lastseq; + register uint64_t newseq, lastseq; - lastseq = dpy->last_request_read; + lastseq = X_DPY_GET_LAST_REQUEST_READ(dpy); /* * KeymapNotify has no sequence number, but is always guaranteed * to immediately follow another event, except when generated via @@ -2083,30 +2087,31 @@ _XSetLastRequestRead( if ((rep->type & 0x7f) == KeymapNotify) return(lastseq); - newseq = (lastseq & ~((unsigned long)0xffff)) | rep->sequenceNumber; + newseq = (lastseq & ~((uint64_t)0xffff)) | rep->sequenceNumber; if (newseq < lastseq) { newseq += 0x10000; - if (newseq > dpy->request) { + if (newseq > X_DPY_GET_REQUEST(dpy)) { #ifdef NX_TRANS_SOCKET if (_NXLostSequenceFunction != NULL) - { - (*_NXLostSequenceFunction)(dpy, newseq, dpy->request, - (unsigned int) rep->type); - } - else + { + (*_NXLostSequenceFunction)(dpy, newseq, X_DPY_GET_REQUEST(dpy), + (unsigned int) rep->type); + } + else #endif /* #ifdef NX_TRANS_SOCKET */ - { - (void) fprintf (stderr, - "Xlib: sequence lost (0x%lx > 0x%lx) in reply type 0x%x!\n", - newseq, dpy->request, - (unsigned int) rep->type); - } + { + (void) fprintf (stderr, + "Xlib: sequence lost (0x%llx > 0x%llx) in reply type 0x%x!\n", + (unsigned long long)newseq, + (unsigned long long)(X_DPY_GET_REQUEST(dpy)), + (unsigned int) rep->type); + } newseq -= 0x10000; } } - dpy->last_request_read = newseq; + X_DPY_SET_LAST_REQUEST_READ(dpy, newseq); return(newseq); } @@ -2652,8 +2657,8 @@ XAddConnectionWatch( /* allocate new watch data */ for (info_list=dpy->im_fd_info; info_list; info_list=info_list->next) { - wd_array = Xrealloc(info_list->watch_data, - (dpy->watcher_count + 1) * sizeof(XPointer)); + wd_array = Xrealloc(info_list->watch_data, + (dpy->watcher_count + 1) * sizeof(XPointer)); if (!wd_array) { UnlockDisplay(dpy); return 0; @@ -2921,15 +2926,12 @@ void _XEnq( /* If dpy->qfree is non-NULL do this, else malloc a new one. */ dpy->qfree = qelt->next; } - else if ((qelt = Xmalloc(sizeof(_XQEvent))) == NULL) { + else if ((qelt = Xmalloc(sizeof(_XQEvent))) == NULL) { /* Malloc call failed! */ ESET(ENOMEM); -#ifdef NX_TRANS_SOCKET _XIOError(dpy); - +#ifdef NX_TRANS_SOCKET return; -#else - _XIOError(dpy); #endif } qelt->next = NULL; @@ -3590,10 +3592,10 @@ static int _XPrintDefaultError( mesg, BUFSIZ); fputs(" ", fp); (void) fprintf(fp, mesg, event->serial); - XGetErrorDatabaseText(dpy, mtype, "CurrentSerial", "Current Serial #%d", + XGetErrorDatabaseText(dpy, mtype, "CurrentSerial", "Current Serial #%lld", mesg, BUFSIZ); fputs("\n ", fp); - (void) fprintf(fp, mesg, dpy->request); + (void) fprintf(fp, mesg, (unsigned long long)(X_DPY_GET_REQUEST(dpy))); fputs("\n", fp); if (event->error_code == BadImplementation) return 0; return 1; @@ -3658,17 +3660,17 @@ int _XError ( return 0; if (_XErrorFunction != NULL) { int rtn_val; -#if defined(XTHREADS) && !USE_XCB +#ifdef XTHREADS if (dpy->lock) (*dpy->lock->user_lock_display)(dpy); UnlockDisplay(dpy); -#endif /* XTHREADS && !USE_XCB */ +#endif rtn_val = (*_XErrorFunction)(dpy, (XErrorEvent *)&event); /* upcall */ -#if defined(XTHREADS) && !USE_XCB +#ifdef XTHREADS LockDisplay(dpy); if (dpy->lock) (*dpy->lock->user_unlock_display)(dpy); -#endif /* XTHREADS && !USE_XCB */ +#endif return rtn_val; } else { return _XDefaultError(dpy, (XErrorEvent *)&event); @@ -3978,20 +3980,20 @@ void *_XGetRequest(Display *dpy, CARD8 type, size_t len) xReq *req; if (dpy->bufptr + len > dpy->bufmax) - _XFlush(dpy); + _XFlush(dpy); /* Request still too large, so do not allow it to overflow. */ if (dpy->bufptr + len > dpy->bufmax) { - fprintf(stderr, - "Xlib: request %d length %zd would exceed buffer size.\n", - type, len); - /* Changes failure condition from overflow to NULL dereference. */ - return NULL; + fprintf(stderr, + "Xlib: request %d length %zd would exceed buffer size.\n", + type, len); + /* Changes failure condition from overflow to NULL dereference. */ + return NULL; } if (len % 4) - fprintf(stderr, - "Xlib: request %d length %zd not a multiple of 4.\n", - type, len); + fprintf(stderr, + "Xlib: request %d length %zd not a multiple of 4.\n", + type, len); dpy->last_req = dpy->bufptr; @@ -3999,7 +4001,7 @@ void *_XGetRequest(Display *dpy, CARD8 type, size_t len) req->reqType = type; req->length = len / 4; dpy->bufptr += len; - dpy->request++; + X_DPY_REQUEST_INCREMENT(dpy); return req; } diff --git a/nx-X11/lib/src/xcms/LRGB.c b/nx-X11/lib/src/xcms/LRGB.c index 38cc6cf..4bfa3cf 100644 --- a/nx-X11/lib/src/xcms/LRGB.c +++ b/nx-X11/lib/src/xcms/LRGB.c @@ -795,6 +795,9 @@ LINEAR_RGB_InitSCCData( return(XcmsSuccess); +FreeBlueTblElements: + Xfree(pScreenData->pBlueTbl->pBase); + FreeBlueTbl: Xfree(pScreenData->pBlueTbl); diff --git a/nx-X11/lib/src/xcms/cmsColNm.c b/nx-X11/lib/src/xcms/cmsColNm.c index c6f1e0f..8297491 100644 --- a/nx-X11/lib/src/xcms/cmsColNm.c +++ b/nx-X11/lib/src/xcms/cmsColNm.c @@ -314,7 +314,7 @@ field2( /* Find Field 1 */ while (!isgraph(*pBuf)) { - if ((*pBuf != '\n') || (*pBuf != '\0')) { + if ((*pBuf == '\n') || (*pBuf == '\0')) { return(XcmsFailure); } if (isspace(*pBuf) || (*pBuf == delim)) { diff --git a/nx-X11/lib/src/xcms/cmsProp.c b/nx-X11/lib/src/xcms/cmsProp.c index a7aa5b5..cb7bd10 100644 --- a/nx-X11/lib/src/xcms/cmsProp.c +++ b/nx-X11/lib/src/xcms/cmsProp.c @@ -142,6 +142,7 @@ _XcmsGetProperty( if (xgwp_ret != Success || format_ret == 0 || nitems_ret == 0) { /* the property does not exist or is of an unexpected type or getting window property failed */ + XFree (prop_ret); return(XcmsFailure); } diff --git a/nx-X11/lib/src/xkb/XKBAlloc.c b/nx-X11/lib/src/xkb/XKBAlloc.c index 9c3430c..5621f71 100644 --- a/nx-X11/lib/src/xkb/XKBAlloc.c +++ b/nx-X11/lib/src/xkb/XKBAlloc.c @@ -216,24 +216,22 @@ XkbFreeNames(XkbDescPtr xkb, unsigned which, Bool freeMap) type = map->types; for (i = 0; i < map->num_types; i++, type++) { - if (type->level_names != NULL) { _XkbFree(type->level_names); type->level_names = NULL; - } } } } - if ((which & XkbKeyNamesMask) && (names->keys != NULL)) { + if (which & XkbKeyNamesMask) { _XkbFree(names->keys); names->keys = NULL; names->num_keys = 0; } - if ((which & XkbKeyAliasesMask) && (names->key_aliases)) { + if (which & XkbKeyAliasesMask) { _XkbFree(names->key_aliases); names->key_aliases = NULL; names->num_key_aliases = 0; } - if ((which & XkbRGNamesMask) && (names->radio_groups)) { + if (which & XkbRGNamesMask) { _XkbFree(names->radio_groups); names->radio_groups = NULL; names->num_rg = 0; diff --git a/nx-X11/lib/src/xlibi18n/lcCT.c b/nx-X11/lib/src/xlibi18n/lcCT.c index 6e3f21e..a2ff93c 100644 --- a/nx-X11/lib/src/xlibi18n/lcCT.c +++ b/nx-X11/lib/src/xlibi18n/lcCT.c @@ -1021,19 +1021,19 @@ cstoct( ) { while (csstr_len > 0 && ct_len > 0) { unsigned char ch = * (const unsigned char *) csptr; - int char_size = (ch < 0xc0 ? 1 : + int ch_size = (ch < 0xc0 ? 1 : ch < 0xe0 ? 2 : ch < 0xf0 ? 3 : ch < 0xf8 ? 4 : ch < 0xfc ? 5 : 6); int i; - if (!(csstr_len >= char_size && ct_len >= char_size)) + if (!(csstr_len >= ch_size && ct_len >= ch_size)) break; - for (i = char_size; i > 0; i--) + for (i = ch_size; i > 0; i--) *ctptr++ = *csptr++; - csstr_len -= char_size; - ct_len -= char_size; + csstr_len -= ch_size; + ct_len -= ch_size; } } else { while (csstr_len > 0 && ct_len > 0) { diff --git a/nx-X11/lib/src/xlibi18n/lcDB.c b/nx-X11/lib/src/xlibi18n/lcDB.c index cc14bed..eb46f8f 100644 --- a/nx-X11/lib/src/xlibi18n/lcDB.c +++ b/nx-X11/lib/src/xlibi18n/lcDB.c @@ -781,7 +781,7 @@ f_right_brace( case S_VALUE: if (! store_to_database(db)) return 0; - /* fall into next case */ + /* fall through - to next case */ case S_CATEGORY: if (parse_info.name[parse_info.nest_depth] != NULL) { Xfree(parse_info.name[parse_info.nest_depth]); diff --git a/nx-X11/lib/src/xlibi18n/lcGeneric.c b/nx-X11/lib/src/xlibi18n/lcGeneric.c index 58ee5d2..f816fee 100644 --- a/nx-X11/lib/src/xlibi18n/lcGeneric.c +++ b/nx-X11/lib/src/xlibi18n/lcGeneric.c @@ -77,6 +77,7 @@ create( return lcd; err: + Xfree(lcd->core); Xfree(lcd); return (XLCd) NULL; } diff --git a/nx-X11/lib/src/xlibi18n/lcPublic.c b/nx-X11/lib/src/xlibi18n/lcPublic.c index 98a7435..f35f17a 100644 --- a/nx-X11/lib/src/xlibi18n/lcPublic.c +++ b/nx-X11/lib/src/xlibi18n/lcPublic.c @@ -97,6 +97,7 @@ create( return lcd; err: + Xfree(lcd->core); Xfree(lcd); return (XLCd) NULL; } -- 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 3dc4595560b34242fe4705af8c93d0024eeb2c56 Merge: 7392dd6 71abe0b Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Oct 22 14:39:10 2018 +0200 Merge branch 'uli42-pr/enableclientids' into 3.6.x Attributes GH PR #730: https://github.com/ArcticaProject/nx-libs/pull/730 nx-X11/config/cf/X11.tmpl | 2 +- nx-X11/config/cf/xorg.cf | 2 +- nx-X11/programs/Xserver/include/os.h | 6 ++++++ 3 files changed, 8 insertions(+), 2 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 6cdddadf9f9699d91c4ef647fa9302f557ade6e1 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 7 23:40:51 2018 +0200 Clipboard.c: add function for debugging output --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 116 ++++++++++++++++++++++++- 1 file changed, 114 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 5c82648..3c46ec3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -157,6 +157,109 @@ void nxagentNotifyConvertFailure(ClientPtr client, Window requestor, Atom selection, Atom target, Time time); int nxagentSendNotify(xEvent *event); +void nxagentPrintClipboardStat(char *); + +void nxagentPrintClipboardStat(char *header) +{ + #ifdef DEBUG + char *s =NULL; + + fprintf(stderr, "/----- Clipboard internal status - %s -----\n", header); + + fprintf(stderr, " current time (Time) [%u]\n", GetTimeInMillis()); + fprintf(stderr, " agentClipboardStatus (int) [%d]\n", agentClipboardStatus); + fprintf(stderr, " clientAccum (int) [%d]\n", clientAccum); + fprintf(stderr, " nxagentMaxSelections (int) [%d]\n", nxagentMaxSelections); + fprintf(stderr, " NumCurrentSelections (int) [%d]\n", NumCurrentSelections); + fprintf(stderr, " serverWindow (Window) [0x%x]\n", serverWindow); + fprintf(stderr, " nxagentLastClipboardClient (int) [%d]\n", nxagentLastClipboardClient); + + fprintf(stderr, " ClipboardMode "); + switch(nxagentOption(Clipboard)) + { + case ClipboardBoth: fprintf(stderr, "[Both]"); break;; + case ClipboardClient: fprintf(stderr, "[Client]"); break;; + case ClipboardServer: fprintf(stderr, "[Server]"); break;; + case ClipboardNone: fprintf(stderr, "[None]"); break;; + default: fprintf(stderr, "[UNKNOWN] (FAIL!)"); break;; + } + fprintf(stderr,"\n"); + + fprintf(stderr, "lastServer\n"); + fprintf(stderr, " lastServerRequestor (Window) [0x%x]\n", lastServerRequestor); + if (s) XFree(s); s = XGetAtomName(nxagentDisplay, lastServerProperty); + fprintf(stderr, " lastServerProperty (Atom) [% 4d][%s]\n", lastServerProperty, s); + if (s) XFree(s); s = XGetAtomName(nxagentDisplay, lastServerTarget); + fprintf(stderr, " lastServerTarget (Atom) [% 4d][%s]\n", lastServerTarget, s); + fprintf(stderr, " lastServerTime (Time) [%u]\n", lastServerTime); + + fprintf(stderr, "lastClient\n"); + fprintf(stderr, " lastClientWindowPtr (WindowPtr) [%p]\n", (void *)lastClientWindowPtr); + fprintf(stderr, " lastClientClientPtr (ClientPtr) [%p]\n", (void *)lastClientClientPtr); + fprintf(stderr, " lastClientRequestor (Window) [0x%x]\n", lastClientRequestor); + fprintf(stderr, " lastClientProperty (Atom) [% 4d][%s]\n", lastClientProperty, NameForAtom(lastClientProperty)); + fprintf(stderr, " lastClientSelection (Atom) [% 4d][%s]\n", lastClientSelection, NameForAtom(lastClientSelection)); + fprintf(stderr, " lastClientTarget (Atom) [% 4d][%s]\n", lastClientTarget, NameForAtom(lastClientTarget)); + fprintf(stderr, " lastClientTime (Time) [%u]\n", lastServerTime); + fprintf(stderr, " lastClientReqTime (Time) [%u]\n", lastServerTime); + fprintf(stderr, " lastClientPropertySize (unsigned long) [%lu]\n", lastClientPropertySize); + fprintf(stderr, " lastClientStage (ClientSelectionStage) [%d]", lastClientStage); + switch(lastClientStage) + { + case SelectionStageNone: fprintf(stderr, "[None]"); break;; + case SelectionStageQuerySize: fprintf(stderr, "[QuerySize]"); break;; + case SelectionStageWaitSize: fprintf(stderr, "[WaitSize]"); break;; + case SelectionStageQueryData: fprintf(stderr, "[QueryData]"); break;; + case SelectionStageWaitData: fprintf(stderr, "[WaitData]"); break;; + default: fprintf(stderr, "[UNKNOWN] (FAIL!)"); break;; + } + fprintf(stderr,"\n"); + + fprintf(stderr, "PRIMARY\n"); + fprintf(stderr, " lastSelectionOwner[].client [%p]\n", (void *)lastSelectionOwner[nxagentPrimarySelection].client); + fprintf(stderr, " lastSelectionOwner[].window [0x%x]\n", lastSelectionOwner[nxagentPrimarySelection].window); + fprintf(stderr, " lastSelectionOwner[].windowPtr [%p]\n", (void *)lastSelectionOwner[nxagentPrimarySelection].windowPtr); + fprintf(stderr, " lastSelectionOwner[].lastTimeChanged [%u]\n", lastSelectionOwner[nxagentPrimarySelection].lastTimeChanged); + fprintf(stderr, " CurrentSelections[].client [%p]\n", (void *)CurrentSelections[nxagentPrimarySelection].client); + fprintf(stderr, " CurrentSelections[].window [0x%x]\n", CurrentSelections[nxagentPrimarySelection].window); + + fprintf(stderr, "CLIPBOARD\n"); + fprintf(stderr, " lastSelectionOwner[].client [%p]\n", (void *)lastSelectionOwner[nxagentClipboardSelection].client); + fprintf(stderr, " lastSelectionOwner[].window [0x%x]\n", lastSelectionOwner[nxagentClipboardSelection].window); + fprintf(stderr, " lastSelectionOwner[].windowPtr [%p]\n", (void *)lastSelectionOwner[nxagentClipboardSelection].windowPtr); + fprintf(stderr, " lastSelectionOwner[].lastTimeChanged [%u]\n", lastSelectionOwner[nxagentClipboardSelection].lastTimeChanged); + fprintf(stderr, " CurrentSelections[].client [%p]\n", (void *)CurrentSelections[nxagentClipboardSelection].client); + fprintf(stderr, " CurrentSelections[].window [0x%x]\n", CurrentSelections[nxagentClipboardSelection].window); + + fprintf(stderr, "Atoms (server side)\n"); + if (s) XFree(s); s = XGetAtomName(nxagentDisplay, serverTARGETS); + fprintf(stderr, " serverTARGETS [% 4d][%s]\n", serverTARGETS, validateString(s)); + if (s) XFree(s); s = XGetAtomName(nxagentDisplay, serverTEXT); + fprintf(stderr, " serverTEXT [% d][%s]\n", serverTEXT, s); + if (s) XFree(s); s = XGetAtomName(nxagentDisplay, serverUTF8_STRING); + fprintf(stderr, " serverUTF8_STRING [% 4d][%s]\n", serverUTF8_STRING, s); + if (s) XFree(s); s = XGetAtomName(nxagentDisplay, serverCutProperty); + fprintf(stderr, " serverCutProperty [% 4d][%s]\n", serverCutProperty, s); + + if (s) XFree(s); s = XGetAtomName(nxagentDisplay, nxagentClipboardAtom); + fprintf(stderr, " nxagentClipboardAtom [% 4d][%s]\n", nxagentClipboardAtom, s); + if (s) XFree(s); s = XGetAtomName(nxagentDisplay, nxagentTimestampAtom); + fprintf(stderr, " nxagentTimestampAtom [% 4d][%s]\n", nxagentTimestampAtom, s); + + fprintf(stderr, "Atoms (inside nxagent)\n"); + fprintf(stderr, " clientTARGETS [% 4d][%s]\n", clientTARGETS, NameForAtom(clientTARGETS)); + fprintf(stderr, " clientTEXT [% 4d][%s]\n", clientTEXT, NameForAtom(clientTEXT)); + fprintf(stderr, " clientCOMPOUND_TEXT [% 4d][%s]\n", clientCOMPOUND_TEXT, NameForAtom(clientCOMPOUND_TEXT)); + fprintf(stderr, " clientUTF8_STRING [% 4d][%s]\n", clientUTF8_STRING, NameForAtom(clientUTF8_STRING)); + fprintf(stderr, " clientCutProperty [% 4d][%s]\n", clientCutProperty, NameForAtom(clientCutProperty)); + fprintf(stderr, " nxagentLastRequestedSelection [% 4d][%s]\n", nxagentLastRequestedSelection, NameForAtom(nxagentLastRequestedSelection)); + + fprintf(stderr, "\\------------------------------------------------------------------------------\n"); + + if (s) XFree(s); s = NULL; +#endif +} + /* * This is from NXproperty.c. */ @@ -213,6 +316,8 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) (void *) pClient, (void *) pWindow); #endif + nxagentPrintClipboardStat("before nxagentClearClipboard"); + /* * Only for PRIMARY and CLIPBOARD selections. */ @@ -238,13 +343,14 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) lastServerRequestor = None; } } - + if (pWindow == lastClientWindowPtr) { lastClientWindowPtr = NULL; lastClientStage = SelectionStageNone; } + nxagentPrintClipboardStat("after nxagentClearClipboard"); } void nxagentClearSelection(XEvent *X) @@ -255,6 +361,8 @@ void nxagentClearSelection(XEvent *X) fprintf(stderr, "nxagentClearSelection: Got called.\n"); #endif + nxagentPrintClipboardStat("before nxagentClearSelection"); + if (agentClipboardStatus != 1 || nxagentOption(Clipboard) == ClipboardServer) { @@ -297,6 +405,7 @@ void nxagentClearSelection(XEvent *X) lastClientWindowPtr = NULL; lastClientStage = SelectionStageNone; + nxagentPrintClipboardStat("after nxagentClearSelection"); } void nxagentRequestSelection(XEvent *X) @@ -305,12 +414,14 @@ void nxagentRequestSelection(XEvent *X) int result; #endif int i = 0; - XSelectionEvent eventSelection; + XSelectionEvent eventSelection = {0}; #ifdef DEBUG fprintf(stderr, "nxagentRequestSelection: Got called.\n"); #endif + nxagentPrintClipboardStat("before nxagentRequestSelection"); + if (agentClipboardStatus != 1) { return; @@ -517,6 +628,7 @@ FIXME: Do we need this? } } } + nxagentPrintClipboardStat("after nxagentRequestSelection"); } void nxagentSendSelectionNotify(Atom property) -- 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 2eb4a65ebd9aa04bd663fb9a7f0680fd2c56e990 Merge: 3dc4595 701e702 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Oct 23 12:14:51 2018 +0200 Merge branch 'uli42-pr/libX11_1.6.6' into 3.6.x Attributes GH PR #722: https://github.com/ArcticaProject/nx-libs/pull/722 nx-X11/lib/include/X11/Xlibint.h | 125 +++++++++++++++++++++++++++++- nx-X11/lib/modules/im/ximcp/imCallbk.c | 6 +- nx-X11/lib/modules/im/ximcp/imDefIc.c | 82 +++++++++++++------- nx-X11/lib/modules/im/ximcp/imInsClbk.c | 2 +- nx-X11/lib/modules/im/ximcp/imLcIm.c | 8 +- nx-X11/lib/modules/im/ximcp/imLcLkup.c | 6 +- nx-X11/lib/modules/om/generic/omGeneric.c | 32 +++----- nx-X11/lib/src/DisName.c | 2 +- nx-X11/lib/src/FSWrap.c | 2 +- nx-X11/lib/src/FontNames.c | 16 +--- nx-X11/lib/src/GetFPath.c | 11 ++- nx-X11/lib/src/GetImage.c | 16 ++-- nx-X11/lib/src/LiHosts.c | 19 +++-- nx-X11/lib/src/ListExt.c | 19 ++--- nx-X11/lib/src/SetHints.c | 4 +- nx-X11/lib/src/StColor.c | 1 + nx-X11/lib/src/StColors.c | 1 + nx-X11/lib/src/StrKeysym.c | 10 +-- nx-X11/lib/src/XlibInt.c | 86 ++++++++++---------- nx-X11/lib/src/xcms/LRGB.c | 3 + nx-X11/lib/src/xcms/cmsColNm.c | 2 +- nx-X11/lib/src/xcms/cmsLkCol.c | 3 +- nx-X11/lib/src/xcms/cmsProp.c | 1 + nx-X11/lib/src/xkb/XKBAlloc.c | 8 +- nx-X11/lib/src/xlibi18n/lcCT.c | 10 +-- nx-X11/lib/src/xlibi18n/lcDB.c | 2 +- nx-X11/lib/src/xlibi18n/lcGeneric.c | 1 + nx-X11/lib/src/xlibi18n/lcPublic.c | 1 + 28 files changed, 313 insertions(+), 166 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 8baec5d70bd686f1e6398016de88705e9bdda415 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jun 6 00:32:38 2018 +0200 Clipboard: print requested target in debugging mode --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 38 +++++++++++++++++++++----- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 703a491..5c82648 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -168,15 +168,39 @@ int GetWindowProperty(WindowPtr pWin, Atom property, long longOffset, long longL Bool nxagentValidServerTargets(Atom target) { - #ifdef DEBUG - fprintf(stderr, "nxagentValidServerTargets: Got called.\n"); - #endif - - if (target == XA_STRING) return True; - if (target == serverTEXT) return True; + if (target == XA_STRING) + { + #ifdef DEBUG + fprintf(stderr, "%s: valid target [XA_STRING].\n", __func__); + #endif + return True; + } + else if (target == serverTEXT) + { + #ifdef DEBUG + fprintf(stderr, "%s: valid target [TEXT].\n", __func__); + #endif + return True; + } /* by dimbor */ - if (target == serverUTF8_STRING) return True; + else if (target == serverUTF8_STRING) + { + #ifdef DEBUG + fprintf(stderr, "%s: valid target [UTF8_STRING].\n", __func__); + #endif + return True; + } + else if (target == serverTARGETS) + { + #ifdef DEBUG + fprintf(stderr, "%s: special target [TARGETS].\n", __func__); + #endif + return False; + } + #ifdef DEBUG + fprintf(stderr, "%s: invalid target [%ld].\n", __func__, target); + #endif return 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 35f6b32c6358b25bf2255839a3b94d326e21528f Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Jun 9 15:02:32 2018 +0200 NXproperty.c:add debug output --- nx-X11/programs/Xserver/hw/nxagent/NXproperty.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c index 6292b35..9d8a46c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c @@ -88,6 +88,11 @@ typedef struct nxagentWMStateRec; #endif +#define PANIC +#define WARNING +#undef TEST +#undef DEBUG + int ProcChangeProperty(ClientPtr client) { @@ -563,15 +568,25 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete, unsigned long n, len, ind; if (!pWin) + { +#ifdef DEBUG + fprintf(stderr, "%s: invalid window\n", __func__); +#endif return BadWindow; - + } if (!ValidAtom(property)) { +#ifdef DEBUG + fprintf(stderr, "%s: invalid atom [%d]\n", __func__, property); +#endif return(BadAtom); } if ((type != AnyPropertyType) && !ValidAtom(type)) { +#ifdef DEBUG + fprintf(stderr, "%s: invalid type [%d]\n", __func__, type); +#endif return(BadAtom); } @@ -588,7 +603,12 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete, if (!pProp) + { +#ifdef DEBUG + fprintf(stderr, "%s: property not found [%d]\n", __func__, property); +#endif return (BadAtom); + } /* If the request type and actual type don't match. Return the property information, but not the data. */ @@ -615,6 +635,9 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete, if (n < ind) { +#ifdef DEBUG + fprintf(stderr, "%s: negative property len\n", __func__); +#endif return BadValue; } -- 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 fab6911bde09b5dc7dfe43269f97f5ddd5ecced5 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Oct 9 22:51:55 2018 +0200 Clipboard.c: introduce helper macros for easier debugging --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 107 ++++++++++++++----------- 1 file changed, 59 insertions(+), 48 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 3c46ec3..0b78c2f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -140,6 +140,30 @@ static char szAgentUTF8_STRING[] = "UTF8_STRING"; static char szAgentNX_CUT_BUFFER_CLIENT[] = "NX_CUT_BUFFER_CLIENT"; /* + * some helpers for debugging output + */ + +#ifdef DEBUG +const char * GetClientSelectionStageString(int stage) +{ + switch(stage) + { + case SelectionStageNone: return("None"); break;; + case SelectionStageQuerySize: return("QuerySize"); break;; + case SelectionStageWaitSize: return("WaitSize"); break;; + case SelectionStageQueryData: return("QueryData"); break;; + case SelectionStageWaitData: return("WaitData"); break;; + default: return("UNKNOWN!"); break;; + } +} +#define SetClientSelectionStage(stage) do {fprintf(stderr, "%s: Changing selection stage from [%s] to [%s]\n", __func__, GetClientSelectionStageString(lastClientStage), GetClientSelectionStageString(SelectionStage##stage)); lastClientStage = SelectionStage##stage;} while (0) +#define PrintClientSelectionStage() do {fprintf(stderr, "%s: Current selection stage [%s]\n", __func__, GetClientSelectionStageString(lastClientStage));} while (0) +#else +#define SetClientSelectionStage(stage) do {lastClientStage = SelectionStage##stage;} while (0) +#define PrintClientSelectionStage() +#endif + +/* * Save the values queried from X server. */ @@ -203,17 +227,7 @@ void nxagentPrintClipboardStat(char *header) fprintf(stderr, " lastClientTime (Time) [%u]\n", lastServerTime); fprintf(stderr, " lastClientReqTime (Time) [%u]\n", lastServerTime); fprintf(stderr, " lastClientPropertySize (unsigned long) [%lu]\n", lastClientPropertySize); - fprintf(stderr, " lastClientStage (ClientSelectionStage) [%d]", lastClientStage); - switch(lastClientStage) - { - case SelectionStageNone: fprintf(stderr, "[None]"); break;; - case SelectionStageQuerySize: fprintf(stderr, "[QuerySize]"); break;; - case SelectionStageWaitSize: fprintf(stderr, "[WaitSize]"); break;; - case SelectionStageQueryData: fprintf(stderr, "[QueryData]"); break;; - case SelectionStageWaitData: fprintf(stderr, "[WaitData]"); break;; - default: fprintf(stderr, "[UNKNOWN] (FAIL!)"); break;; - } - fprintf(stderr,"\n"); + fprintf(stderr, " lastClientStage (ClientSelectionStage) [%d][%s]\n", lastClientStage, GetClientSelectionStageString(lastClientStage)); fprintf(stderr, "PRIMARY\n"); fprintf(stderr, " lastSelectionOwner[].client [%p]\n", (void *)lastSelectionOwner[nxagentPrimarySelection].client); @@ -338,7 +352,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) lastSelectionOwner[i].lastTimeChanged = GetTimeInMillis(); lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); lastServerRequestor = None; } @@ -347,7 +361,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) if (pWindow == lastClientWindowPtr) { lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); } nxagentPrintClipboardStat("after nxagentClearClipboard"); @@ -404,7 +418,7 @@ void nxagentClearSelection(XEvent *X) } lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); nxagentPrintClipboardStat("after nxagentClearSelection"); } @@ -600,7 +614,7 @@ FIXME: Do we need this? else { /* - * Probably we must to send a Notify + * Probably we must send a Notify * to requestor with property None. */ @@ -670,7 +684,7 @@ void nxagentTransferSelection(int resource) nxagentSendSelectionNotify(None); lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); return; } @@ -679,6 +693,7 @@ void nxagentTransferSelection(int resource) { case SelectionStageQuerySize: { + PrintClientSelectionStage(); /* * Don't get data yet, just get size. We skip * this stage in current implementation and @@ -717,22 +732,19 @@ void nxagentTransferSelection(int resource) nxagentSendSelectionNotify(None); lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); return; } - #ifdef DEBUG - fprintf (stderr, "nxagentTransferSelection: Setting stage to [%d] for client [%d].\n", - SelectionStageWaitSize, lastClientClientPtr -> index); - #endif - - lastClientStage = SelectionStageWaitSize; + SetClientSelectionStage(WaitSize); break; } case SelectionStageQueryData: { + PrintClientSelectionStage(); + /* * Request the selection data now. */ @@ -773,25 +785,20 @@ void nxagentTransferSelection(int resource) nxagentSendSelectionNotify(None); lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); return; } - #ifdef DEBUG - fprintf (stderr, "nxagentTransferSelection: Setting stage to [%d] for client [%d].\n", - SelectionStageWaitData, lastClientClientPtr -> index); - #endif - - lastClientStage = SelectionStageWaitData; + SetClientSelectionStage(WaitData); break; } default: { #ifdef DEBUG - fprintf (stderr, "nxagentTransferSelection: WARNING! Inconsistent state [%d] for client [%d].\n", - lastClientStage, lastClientClientPtr -> index); + fprintf (stderr, "nxagentTransferSelection: WARNING! Inconsistent state [%s] for client [%d].\n", + GetClientSelectionStageString(lastClientStage), lastClientClientPtr -> index); #endif break; @@ -834,7 +841,7 @@ void nxagentCollectPropertyEvent(int resource) nxagentSendSelectionNotify(None); lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); if (pszReturnData != NULL) { @@ -858,7 +865,7 @@ void nxagentCollectPropertyEvent(int resource) } lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); if (pszReturnData != NULL) { @@ -872,6 +879,7 @@ void nxagentCollectPropertyEvent(int resource) { case SelectionStageWaitSize: { + PrintClientSelectionStage(); #ifdef DEBUG fprintf (stderr, "nxagentCollectPropertyEvent: Got size notify event for client [%d].\n", lastClientClientPtr -> index); @@ -887,7 +895,7 @@ void nxagentCollectPropertyEvent(int resource) nxagentSendSelectionNotify(None); lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); if (pszReturnData != NULL) { @@ -906,7 +914,7 @@ void nxagentCollectPropertyEvent(int resource) */ lastClientPropertySize = ulReturnBytesLeft; - lastClientStage = SelectionStageQueryData; + SetClientSelectionStage(QueryData); nxagentTransferSelection(resource); @@ -914,6 +922,7 @@ void nxagentCollectPropertyEvent(int resource) } case SelectionStageWaitData: { + PrintClientSelectionStage(); #ifdef DEBUG fprintf (stderr, "nxagentCollectPropertyEvent: Got data notify event for client [%d].\n", lastClientClientPtr -> index); @@ -929,7 +938,7 @@ void nxagentCollectPropertyEvent(int resource) nxagentSendSelectionNotify(None); lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); if (pszReturnData != NULL) { @@ -961,15 +970,15 @@ void nxagentCollectPropertyEvent(int resource) */ lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); break; } default: { #ifdef DEBUG - fprintf (stderr, "nxagentCollectPropertyEvent: WARNING! Inconsistent state [%d] for client [%d].\n", - lastClientStage, lastClientClientPtr -> index); + fprintf (stderr, "nxagentCollectPropertyEvent: WARNING! Inconsistent state [%s] for client [%d].\n", + GetClientSelectionStageString(lastClientStage), lastClientClientPtr -> index); #endif break; @@ -999,6 +1008,8 @@ void nxagentNotifySelection(XEvent *X) fprintf(stderr, "nxagentNotifySelection: SelectionNotify event.\n"); #endif + PrintClientSelectionStage(); + if (lastClientWindowPtr != NULL) { if ((lastClientStage == SelectionStageNone) && (X->xselection.property == serverCutProperty)) @@ -1019,7 +1030,7 @@ void nxagentNotifySelection(XEvent *X) * tions. */ - lastClientStage = SelectionStageQueryData; + SetClientSelectionStage(QueryData); lastClientPropertySize = 262144; nxagentTransferSelection(lastClientClientPtr -> index); @@ -1034,7 +1045,7 @@ void nxagentNotifySelection(XEvent *X) nxagentSendSelectionNotify(None); lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); } return; @@ -1195,7 +1206,7 @@ void nxagentResetSelectionOwner(void) } lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); lastServerRequestor = None; @@ -1245,7 +1256,7 @@ void nxagentSetSelectionOwner(Selection *pSelection) } lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); lastServerRequestor = None; @@ -1262,7 +1273,7 @@ FIXME lastSelectionOwnerWindowPtr = pSelection->pWin; lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); lastServerRequestor = None; } @@ -1346,7 +1357,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, lastClientSelection, lastClientTarget, lastClientTime); lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); } else { @@ -1473,7 +1484,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, (target == clientUTF8_STRING)) { lastClientWindowPtr = pWin; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); lastClientRequestor = requestor; lastClientClientPtr = client; lastClientTime = time; @@ -1767,7 +1778,7 @@ int nxagentInitClipboard(WindowPtr pWin) lastServerRequestor = None; lastClientWindowPtr = NULL; - lastClientStage = SelectionStageNone; + SetClientSelectionStage(None); lastClientReqTime = GetTimeInMillis(); clientCutProperty = MakeAtom(szAgentNX_CUT_BUFFER_CLIENT, -- 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 85a28a68e90537c3b82e83bd8ff07a8e116ff00a Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Oct 9 23:00:08 2018 +0200 Clipboard.c: add macro for safe XFree calls with ptr clearance --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 53 ++++++++------------------ nx-X11/programs/Xserver/hw/nxagent/Utils.h | 2 + 2 files changed, 18 insertions(+), 37 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 0b78c2f..a928715 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -211,9 +211,9 @@ void nxagentPrintClipboardStat(char *header) fprintf(stderr, "lastServer\n"); fprintf(stderr, " lastServerRequestor (Window) [0x%x]\n", lastServerRequestor); - if (s) XFree(s); s = XGetAtomName(nxagentDisplay, lastServerProperty); + SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, lastServerProperty); fprintf(stderr, " lastServerProperty (Atom) [% 4d][%s]\n", lastServerProperty, s); - if (s) XFree(s); s = XGetAtomName(nxagentDisplay, lastServerTarget); + SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, lastServerTarget); fprintf(stderr, " lastServerTarget (Atom) [% 4d][%s]\n", lastServerTarget, s); fprintf(stderr, " lastServerTime (Time) [%u]\n", lastServerTime); @@ -246,18 +246,18 @@ void nxagentPrintClipboardStat(char *header) fprintf(stderr, " CurrentSelections[].window [0x%x]\n", CurrentSelections[nxagentClipboardSelection].window); fprintf(stderr, "Atoms (server side)\n"); - if (s) XFree(s); s = XGetAtomName(nxagentDisplay, serverTARGETS); + SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, serverTARGETS); fprintf(stderr, " serverTARGETS [% 4d][%s]\n", serverTARGETS, validateString(s)); - if (s) XFree(s); s = XGetAtomName(nxagentDisplay, serverTEXT); + SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, serverTEXT); fprintf(stderr, " serverTEXT [% d][%s]\n", serverTEXT, s); - if (s) XFree(s); s = XGetAtomName(nxagentDisplay, serverUTF8_STRING); + SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, serverUTF8_STRING); fprintf(stderr, " serverUTF8_STRING [% 4d][%s]\n", serverUTF8_STRING, s); - if (s) XFree(s); s = XGetAtomName(nxagentDisplay, serverCutProperty); + SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, serverCutProperty); fprintf(stderr, " serverCutProperty [% 4d][%s]\n", serverCutProperty, s); - if (s) XFree(s); s = XGetAtomName(nxagentDisplay, nxagentClipboardAtom); + SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, nxagentClipboardAtom); fprintf(stderr, " nxagentClipboardAtom [% 4d][%s]\n", nxagentClipboardAtom, s); - if (s) XFree(s); s = XGetAtomName(nxagentDisplay, nxagentTimestampAtom); + SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, nxagentTimestampAtom); fprintf(stderr, " nxagentTimestampAtom [% 4d][%s]\n", nxagentTimestampAtom, s); fprintf(stderr, "Atoms (inside nxagent)\n"); @@ -270,7 +270,7 @@ void nxagentPrintClipboardStat(char *header) fprintf(stderr, "\\------------------------------------------------------------------------------\n"); - if (s) XFree(s); s = NULL; + SAFE_XFree(s); #endif } @@ -460,10 +460,7 @@ FIXME: Do we need this? fprintf(stderr, "SelectionRequest event aborting sele=[%s] ext target=[%s] Atom size is [%d]\n", validateString(NameForAtom(X->xselectionrequest.selection)), strTarget, sizeof(Atom)); - if (strTarget != NULL) - { - XFree(strTarget); - } + SAFE_XFree(strTarget); */ memset(&eventSelection, 0, sizeof(XSelectionEvent)); eventSelection.property = None; @@ -843,11 +840,7 @@ void nxagentCollectPropertyEvent(int resource) lastClientWindowPtr = NULL; SetClientSelectionStage(None); - if (pszReturnData != NULL) - { - XFree(pszReturnData); - } - + SAFE_XFree(pszReturnData); return; } @@ -867,11 +860,7 @@ void nxagentCollectPropertyEvent(int resource) lastClientWindowPtr = NULL; SetClientSelectionStage(None); - if (pszReturnData != NULL) - { - XFree(pszReturnData); - } - + SAFE_XFree(pszReturnData); return; } @@ -897,11 +886,7 @@ void nxagentCollectPropertyEvent(int resource) lastClientWindowPtr = NULL; SetClientSelectionStage(None); - if (pszReturnData != NULL) - { - XFree(pszReturnData); - } - + SAFE_XFree(pszReturnData); return; } @@ -940,11 +925,7 @@ void nxagentCollectPropertyEvent(int resource) lastClientWindowPtr = NULL; SetClientSelectionStage(None); - if (pszReturnData != NULL) - { - XFree(pszReturnData); - } - + SAFE_XFree(pszReturnData); return; } @@ -985,8 +966,7 @@ void nxagentCollectPropertyEvent(int resource) } } - XFree(pszReturnData); - pszReturnData = NULL; + SAFE_XFree(pszReturnData); } void nxagentNotifySelection(XEvent *X) @@ -1122,8 +1102,7 @@ void nxagentNotifySelection(XEvent *X) } /* - * XFree(pszReturnData); - * pszReturnData=NULL; + * SAFE_XFree(pszReturnData); */ } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Utils.h b/nx-X11/programs/Xserver/hw/nxagent/Utils.h index 63904e2..c0ad033 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Utils.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Utils.h @@ -44,4 +44,6 @@ static inline const char * validateString(const char *str) { return str ? str : "(null)"; } +#define SAFE_XFree(what) do {if (what) {XFree(what); what = NULL;}} while (0) + #endif /* __Utils_H__ */ -- 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 e90306ec430f9baba85b35196e76b5745e5ff736 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Oct 10 00:13:57 2018 +0200 Clipboard.c: some scope optimizations --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index a928715..da13788 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -424,9 +424,6 @@ void nxagentClearSelection(XEvent *X) void nxagentRequestSelection(XEvent *X) { - #ifdef DEBUG - int result; - #endif int i = 0; XSelectionEvent eventSelection = {0}; @@ -507,7 +504,7 @@ FIXME: Do we need this? eventSelection.time = X->xselectionrequest.time; #ifdef DEBUG - result = + int result = #endif XSendEvent(nxagentDisplay, eventSelection.requestor, @@ -625,7 +622,7 @@ FIXME: Do we need this? eventSelection.time = X->xselectionrequest.time; #ifdef DEBUG - result = + int result = #endif XSendEvent(nxagentDisplay, eventSelection.requestor, @@ -971,8 +968,6 @@ void nxagentCollectPropertyEvent(int resource) void nxagentNotifySelection(XEvent *X) { - int result; - XSelectionEvent eventSelection; #ifdef DEBUG @@ -1051,9 +1046,9 @@ void nxagentNotifySelection(XEvent *X) unsigned long ulReturnBytesLeft; unsigned char *pszReturnData = NULL; - result = GetWindowProperty(lastSelectionOwner[i].windowPtr, clientCutProperty, 0, 0, False, - AnyPropertyType, &atomReturnType, &resultFormat, - &ulReturnItems, &ulReturnBytesLeft, &pszReturnData); + int result = GetWindowProperty(lastSelectionOwner[i].windowPtr, clientCutProperty, 0, 0, False, + AnyPropertyType, &atomReturnType, &resultFormat, + &ulReturnItems, &ulReturnBytesLeft, &pszReturnData); if (result == BadAlloc || result == BadAtom || result == BadMatch || result == BadValue || @@ -1400,7 +1395,6 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, if (target == MakeAtom("TIMESTAMP", 9, 1)) { - xEvent x; int i = 0; while ((i < NumCurrentSelections) && @@ -1408,6 +1402,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, if (i < NumCurrentSelections) { + xEvent x; ChangeWindowProperty(pWin, property, target, -- 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 888de83ac9d80495cfc3bc3b29277eedd1917feb Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Oct 10 00:21:13 2018 +0200 Clipboard.c: print X errors --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 82 +++++++++++++++++++------- 1 file changed, 62 insertions(+), 20 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index da13788..456da35 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -164,6 +164,35 @@ const char * GetClientSelectionStageString(int stage) #endif /* + * see also nx-X11/lib/src/ErrDes.c + */ +const char * GetXErrorString(int code) +{ + switch(code) + { + case Success: return("Success"); break;; + case BadRequest: return("BadRequest"); break;; + case BadValue: return("BadValue"); break;; + case BadWindow: return("BadWindow"); break;; + case BadPixmap: return("BadPixmap"); break;; + case BadAtom: return("BadAtom"); break;; + case BadCursor: return("BadCursor"); break;; + case BadFont: return("BadFont"); break;; + case BadMatch: return("BadMatch"); break;; + case BadDrawable: return("BadDrawable"); break;; + case BadAccess: return("BadAccess"); break;; + case BadAlloc: return("BadAlloc"); break;; + case BadColor: return("BadColor"); break;; + case BadGC: return("BadGC"); break;; + case BadIDChoice: return("BadIDChoice"); break;; + case BadName: return("BadName"); break;; + case BadLength: return("BadLength"); break;; + case BadImplementation: return("BadImplementation"); break;; + default: return("UNKNOWN!"); break;; + } +} + +/* * Save the values queried from X server. */ @@ -513,13 +542,14 @@ FIXME: Do we need this? (XEvent *) &eventSelection); #ifdef DEBUG + fprintf(stderr, "%s: XSendEvent() returned [%s]\n", __func__, GetXErrorString(result)); if (result == BadValue || result == BadWindow) { - fprintf(stderr, "nxagentRequestSelection: WARNING! XSendEvent failed.\n"); + fprintf(stderr, "%s: WARNING! XSendEvent failed.\n", __func__); } else { - fprintf(stderr, "nxagentRequestSelection: XSendEvent sent to window [0x%lx].\n", + fprintf(stderr, "%s: XSendEvent sent to window [0x%lx].\n", __func__, eventSelection.requestor); } #endif @@ -631,7 +661,16 @@ FIXME: Do we need this? (XEvent *) &eventSelection); #ifdef DEBUG - fprintf(stderr, "nxagentRequestSelection: Executed XSendEvent with property None.\n"); + fprintf(stderr, "%s: XSendEvent() returned [%s]\n", __func__, GetXErrorString(result)); + if (result == BadValue || result == BadWindow) + { + fprintf(stderr, "%s: WARNING! XSendEvent failed.\n", __func__); + } + else + { + fprintf(stderr, "%s: XSendEvent with property None sent to window [0x%lx].\n", __func__, + eventSelection.requestor); + } #endif } } @@ -1050,24 +1089,15 @@ void nxagentNotifySelection(XEvent *X) AnyPropertyType, &atomReturnType, &resultFormat, &ulReturnItems, &ulReturnBytesLeft, &pszReturnData); + #ifdef DEBUG + fprintf(stderr, "%s: GetWindowProperty() returned [%s]\n", __func__, GetXErrorString(result)); + #endif if (result == BadAlloc || result == BadAtom || result == BadMatch || result == BadValue || result == BadWindow) { - fprintf (stderr, "Client GetProperty failed error ="); + fprintf (stderr, "Client GetProperty failed. Error = %s", GetXErrorString(result)); lastServerProperty = None; - switch (result) - { - case BadAtom: - fprintf (stderr, "BadAtom\n"); - break; - case BadValue: - fprintf (stderr, "BadValue\n"); - break; - case BadWindow: - fprintf (stderr, "BadWindow\n"); - break; - } } else { @@ -1075,12 +1105,15 @@ void nxagentNotifySelection(XEvent *X) ulReturnBytesLeft, False, AnyPropertyType, &atomReturnType, &resultFormat, &ulReturnItems, &ulReturnBytesLeft, &pszReturnData); + #ifdef DEBUG + fprintf(stderr, "%s: GetWindowProperty() returned [%s]\n", __func__, GetXErrorString(result)); + #endif if (result == BadAlloc || result == BadAtom || result == BadMatch || result == BadValue || result == BadWindow) { - fprintf (stderr, "SelectionNotify - XChangeProperty failed\n"); + fprintf (stderr, "SelectionNotify - XChangeProperty failed. Error = %s\n", GetXErrorString(result)); lastServerProperty = None; } @@ -1095,6 +1128,9 @@ void nxagentNotifySelection(XEvent *X) pszReturnData, ulReturnItems); } + #ifdef DEBUG + fprintf(stderr, "%s: XChangeProperty() returned [%s]\n", __func__, GetXErrorString(result)); + #endif /* * SAFE_XFree(pszReturnData); @@ -1124,7 +1160,7 @@ void nxagentNotifySelection(XEvent *X) */ #ifdef DEBUG - fprintf(stderr, "nxagentNotifySelection: Sending event to requestor.\n"); + fprintf(stderr, "nxagentNotifySelection: Sending event to requestor [%p].\n", eventSelection.requestor); #endif result = XSendEvent(nxagentDisplay, @@ -1133,6 +1169,9 @@ void nxagentNotifySelection(XEvent *X) 0L, (XEvent *) &eventSelection); + #ifdef DEBUG + fprintf(stderr, "%s: XSendEvent() returned [%s]\n", __func__, GetXErrorString(result)); + #endif if (result == BadValue || result == BadWindow) { fprintf (stderr, "SelectionRequest - XSendEvent failed\n"); @@ -1559,15 +1598,18 @@ int nxagentSendNotify(xEvent *event) x.time = CurrentTime; #ifdef DEBUG - fprintf(stderr, "nxagentSendNotify: Propagating clientCutProperty.\n"); + fprintf(stderr, "nxagentSendNotify: Propagating clientCutProperty to requestor [%p].\n", x.requestor); #endif result = XSendEvent (nxagentDisplay, x.requestor, False, 0L, (XEvent *) &x); + #ifdef DEBUG + fprintf(stderr, "%s: XSendEvent() returned [%s]\n", __func__, GetXErrorString(result)); + #endif if (result == BadValue || result == BadWindow) { - fprintf (stderr, "nxagentSendNotify: XSendEvent failed.\n"); + fprintf (stderr, "%s: XSendEvent failed.\n", __func__); } 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 719488da9656c82aeb6ded94d7d22c2a31d485b6 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Oct 10 00:22:21 2018 +0200 Clipboard.c: add FIXME --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 7c63281..3650210 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -562,6 +562,7 @@ FIXME: Do we need this? nxagentLastRequestedSelection = X->xselectionrequest.selection; + /* FIXME: shouldn't we reset i to 0 here first? */ while ((i < nxagentMaxSelections) && (lastSelectionOwner[i].selection != X->xselectionrequest.selection)) { -- 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 9a5f519a02d63700aaa742e50ddb5ba67ca7d2b4 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Oct 10 00:21:48 2018 +0200 Clipboard.c: Code optimization (missing else) --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 456da35..7c63281 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -504,8 +504,7 @@ FIXME: Do we need this? 1); eventSelection.property = X->xselectionrequest.property; } - - if (X->xselectionrequest.target == nxagentTimestampAtom) + else if (X->xselectionrequest.target == nxagentTimestampAtom) { while ((i < NumCurrentSelections) && lastSelectionOwner[i].selection != X->xselectionrequest.selection) i++; -- 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 5d26addd3df578b057e9820015018d019a85296f Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Oct 16 00:19:58 2018 +0200 Clipboard.c: new debug function to reduce duplicate code --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 66 +++++++++++++++++++++----- 1 file changed, 53 insertions(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index ae73f36..a7a1cbd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -212,6 +212,57 @@ int nxagentSendNotify(xEvent *event); void nxagentPrintClipboardStat(char *); +#ifdef DEBUG +void nxagentPrintSelectionStat(int sel) +{ + SelectionOwner lOwner = lastSelectionOwner[sel]; + Selection curSel = CurrentSelections[sel]; + char *s =NULL; + +#ifdef CLIENTIDS + fprintf(stderr, " lastSelectionOwner[].client [%p] index [%d] PID [%d] Cmd [%s]\n", + lOwner.client, + lOwner.client ? lOwner.client->index : -1, + GetClientPid(lOwner.client), + GetClientCmdName(lOwner.client)); +#else + fprintf(stderr, " lastSelectionOwner[].client [%p] index [%d]\n", + lOwner.client, + lOwner.client ? lOwner.client->index : -1); +#endif + fprintf(stderr, " lastSelectionOwner[].window [0x%x]\n", lOwner.window); + fprintf(stderr, " lastSelectionOwner[].windowPtr [%p]\n", lOwner.windowPtr); + fprintf(stderr, " lastSelectionOwner[].lastTimeChanged [%u]\n", lOwner.lastTimeChanged); + + /* + print the selection name. + */ + if (lOwner.client) + { + fprintf(stderr, " lastSelectionOwner[].selection [% 4d][%s] (local)\n", lOwner.selection, NameForAtom(lOwner.selection)); + } + else + { + SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, lOwner.selection); + fprintf(stderr, " lastSelectionOwner[].selection [% 4d][%s] (remote)\n", lOwner.selection, validateString(s)); + SAFE_XFree(s); + } +#ifdef CLIENTIDS + fprintf(stderr, " CurrentSelections[].client [%p] index [%d] PID [%d] Cmd [%s]\n", + curSel.client, + curSel.client ? curSel.client->index : -1, + GetClientPid(curSel.client), + GetClientCmdName(curSel.client)); +#else + fprintf(stderr, " CurrentSelections[].client [%p] index [%d]\n", + curSel.client, + curSel.client ? curSel.client->index : -1); +#endif + fprintf(stderr, " CurrentSelections[].window [0x%x]\n", curSel.window); + return; +} +#endif + void nxagentPrintClipboardStat(char *header) { #ifdef DEBUG @@ -259,20 +310,9 @@ void nxagentPrintClipboardStat(char *header) fprintf(stderr, " lastClientStage (ClientSelectionStage) [%d][%s]\n", lastClientStage, GetClientSelectionStageString(lastClientStage)); fprintf(stderr, "PRIMARY\n"); - fprintf(stderr, " lastSelectionOwner[].client [%p]\n", (void *)lastSelectionOwner[nxagentPrimarySelection].client); - fprintf(stderr, " lastSelectionOwner[].window [0x%x]\n", lastSelectionOwner[nxagentPrimarySelection].window); - fprintf(stderr, " lastSelectionOwner[].windowPtr [%p]\n", (void *)lastSelectionOwner[nxagentPrimarySelection].windowPtr); - fprintf(stderr, " lastSelectionOwner[].lastTimeChanged [%u]\n", lastSelectionOwner[nxagentPrimarySelection].lastTimeChanged); - fprintf(stderr, " CurrentSelections[].client [%p]\n", (void *)CurrentSelections[nxagentPrimarySelection].client); - fprintf(stderr, " CurrentSelections[].window [0x%x]\n", CurrentSelections[nxagentPrimarySelection].window); - + nxagentPrintSelectionStat(nxagentPrimarySelection); fprintf(stderr, "CLIPBOARD\n"); - fprintf(stderr, " lastSelectionOwner[].client [%p]\n", (void *)lastSelectionOwner[nxagentClipboardSelection].client); - fprintf(stderr, " lastSelectionOwner[].window [0x%x]\n", lastSelectionOwner[nxagentClipboardSelection].window); - fprintf(stderr, " lastSelectionOwner[].windowPtr [%p]\n", (void *)lastSelectionOwner[nxagentClipboardSelection].windowPtr); - fprintf(stderr, " lastSelectionOwner[].lastTimeChanged [%u]\n", lastSelectionOwner[nxagentClipboardSelection].lastTimeChanged); - fprintf(stderr, " CurrentSelections[].client [%p]\n", (void *)CurrentSelections[nxagentClipboardSelection].client); - fprintf(stderr, " CurrentSelections[].window [0x%x]\n", CurrentSelections[nxagentClipboardSelection].window); + nxagentPrintSelectionStat(nxagentClipboardSelection); fprintf(stderr, "Atoms (server side)\n"); SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, serverTARGETS); -- 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 f8bfdc87b3ba200f5cb9dba85682a445174209ba Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Oct 16 00:20:41 2018 +0200 Clipboard.c: improve nxagentClearSelection() debug code --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index a7a1cbd..a02bd1c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -441,7 +441,7 @@ void nxagentClearSelection(XEvent *X) int i = 0; #ifdef DEBUG - fprintf(stderr, "nxagentClearSelection: Got called.\n"); + fprintf(stderr, "%s: SelectionClear event for selection [%d].\n", __func__, X->xselectionclear.selection); #endif nxagentPrintClipboardStat("before nxagentClearSelection"); @@ -452,10 +452,6 @@ void nxagentClearSelection(XEvent *X) return; } - #ifdef DEBUG - fprintf(stderr, "nxagentClearSelection: SelectionClear event.\n"); - #endif - while ((i < nxagentMaxSelections) && (lastSelectionOwner[i].selection != X->xselectionclear.selection)) { -- 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 934d9eae6f92a69fc4fd2fe79c7b67689902c01c Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 25 22:13:30 2018 +0200 Clipboard.c: Use constant instead of hardcoded value --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index a02bd1c..285a738 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1696,7 +1696,7 @@ int nxagentInitClipboard(WindowPtr pWin) free(lastSelectionOwner); lastSelectionOwner = NULL; - lastSelectionOwner = (SelectionOwner *) malloc(2 * sizeof(SelectionOwner)); + lastSelectionOwner = (SelectionOwner *) malloc(nxagentMaxSelections * sizeof(SelectionOwner)); if (lastSelectionOwner == NULL) { -- 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 018b561b7c2861dd777da164fd6fc3c00bd79c77 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Oct 10 00:22:38 2018 +0200 Clipboard.c: whitespace fixes --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 3650210..a4a44f2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -882,7 +882,6 @@ void nxagentCollectPropertyEvent(int resource) if (resultFormat != 8 && resultFormat != 16 && resultFormat != 32) { - #ifdef DEBUG fprintf (stderr, "nxagentCollectPropertyEvent: WARNING! Invalid property " "value.\n"); @@ -1731,7 +1730,6 @@ int nxagentInitClipboard(WindowPtr pWin) { ErrorF("Unable to initialize XFixes extension.\n"); } - else { #ifdef TEST @@ -1832,4 +1830,3 @@ int nxagentInitClipboard(WindowPtr pWin) 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 1af67b4df234cb1a702554289d4319f904aaef31 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Oct 10 00:26:54 2018 +0200 Clipboard.c: GetWindowProperty() does not return BadMatch --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index a4a44f2..9cf541e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1092,8 +1092,7 @@ void nxagentNotifySelection(XEvent *X) fprintf(stderr, "%s: GetWindowProperty() returned [%s]\n", __func__, GetXErrorString(result)); #endif if (result == BadAlloc || result == BadAtom || - result == BadMatch || result == BadValue || - result == BadWindow) + result == BadWindow || result == BadValue) { fprintf (stderr, "Client GetProperty failed. Error = %s", GetXErrorString(result)); lastServerProperty = None; @@ -1109,11 +1108,9 @@ void nxagentNotifySelection(XEvent *X) #endif if (result == BadAlloc || result == BadAtom || - result == BadMatch || result == BadValue || - result == BadWindow) + result == BadWindow || result == BadValue) { fprintf (stderr, "SelectionNotify - XChangeProperty failed. Error = %s\n", GetXErrorString(result)); - lastServerProperty = None; } 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 1c4c9f60978d5ef13e10e85ec2ce18898196177b Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Oct 10 01:15:17 2018 +0200 Clipboard.c: more debugging info for nxagentGetClipboardWindow() --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 9cf541e..ae73f36 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1619,7 +1619,7 @@ WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin) int i = 0; #ifdef DEBUG - fprintf(stderr, "nxagentGetClipboardWindow: Got called.\n"); + fprintf(stderr, "%s: Got called, property [%d][%s] window [%p].\n", __func__, property, NameForAtom(property), pWin); #endif while ((i < nxagentMaxSelections) && @@ -1632,7 +1632,7 @@ WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin) (lastSelectionOwner[i].windowPtr != NULL)) { #ifdef DEBUG - fprintf(stderr, "nxagentGetClipboardWindow: Returning last clipboard owner window.\n"); + fprintf(stderr, "%s: Returning last clipboard owner window [%p].\n", __func__, lastSelectionOwner[i].windowPtr); #endif return lastSelectionOwner[i].windowPtr; @@ -1640,7 +1640,7 @@ WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin) else { #ifdef DEBUG - fprintf(stderr, "nxagentGetClipboardWindow: Returning original target window.\n"); + fprintf(stderr, "%s: Returning original target window [%p].\n", __func__, pWin); #endif return 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 60bce146ee344d477add3a559eb9f2de155e4c09 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Oct 22 00:30:01 2018 +0200 Clipboard.c: use __func__ everywhere --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 117 ++++++++++++------------- 1 file changed, 58 insertions(+), 59 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 1726586..13cfd81 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -395,7 +395,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) int i; #ifdef DEBUG - fprintf(stderr, "nxagentClearClipboard: Called with client [%p] window [%p].\n", + fprintf(stderr, "%s: Called with client [%p] window [%p].\n", __func__, (void *) pClient, (void *) pWindow); #endif @@ -411,7 +411,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) (pWindow != NULL && lastSelectionOwner[i].windowPtr == pWindow)) { #ifdef TEST - fprintf(stderr, "nxagentClearClipboard: Resetting state with client [%p] window [%p].\n", + fprintf(stderr, "%s: Resetting state with client [%p] window [%p].\n", __func__, (void *) pClient, (void *) pWindow); #endif @@ -493,7 +493,7 @@ void nxagentRequestSelection(XEvent *X) XSelectionEvent eventSelection = {0}; #ifdef DEBUG - fprintf(stderr, "nxagentRequestSelection: Got called.\n"); + fprintf(stderr, "%s: Got called.\n", __func__); #endif nxagentPrintClipboardStat("before nxagentRequestSelection"); @@ -614,7 +614,7 @@ FIXME: Do we need this? serverWindow, lastClientTime); #ifdef DEBUG - fprintf(stderr, "nxagentRequestSelection: Sent XConvertSelection.\n"); + fprintf(stderr, "%s: Sent XConvertSelection.\n", __func__); #endif } else @@ -668,7 +668,7 @@ FIXME: Do we need this? NullGrab); #ifdef DEBUG - fprintf(stderr, "nxagentRequestSelection: Executed TryClientEvents with clientCutProperty.\n"); + fprintf(stderr, "%s: Executed TryClientEvents with clientCutProperty.\n", __func__); #endif } else @@ -719,7 +719,7 @@ void nxagentSendSelectionNotify(Atom property) xEvent x; #ifdef DEBUG - fprintf (stderr, "nxagentSendSelectionNotify: Sending event to client [%d].\n", + fprintf (stderr, "%s: Sending event to client [%d].\n", __func__, lastClientClientPtr -> index); #endif @@ -746,7 +746,7 @@ void nxagentTransferSelection(int resource) if (lastClientClientPtr -> index != resource) { #ifdef DEBUG - fprintf (stderr, "nxagentTransferSelection: WARNING! Inconsistent resource [%d] with current client [%d].\n", + fprintf (stderr, "%s: WARNING! Inconsistent resource [%d] with current client [%d].\n", __func__, resource, lastClientClientPtr -> index); #endif @@ -774,7 +774,7 @@ void nxagentTransferSelection(int resource) if (nxagentLastClipboardClient == -1) { #ifdef WARNING - fprintf(stderr, "nxagentTransferSelection: WARNING! Asynchronous GetProperty queue full.\n"); + fprintf(stderr, "%s: WARNING! Asynchronous GetProperty queue full.\n", __func__); #endif result = -1; @@ -794,7 +794,7 @@ void nxagentTransferSelection(int resource) if (result == -1) { #ifdef DEBUG - fprintf (stderr, "nxagentTransferSelection: Aborting selection notify procedure for client [%d].\n", + fprintf (stderr, "%s: Aborting selection notify procedure for client [%d].\n", __func__, lastClientClientPtr -> index); #endif @@ -819,7 +819,7 @@ void nxagentTransferSelection(int resource) */ #ifdef DEBUG - fprintf(stderr, "nxagentTransferSelection: Getting property content from remote server.\n"); + fprintf(stderr, "%s: Getting property content from remote server.\n", __func__); #endif nxagentLastClipboardClient = NXGetCollectPropertyResource(nxagentDisplay); @@ -827,7 +827,7 @@ void nxagentTransferSelection(int resource) if (nxagentLastClipboardClient == -1) { #ifdef WARNING - fprintf(stderr, "nxagentTransferSelection: WARNING! Asynchronous GetProperty queue full.\n"); + fprintf(stderr, "%s: WARNING! Asynchronous GetProperty queue full.\n", __func__); #endif result = -1; @@ -847,7 +847,7 @@ void nxagentTransferSelection(int resource) if (result == -1) { #ifdef DEBUG - fprintf (stderr, "nxagentTransferSelection: Aborting selection notify procedure for client [%d].\n", + fprintf (stderr, "%s: Aborting selection notify procedure for client [%d].\n", __func__, lastClientClientPtr -> index); #endif @@ -866,7 +866,7 @@ void nxagentTransferSelection(int resource) default: { #ifdef DEBUG - fprintf (stderr, "nxagentTransferSelection: WARNING! Inconsistent state [%s] for client [%d].\n", + fprintf (stderr, "%s: WARNING! Inconsistent state [%s] for client [%d].\n", __func__, GetClientSelectionStageString(lastClientStage), lastClientClientPtr -> index); #endif @@ -903,7 +903,7 @@ void nxagentCollectPropertyEvent(int resource) if (result == 0) { #ifdef DEBUG - fprintf (stderr, "nxagentCollectPropertyEvent: Failed to get reply data for client [%d].\n", + fprintf (stderr, "%s: Failed to get reply data for client [%d].\n", __func__, lastClientClientPtr -> index); #endif @@ -919,8 +919,7 @@ void nxagentCollectPropertyEvent(int resource) if (resultFormat != 8 && resultFormat != 16 && resultFormat != 32) { #ifdef DEBUG - fprintf (stderr, "nxagentCollectPropertyEvent: WARNING! Invalid property " - "value.\n"); + fprintf (stderr, "%s: WARNING! Invalid property value.\n", __func__); #endif if (lastClientClientPtr != NULL) @@ -941,14 +940,14 @@ void nxagentCollectPropertyEvent(int resource) { PrintClientSelectionStage(); #ifdef DEBUG - fprintf (stderr, "nxagentCollectPropertyEvent: Got size notify event for client [%d].\n", + fprintf (stderr, "%s: Got size notify event for client [%d].\n", __func__, lastClientClientPtr -> index); #endif if (ulReturnBytesLeft == 0) { #ifdef DEBUG - fprintf (stderr, "nxagentCollectPropertyEvent: Aborting selection notify procedure for client [%d].\n", + fprintf (stderr, "%s: Aborting selection notify procedure for client [%d].\n", __func__, lastClientClientPtr -> index); #endif @@ -962,7 +961,7 @@ void nxagentCollectPropertyEvent(int resource) } #ifdef DEBUG - fprintf(stderr, "nxagentCollectPropertyEvent: Got property size from remote server.\n"); + fprintf(stderr, "%s: Got property size from remote server.\n", __func__); #endif /* @@ -980,14 +979,14 @@ void nxagentCollectPropertyEvent(int resource) { PrintClientSelectionStage(); #ifdef DEBUG - fprintf (stderr, "nxagentCollectPropertyEvent: Got data notify event for client [%d].\n", + fprintf (stderr, "%s: Got data notify event for client [%d].\n", __func__, lastClientClientPtr -> index); #endif if (ulReturnBytesLeft != 0) { #ifdef DEBUG - fprintf (stderr, "nxagentCollectPropertyEvent: Aborting selection notify procedure for client [%d].\n", + fprintf (stderr, "%s: Aborting selection notify procedure for client [%d].\n", __func__, lastClientClientPtr -> index); #endif @@ -1001,7 +1000,7 @@ void nxagentCollectPropertyEvent(int resource) } #ifdef DEBUG - fprintf(stderr, "nxagentCollectPropertyEvent: Got property content from remote server.\n"); + fprintf(stderr, "%s: Got property content from remote server.\n", __func__); #endif ChangeWindowProperty(lastClientWindowPtr, @@ -1011,7 +1010,7 @@ void nxagentCollectPropertyEvent(int resource) ulReturnItems, pszReturnData, 1); #ifdef DEBUG - fprintf(stderr, "nxagentCollectPropertyEvent: Selection property [%s] changed to [%s]\n", + fprintf(stderr, "%s: Selection property [%s] changed to [%s]\n", __func__, validateString(NameForAtom(lastClientProperty)), pszReturnData); #endif @@ -1029,7 +1028,7 @@ void nxagentCollectPropertyEvent(int resource) default: { #ifdef DEBUG - fprintf (stderr, "nxagentCollectPropertyEvent: WARNING! Inconsistent state [%s] for client [%d].\n", + fprintf (stderr, "%s: WARNING! Inconsistent state [%s] for client [%d].\n", __func__, GetClientSelectionStageString(lastClientStage), lastClientClientPtr -> index); #endif @@ -1045,7 +1044,7 @@ void nxagentNotifySelection(XEvent *X) XSelectionEvent eventSelection; #ifdef DEBUG - fprintf(stderr, "nxagentNotifySelection: Got called.\n"); + fprintf(stderr, "%s: Got called.\n", __func__); #endif if (agentClipboardStatus != 1) @@ -1054,7 +1053,7 @@ void nxagentNotifySelection(XEvent *X) } #ifdef DEBUG - fprintf(stderr, "nxagentNotifySelection: SelectionNotify event.\n"); + fprintf(stderr, "%s: SelectionNotify event.\n", __func__); #endif PrintClientSelectionStage(); @@ -1064,7 +1063,7 @@ void nxagentNotifySelection(XEvent *X) if ((lastClientStage == SelectionStageNone) && (X->xselection.property == serverCutProperty)) { #ifdef DEBUG - fprintf(stderr, "nxagentNotifySelection: Starting selection transferral for client [%d].\n", + fprintf(stderr, "%s: Starting selection transferral for client [%d].\n", __func__, lastClientClientPtr -> index); #endif @@ -1087,7 +1086,7 @@ void nxagentNotifySelection(XEvent *X) else { #ifdef DEBUG - fprintf(stderr, "nxagentNotifySelection: WARNING! Resetting selection transferral for client [%d].\n", + fprintf(stderr, "%s: WARNING! Resetting selection transferral for client [%d].\n", __func__, lastClientClientPtr -> index); #endif @@ -1227,8 +1226,8 @@ void nxagentResetSelectionOwner(void) if (lastServerRequestor != None) { #ifdef TEST - fprintf (stderr, "nxagentResetSelectionOwner: WARNING! Requestor window [0x%x] already found.\n", - lastServerRequestor); + fprintf(stderr, "%s: WARNING! Requestor window [0x%x] already found.\n", __func__, + lastServerRequestor); #endif return; @@ -1242,7 +1241,7 @@ void nxagentResetSelectionOwner(void) { XSetSelectionOwner(nxagentDisplay, lastSelectionOwner[i].selection, serverWindow, CurrentTime); - fprintf (stderr, "nxagentResetSelectionOwner: Reset clipboard state.\n"); + fprintf(stderr, "%s: Reset clipboard state.\n", __func__); lastSelectionOwner[i].client = NULL; lastSelectionOwner[i].window = None; @@ -1262,7 +1261,7 @@ void nxagentSetSelectionOwner(Selection *pSelection) { int i; #ifdef DEBUG - fprintf(stderr, "nxagentSetSelectionOwner: Got called.\n"); + fprintf(stderr, "%s: Got called.\n", __func__); #endif if (agentClipboardStatus != 1) @@ -1271,14 +1270,14 @@ void nxagentSetSelectionOwner(Selection *pSelection) } #ifdef DEBUG - fprintf(stderr, "nxagentSetSelectionOwner: Setting selection owner to window [0x%x].\n", + fprintf(stderr, "%s: Setting selection owner to window [0x%x].\n", __func__, serverWindow); #endif #ifdef TEST if (lastServerRequestor != None) { - fprintf (stderr, "nxagentSetSelectionOwner: WARNING! Requestor window [0x%x] already found.\n", + fprintf (stderr, "%s: WARNING! Requestor window [0x%x] already found.\n", __func__, lastServerRequestor); } #endif @@ -1310,7 +1309,7 @@ FIXME if (XGetSelectionOwner(nxagentDisplay,pSelection->selection)==serverWindow) { - fprintf (stderr, "NXdispatch: SetSelectionOwner OK\n"); + fprintf (stderr, "%s: SetSelectionOwner OK\n", __func__); lastSelectionOwnerSelection = pSelection; lastSelectionOwnerClient = pSelection->client; @@ -1322,7 +1321,7 @@ FIXME lastServerRequestor = None; } - else fprintf (stderr, "nxagentSetSelectionOwner: SetSelectionOwner failed\n"); + else fprintf (stderr, "%s: SetSelectionOwner failed\n", __func__); */ } @@ -1338,7 +1337,7 @@ FIXME: Why this pointer can be not a valid if (clients[client -> index] != client) { #ifdef WARNING - fprintf(stderr, "nxagentNotifyConvertFailure: WARNING! Invalid client pointer."); + fprintf(stderr, "%s: WARNING! Invalid client pointer.", __func__); #endif return; @@ -1388,14 +1387,14 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, if (lastClientWindowPtr != NULL) { #ifdef TEST - fprintf(stderr, "nxagentConvertSelection: lastClientWindowPtr != NULL.\n"); + fprintf(stderr, "%s: lastClientWindowPtr != NULL.\n", __func__); #endif if ((GetTimeInMillis() - lastClientReqTime) > 5000) { #ifdef DEBUG - fprintf(stderr, "nxagentConvertSelection: timeout expired on last request, " - "notifying failure to client\n"); + fprintf(stderr, "%s: timeout expired on last request, " + "notifying failure to client\n", __func__); #endif nxagentNotifyConvertFailure(lastClientClientPtr, lastClientRequestor, @@ -1407,8 +1406,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, else { #ifdef DEBUG - fprintf(stderr, "nxagentConvertSelection: got request " - "before timeout expired on last request, notifying failure to client\n"); + fprintf(stderr, "%s: got request " + "before timeout expired on last request, notifying failure to client\n", __func__); #endif nxagentNotifyConvertFailure(client, requestor, selection, target, time); @@ -1418,8 +1417,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, } #ifdef TEST - fprintf(stderr, "nxagentConvertSelection: client [%d] ask for sel [%s] " - "on window [%x] prop [%s] target [%s].\n", + fprintf(stderr, "%s: client [%d] ask for sel [%s] " + "on window [%x] prop [%s] target [%s].\n", __func__, client -> index, validateString(NameForAtom(selection)), requestor, validateString(NameForAtom(property)), validateString(NameForAtom(target))); #endif @@ -1508,8 +1507,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, */ #ifdef DEBUG - fprintf(stderr, "nxagentConvertSelection: Consecutives request from client [%p] selection [%u] " - "elapsed time [%u] clientAccum [%d]\n", (void *) client, selection, + fprintf(stderr, "%s: Consecutives request from client [%p] selection [%u] " + "elapsed time [%u] clientAccum [%d]\n", __func__, (void *) client, selection, GetTimeInMillis() - lastClientReqTime, clientAccum); #endif @@ -1557,7 +1556,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, } #ifdef DEBUG - fprintf(stderr, "nxagentConvertSelection: Sent XConvertSelection with target=[%s], property [%s]\n", + fprintf(stderr, "%s: Sent XConvertSelection with target=[%s], property [%s]\n", __func__, validateString(NameForAtom(target)), validateString(NameForAtom(property))); #endif @@ -1568,8 +1567,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, xEvent x; #ifdef DEBUG - fprintf(stderr, "nxagentConvertSelection: Xserver generates a SelectionNotify event " - "to the requestor with property None.\n"); + fprintf(stderr, "%s: Xserver generates a SelectionNotify event " + "to the requestor with property None.\n", __func__); #endif memset(&x, 0, sizeof(xEvent)); @@ -1654,7 +1653,7 @@ int nxagentSendNotify(xEvent *event) return 1; } #ifdef DEBUG - fprintf(stderr, "nxagentSendNotify: sent nothing.\n"); + fprintf(stderr, "%s: sent nothing.\n", __func__); #endif return 0; } @@ -1699,7 +1698,7 @@ int nxagentInitClipboard(WindowPtr pWin) Window iWindow = nxagentWindow(pWin); #ifdef DEBUG - fprintf(stderr, "nxagentInitClipboard: Got called.\n"); + fprintf(stderr, "%s: Got called.\n", __func__); #endif free(lastSelectionOwner); @@ -1731,7 +1730,7 @@ int nxagentInitClipboard(WindowPtr pWin) { extern unsigned long startTime; - fprintf(stderr, "nxagentInitClipboard: Initializing start [%d] milliseconds.\n", + fprintf(stderr, "%s: Initializing start [%d] milliseconds.\n", __func__, GetTimeInMillis() - startTime); } #endif @@ -1775,7 +1774,7 @@ int nxagentInitClipboard(WindowPtr pWin) else { #ifdef TEST - fprintf(stderr, "nxagentInitClipboard: Registering for XFixesSelectionNotify events.\n"); + fprintf(stderr, "%s: Registering for XFixesSelectionNotify events.\n", __func__); #endif for (i = 0; i < nxagentMaxSelections; i++) @@ -1801,8 +1800,8 @@ int nxagentInitClipboard(WindowPtr pWin) if (nxagentSessionId[0]) { #ifdef TEST - fprintf(stderr, "nxagentInitClipboard: setting the ownership of %s to %lx" - " and registering for PropertyChangeMask events\n", + fprintf(stderr, "%s: setting the ownership of %s to %lx" + " and registering for PropertyChangeMask events\n", __func__, validateString(XGetAtomName(nxagentDisplay, nxagentAtoms[10])), iWindow); #endif @@ -1847,8 +1846,8 @@ int nxagentInitClipboard(WindowPtr pWin) if (clientCutProperty == None) { #ifdef PANIC - fprintf(stderr, "nxagentInitClipboard: PANIC! " - "Could not create NX_CUT_BUFFER_CLIENT atom.\n"); + fprintf(stderr, "%s: PANIC! " + "Could not create NX_CUT_BUFFER_CLIENT atom.\n", __func__); #endif return -1; @@ -1858,14 +1857,14 @@ int nxagentInitClipboard(WindowPtr pWin) agentClipboardStatus = 1; #ifdef DEBUG - fprintf(stderr, "nxagentInitClipboard: Clipboard initialization completed.\n"); + fprintf(stderr, "%s: Clipboard initialization completed.\n", __func__); #endif #ifdef NXAGENT_TIMESTAMP { extern unsigned long startTime; - fprintf(stderr, "nxagentInitClipboard: initializing ends [%d] milliseconds.\n", + fprintf(stderr, "%s: initializing ends [%d] milliseconds.\n", __func__, GetTimeInMillis() - startTime); } #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 2804320164cc0c0cc16741ca89eec8ba860723f3 Merge: 2eb4a65 60bce14 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Oct 27 20:56:24 2018 +0200 Merge branch 'uli42-pr/clipboard_debug' into 3.6.x Attributes GH PR #731: https://github.com/ArcticaProject/nx-libs/pull/731 nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 569 ++++++++++++++++-------- nx-X11/programs/Xserver/hw/nxagent/NXproperty.c | 25 +- nx-X11/programs/Xserver/hw/nxagent/Utils.h | 2 + 3 files changed, 411 insertions(+), 185 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 2517d8c1f9c2d4460e0ddcccc66a7f0835d2d847 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 25 22:25:22 2018 +0200 Clipboard.c: more DEBUG output --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 285a738..942771a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1588,14 +1588,21 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, int nxagentSendNotify(xEvent *event) { #ifdef DEBUG - fprintf(stderr, "nxagentSendNotify: Got called.\n"); + fprintf(stderr, "%s: Got called.\n", __func__); #endif if (agentClipboardStatus != 1) { + #ifdef DEBUG + fprintf(stderr, "%s: agentClipboardStatus != 1 - doing nothing.\n", __func__); + #endif return 0; } + #ifdef DEBUG + fprintf(stderr, "%s: property is [%d][%s].\n", __func__, event->u.selectionNotify.property, NameForAtom(event->u.selectionNotify.property)); + #endif + if (event->u.selectionNotify.property == clientCutProperty) { XSelectionEvent x; @@ -1630,7 +1637,7 @@ int nxagentSendNotify(xEvent *event) x.time = CurrentTime; #ifdef DEBUG - fprintf(stderr, "nxagentSendNotify: Propagating clientCutProperty to requestor [%p].\n", x.requestor); + fprintf(stderr, "%s: Propagating clientCutProperty to requestor [%p].\n", __func__, x.requestor); #endif result = XSendEvent (nxagentDisplay, x.requestor, False, @@ -1646,7 +1653,9 @@ int nxagentSendNotify(xEvent *event) return 1; } - + #ifdef DEBUG + fprintf(stderr, "nxagentSendNotify: sent nothing.\n"); + #endif return 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 6ea7558d17fd848284b75bc56fcd0de566c7e5c8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Oct 22 00:29:35 2018 +0200 Clipboard.c: fix fprintf type warnings --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 942771a..1726586 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -221,17 +221,17 @@ void nxagentPrintSelectionStat(int sel) #ifdef CLIENTIDS fprintf(stderr, " lastSelectionOwner[].client [%p] index [%d] PID [%d] Cmd [%s]\n", - lOwner.client, + (void *)lOwner.client, lOwner.client ? lOwner.client->index : -1, GetClientPid(lOwner.client), GetClientCmdName(lOwner.client)); #else fprintf(stderr, " lastSelectionOwner[].client [%p] index [%d]\n", - lOwner.client, + (void *)lOwner.client, lOwner.client ? lOwner.client->index : -1); #endif fprintf(stderr, " lastSelectionOwner[].window [0x%x]\n", lOwner.window); - fprintf(stderr, " lastSelectionOwner[].windowPtr [%p]\n", lOwner.windowPtr); + fprintf(stderr, " lastSelectionOwner[].windowPtr [%p]\n", (void *)lOwner.windowPtr); fprintf(stderr, " lastSelectionOwner[].lastTimeChanged [%u]\n", lOwner.lastTimeChanged); /* @@ -249,13 +249,13 @@ void nxagentPrintSelectionStat(int sel) } #ifdef CLIENTIDS fprintf(stderr, " CurrentSelections[].client [%p] index [%d] PID [%d] Cmd [%s]\n", - curSel.client, + (void *)curSel.client, curSel.client ? curSel.client->index : -1, GetClientPid(curSel.client), GetClientCmdName(curSel.client)); #else fprintf(stderr, " CurrentSelections[].client [%p] index [%d]\n", - curSel.client, + (void *)curSel.client, curSel.client ? curSel.client->index : -1); #endif fprintf(stderr, " CurrentSelections[].window [0x%x]\n", curSel.window); @@ -385,7 +385,7 @@ Bool nxagentValidServerTargets(Atom target) } #ifdef DEBUG - fprintf(stderr, "%s: invalid target [%ld].\n", __func__, target); + fprintf(stderr, "%s: invalid target [%u].\n", __func__, target); #endif return False; } @@ -441,7 +441,7 @@ void nxagentClearSelection(XEvent *X) int i = 0; #ifdef DEBUG - fprintf(stderr, "%s: SelectionClear event for selection [%d].\n", __func__, X->xselectionclear.selection); + fprintf(stderr, "%s: SelectionClear event for selection [%lu].\n", __func__, X->xselectionclear.selection); #endif nxagentPrintClipboardStat("before nxagentClearSelection"); @@ -1192,7 +1192,7 @@ void nxagentNotifySelection(XEvent *X) */ #ifdef DEBUG - fprintf(stderr, "nxagentNotifySelection: Sending event to requestor [%p].\n", eventSelection.requestor); + fprintf(stderr, "%s: Sending event to requestor [%p].\n", __func__, (void *)eventSelection.requestor); #endif result = XSendEvent(nxagentDisplay, @@ -1227,7 +1227,7 @@ void nxagentResetSelectionOwner(void) if (lastServerRequestor != None) { #ifdef TEST - fprintf (stderr, "nxagentResetSelectionOwner: WARNING! Requestor window [0x%lx] already found.\n", + fprintf (stderr, "nxagentResetSelectionOwner: WARNING! Requestor window [0x%x] already found.\n", lastServerRequestor); #endif @@ -1271,14 +1271,14 @@ void nxagentSetSelectionOwner(Selection *pSelection) } #ifdef DEBUG - fprintf(stderr, "nxagentSetSelectionOwner: Setting selection owner to window [0x%lx].\n", + fprintf(stderr, "nxagentSetSelectionOwner: Setting selection owner to window [0x%x].\n", serverWindow); #endif #ifdef TEST if (lastServerRequestor != None) { - fprintf (stderr, "nxagentSetSelectionOwner: WARNING! Requestor window [0x%lx] already found.\n", + fprintf (stderr, "nxagentSetSelectionOwner: WARNING! Requestor window [0x%x] already found.\n", lastServerRequestor); } #endif @@ -1419,7 +1419,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, #ifdef TEST fprintf(stderr, "nxagentConvertSelection: client [%d] ask for sel [%s] " - "on window [%lx] prop [%s] target [%s].\n", + "on window [%x] prop [%s] target [%s].\n", client -> index, validateString(NameForAtom(selection)), requestor, validateString(NameForAtom(property)), validateString(NameForAtom(target))); #endif @@ -1508,8 +1508,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, */ #ifdef DEBUG - fprintf(stderr, "nxagentConvertSelection: Consecutives request from client [%p] selection [%ld] " - "elapsed time [%lu] clientAccum [%d]\n", (void *) client, selection, + fprintf(stderr, "nxagentConvertSelection: Consecutives request from client [%p] selection [%u] " + "elapsed time [%u] clientAccum [%d]\n", (void *) client, selection, GetTimeInMillis() - lastClientReqTime, clientAccum); #endif @@ -1637,7 +1637,7 @@ int nxagentSendNotify(xEvent *event) x.time = CurrentTime; #ifdef DEBUG - fprintf(stderr, "%s: Propagating clientCutProperty to requestor [%p].\n", __func__, x.requestor); + fprintf(stderr, "%s: Propagating clientCutProperty to requestor [%p].\n", __func__, (void *)x.requestor); #endif result = XSendEvent (nxagentDisplay, x.requestor, False, @@ -1664,7 +1664,7 @@ WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin) int i = 0; #ifdef DEBUG - fprintf(stderr, "%s: Got called, property [%d][%s] window [%p].\n", __func__, property, NameForAtom(property), pWin); + fprintf(stderr, "%s: Got called, property [%d][%s] window [%p].\n", __func__, property, NameForAtom(property), (void *)pWin); #endif while ((i < nxagentMaxSelections) && @@ -1677,7 +1677,7 @@ WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin) (lastSelectionOwner[i].windowPtr != NULL)) { #ifdef DEBUG - fprintf(stderr, "%s: Returning last clipboard owner window [%p].\n", __func__, lastSelectionOwner[i].windowPtr); + fprintf(stderr, "%s: Returning last clipboard owner window [%p].\n", __func__, (void *)lastSelectionOwner[i].windowPtr); #endif return lastSelectionOwner[i].windowPtr; @@ -1685,7 +1685,7 @@ WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin) else { #ifdef DEBUG - fprintf(stderr, "%s: Returning original target window [%p].\n", __func__, pWin); + fprintf(stderr, "%s: Returning original target window [%p].\n", __func__, (void *)pWin); #endif return pWin; @@ -1751,14 +1751,14 @@ int nxagentInitClipboard(WindowPtr pWin) if (serverCutProperty == None) { #ifdef PANIC - fprintf(stderr, "nxagentInitClipboard: PANIC! Could not create NX_CUT_BUFFER_SERVER atom\n"); + fprintf(stderr, "%s: PANIC! Could not create NX_CUT_BUFFER_SERVER atom\n", __func__); #endif return -1; } #ifdef TEST - fprintf(stderr, "nxagentInitClipboard: Setting owner of selection [%s][%d] on window 0x%lx\n", + fprintf(stderr, "%s: Setting owner of selection [%s][%d] on window 0x%x\n", __func__, "NX_CUT_BUFFER_SERVER", (int) serverCutProperty, iWindow); #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 2769cbb9d35980c0a4f0038df53b7706f71f12d8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Oct 25 17:23:00 2018 +0200 Window.c: indent FIXMEs --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 54 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 5f9dc45..949b863 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -306,9 +306,9 @@ Bool nxagentCreateWindow(WindowPtr pWin) (void*)pWin, attributes.backing_store); #endif -/* -FIXME: We need to set save under on the real display? -*/ + /* + FIXME: We need to set save under on the real display? + */ if (nxagentSaveUnder) { mask |= CWSaveUnder; @@ -461,10 +461,10 @@ FIXME: We need to set save under on the real display? * memory, if the composite extension is * supported on the display. */ -/* -FIXME: Do all the windows for which nxagentWindowTopLevel(pWin) - returns true need to be redirected? -*/ + /* + FIXME: Do all the windows for which nxagentWindowTopLevel(pWin) + returns true need to be redirected? + */ nxagentRedirectWindow(pWin); } @@ -1753,10 +1753,10 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) attributes.win_gravity = pWin -> winGravity; } -/* -FIXME: Do we need to set the attribute on the - remote display? -*/ + /* + FIXME: Do we need to set the attribute on the + remote display? + */ if (mask & CWBackingStore) { attributes.backing_store = pWin -> backingStore; @@ -1796,10 +1796,10 @@ FIXME: Do we need to set the attribute on the attributes.override_redirect = pWin -> overrideRedirect; } -/* -FIXME: Do we need to set the attribute on the - remote display? -*/ + /* + FIXME: Do we need to set the attribute on the + remote display? + */ if (mask & CWSaveUnder) { attributes.save_under = pWin -> saveUnder; @@ -1825,11 +1825,11 @@ FIXME: Do we need to set the attribute on the pCmap = (ColormapPtr) LookupIDByType(wColormap(pWin), RT_COLORMAP); -/* -FIXME: When the caller is nxagentReconfigureWindow - sometimes wColormap(pWin) is 0. Could a window - have no colormap? -*/ + /* + FIXME: When the caller is nxagentReconfigureWindow + sometimes wColormap(pWin) is 0. Could a window + have no colormap? + */ if (pCmap != NULL) { attributes.colormap = nxagentColormap(pCmap); @@ -2647,7 +2647,7 @@ Bool nxagentDisconnectAllWindows(void) /* * FIXME: We are giving up reconnecting those void * * that are not resource, and we are just disconnecting them. - * perhaps we could do better and reconnect them. + * Perhaps we could do better and reconnect them. */ void nxagentDisconnectWindow(void * p0, XID x1, void * p2) @@ -2921,9 +2921,9 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer attributes.backing_pixel = pWin->optional->backingPixel; } -/* -FIXME: Do we need to set save unders attribute here? -*/ + /* + FIXME: Do we need to set save unders attribute here? + */ if (nxagentSaveUnder) { mask |= CWSaveUnder; @@ -3528,11 +3528,11 @@ void nxagentFlushConfigureWindow(void) void nxagentPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) { -/* -FIXME: Do we need this here? + /* + FIXME: Do we need this here? nxagentFlushConfigureWindow(); -*/ + */ 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 e8c6a741866b00756747878bc796f99c1987faab Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Oct 25 17:18:38 2018 +0200 Window.c: convert old-style function definitions to ANSI C89 style --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index d25424d..5f9dc45 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -263,8 +263,7 @@ WindowPtr nxagentWindowPtr(Window window) return match.pWin; } -Bool nxagentCreateWindow(pWin) - WindowPtr pWin; +Bool nxagentCreateWindow(WindowPtr pWin) { unsigned long mask; XSetWindowAttributes attributes; @@ -1568,9 +1567,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) } } -void nxagentReparentWindow(pWin, pOldParent) - WindowPtr pWin; - WindowPtr pOldParent; +void nxagentReparentWindow(WindowPtr pWin, WindowPtr pOldParent) { if (nxagentScreenTrap) { @@ -1589,9 +1586,7 @@ void nxagentReparentWindow(pWin, pOldParent) pWin->origin.y - wBorderWidth(pWin)); } -Bool nxagentChangeWindowAttributes(pWin, mask) - WindowPtr pWin; - unsigned long mask; +Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { XSetWindowAttributes attributes; @@ -1953,8 +1948,7 @@ Bool nxagentRealizeWindow(WindowPtr pWin) return True; } -Bool nxagentUnrealizeWindow(pWin) - WindowPtr pWin; +Bool nxagentUnrealizeWindow(WindowPtr pWin) { if (nxagentScreenTrap) { @@ -2011,10 +2005,7 @@ void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) } } -void nxagentPaintWindowBackground(pWin, pRegion, what) - WindowPtr pWin; - RegionPtr pRegion; - int what; +void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) { int i; @@ -3428,8 +3419,7 @@ Bool nxagentIsIconic(WindowPtr pWin) } } -void nxagentSetTopLevelEventMask(pWin) - WindowPtr pWin; +void nxagentSetTopLevelEventMask(WindowPtr pWin) { unsigned long mask = CWEventMask; XSetWindowAttributes attributes; -- 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 7a0b401bc4b9d503e22bf671cec8a32fbe99cf51 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Oct 25 17:23:45 2018 +0200 Window.c: reformat/add braces for readability --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 152 ++++++++++++++++++++-------- 1 file changed, 110 insertions(+), 42 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 949b863..7c21f50 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -257,7 +257,10 @@ WindowPtr nxagentWindowPtr(Window window) { WalkTree(screenInfo.screens[i], nxagentFindWindowMatch, (void *) &match); - if (match.pWin) break; + if (match.pWin) + { + break; + } } return match.pWin; @@ -285,11 +288,13 @@ Bool nxagentCreateWindow(WindowPtr pWin) fprintf(stderr, "nxagentCreateWindow: nxagentSplashCount [%d]\n", nxagentSplashCount); #endif - if (pWin->drawable.class == InputOnly) { + if (pWin->drawable.class == InputOnly) + { mask = CWEventMask; visual = CopyFromParent; } - else { + else + { mask = CWEventMask | CWBackingStore; if (pWin->optional) @@ -310,31 +315,41 @@ Bool nxagentCreateWindow(WindowPtr pWin) FIXME: We need to set save under on the real display? */ if (nxagentSaveUnder) - { - mask |= CWSaveUnder; - attributes.save_under = False; - } + { + mask |= CWSaveUnder; + attributes.save_under = False; + } - if (pWin->parent) { - if (pWin->optional && pWin->optional->visual != wVisual(pWin->parent)) { + if (pWin->parent) + { + if (pWin->optional && pWin->optional->visual != wVisual(pWin->parent)) + { visual = nxagentVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); mask |= CWColormap; - if (pWin->optional->colormap) { + if (pWin->optional->colormap) + { pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP); attributes.colormap = nxagentColormap(pCmap); } else + { attributes.colormap = nxagentDefaultVisualColormap(visual); + } } else if (pWin->optional) - visual = CopyFromParent; - else { + { + visual = CopyFromParent; + } + else + { visual = nxagentVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); mask |= CWColormap; attributes.colormap = nxagentDefaultVisualColormap(visual); } } - else { /* root windows have their own colormaps at creation time */ + else + { + /* root windows have their own colormaps at creation time */ visual = nxagentVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP); mask |= CWColormap; @@ -473,11 +488,15 @@ Bool nxagentCreateWindow(WindowPtr pWin) Atom prop = MakeAtom("NX_REAL_WINDOW", strlen("NX_REAL_WINDOW"), True); if (ChangeWindowProperty(pWin, prop, XA_WINDOW, 32, PropModeReplace, 1, nxagentWindowPriv(pWin), 1) != Success) - fprintf(stderr, "nxagentCreateWindow: Adding NX_REAL_WINDOW failed.\n"); -#ifdef DEBUG + { + fprintf(stderr, "nxagentCreateWindow: Adding NX_REAL_WINDOW failed.\n"); + } + #ifdef DEBUG else - fprintf(stderr, "nxagentCreateWindow: Added NX_REAL_WINDOW for Window ID [%x].\n", nxagentWindowPriv(pWin)->window); -#endif + { + fprintf(stderr, "nxagentCreateWindow: Added NX_REAL_WINDOW for Window ID [%x].\n", nxagentWindowPriv(pWin)->window); + } + #endif } nxagentWindowPriv(pWin)->x = pWin->origin.x - wBorderWidth(pWin); @@ -537,11 +556,15 @@ void nxagentSetVersionProperty(WindowPtr pWin) Atom prop = MakeAtom(name, strlen(name), True); if (ChangeWindowProperty(pWin, prop, XA_STRING, 8, PropModeReplace, strlen(NX_VERSION_CURRENT_STRING), NX_VERSION_CURRENT_STRING, True) != Success) + { fprintf(stderr, "%s: Adding property [%s], value [%s] failed.\n", __func__, name, NX_VERSION_CURRENT_STRING); -#ifdef DEBUG + } + #ifdef DEBUG else - fprintf(stderr, "%s: Added property [%s], value [%s] for root window [%x].\n", __func__, name, NX_VERSION_CURRENT_STRING, pWin); -#endif + { + fprintf(stderr, "%s: Added property [%s], value [%s] for root window [%x].\n", __func__, name, NX_VERSION_CURRENT_STRING, pWin); + } + #endif } Bool nxagentSomeWindowsAreMapped(void) @@ -1907,7 +1930,9 @@ Bool nxagentRealizeWindow(WindowPtr pWin) 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"); + } } #ifdef SHAPE @@ -1963,7 +1988,9 @@ Bool nxagentUnrealizeWindow(WindowPtr pWin) 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"); + } } XUnmapWindow(nxagentDisplay, nxagentWindow(pWin)); @@ -2121,7 +2148,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo * * - We create a "fake" off-screen window. For every generated region * we send a ConfigureWindow request for that window to synchronize - * ourselves with both the remote X server and/or the window manager. + * ourselves with both the remote X server and/or the window manager. * * - When the ConfigureNotify is received, we calculate the difference * between the "remote-region" and the "local-region" for the window @@ -2301,9 +2328,15 @@ static Bool nxagentRegionEqual(RegionPtr pReg1, RegionPtr pReg2) BoxPtr pBox1, pBox2; unsigned int n1, n2; - if (pReg1 == pReg2) return True; + if (pReg1 == pReg2) + { + return True; + } - if (pReg1 == NullRegion || pReg2 == NullRegion) return False; + if (pReg1 == NullRegion || pReg2 == NullRegion) + { + return False; + } pBox1 = RegionRects(pReg1); n1 = RegionNumRects(pReg1); @@ -2311,11 +2344,20 @@ static Bool nxagentRegionEqual(RegionPtr pReg1, RegionPtr pReg2) pBox2 = RegionRects(pReg2); n2 = RegionNumRects(pReg2); - if (n1 != n2) return False; + if (n1 != n2) + { + return False; + } - if (pBox1 == pBox2) return True; + if (pBox1 == pBox2) + { + return True; + } - if (memcmp(pBox1, pBox2, n1 * sizeof(BoxRec))) return False; + if (memcmp(pBox1, pBox2, n1 * sizeof(BoxRec))) + { + return False; + } return True; } @@ -2697,11 +2739,15 @@ void nxagentDisconnectWindow(void * p0, XID x1, void * p2) Atom prop = MakeAtom("NX_REAL_WINDOW", strlen("NX_REAL_WINDOW"), True); if (DeleteProperty(pWin, prop) != Success) + { fprintf(stderr, "nxagentDisconnectWindow: Deleting NX_REAL_WINDOW failed.\n"); -#ifdef DEBUG + } + #ifdef DEBUG else - fprintf(stderr, "nxagentDisconnectWindow: Deleting NX_REAL_WINDOW from Window ID [%x].\n", nxagentWindowPriv(pWin)->window); -#endif + { + fprintf(stderr, "nxagentDisconnectWindow: Deleting NX_REAL_WINDOW from Window ID [%x].\n", nxagentWindowPriv(pWin)->window); + } + #endif } nxagentWindow(pWin) = None; @@ -2899,17 +2945,21 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer ColormapPtr pCmap; if (!pWin || !*pBool) + { return; + } #ifdef NXAGENT_RECONNECT_WINDOW_DEBUG fprintf(stderr, "nxagentReconnectWindow: %p - ID %lx\n", pWin, nxagentWindow(pWin)); #endif - if (pWin->drawable.class == InputOnly) { + if (pWin->drawable.class == InputOnly) + { mask = CWEventMask; visual = CopyFromParent; } - else { + else + { mask = CWEventMask | CWBackingStore; attributes.backing_store = NotUseful; @@ -2930,21 +2980,30 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer attributes.save_under = pWin->saveUnder; } - if (pWin->parent) { - if (pWin->optional && pWin->optional->visual != wVisual(pWin->parent)) { + if (pWin->parent) + { + if (pWin->optional && pWin->optional->visual != wVisual(pWin->parent)) + { visual = nxagentVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); mask |= CWColormap; - if (pWin->optional->colormap) { + if (pWin->optional->colormap) + { pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP); attributes.colormap = nxagentColormap(pCmap); } else + { attributes.colormap = nxagentDefaultVisualColormap(visual); + } } else + { visual = CopyFromParent; + } } - else { /* root windows have their own colormaps at creation time */ + else + { + /* root windows have their own colormaps at creation time */ visual = nxagentVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP); mask |= CWColormap; @@ -3138,11 +3197,15 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer Atom prop = MakeAtom("NX_REAL_WINDOW", strlen("NX_REAL_WINDOW"), True); if (ChangeWindowProperty(pWin, prop, XA_WINDOW, 32, PropModeReplace, 1, nxagentWindowPriv(pWin), 1) != Success) - fprintf(stderr, "nxagentReconnectWindow: Updating NX_REAL_WINDOW failed.\n"); -#ifdef DEBUG + { + fprintf(stderr, "nxagentReconnectWindow: Updating NX_REAL_WINDOW failed.\n"); + } + #ifdef DEBUG else - fprintf(stderr, "nxagentReconnectWindow: Updated NX_REAL_WINDOW for Window ID [%x].\n", nxagentWindowPriv(pWin)->window); -#endif + { + fprintf(stderr, "nxagentReconnectWindow: Updated NX_REAL_WINDOW for Window ID [%x].\n", nxagentWindowPriv(pWin)->window); + } + #endif } if (nxagentDrawableStatus((DrawablePtr) pWin) == NotSynchronized) @@ -3159,7 +3222,9 @@ static void nxagentReconfigureWindowCursor(void * param0, XID param1, void * dat ScreenPtr pScreen; if (!pWin || !*pBool || !(pCursor = wCursor(pWin))) + { return; + } pScreen = pWin -> drawable.pScreen; @@ -3216,16 +3281,19 @@ static void nxagentReconfigureWindow(void * param0, XID param1, void * data_buff #endif if (pWin -> drawable.class == InputOnly) + { mask = CWWinGravity | CWEventMask | CWDontPropagate | CWOverrideRedirect | CWCursor; + } else + { mask = CWBackPixmap | CWBackPixel | CWBorderPixmap | CWBorderPixel | CWBitGravity | CWWinGravity | CWBackingStore | CWBackingPlanes | CWBackingPixel | CWOverrideRedirect | CWSaveUnder | CWEventMask | CWDontPropagate | CWColormap | CWCursor; - + } nxagentChangeWindowAttributes(pWin, mask); -#ifdef SHAPE + #ifdef SHAPE if (nxagentWindowPriv(pWin) -> boundingShape) { RegionDestroy( @@ -3240,7 +3308,7 @@ static void nxagentReconfigureWindow(void * param0, XID param1, void * data_buff nxagentWindowPriv(pWin) -> clipShape = NULL; } nxagentShapeWindow(pWin); -#endif + #endif if (pWin != screenInfo.screens[0]->root) { -- 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 ea275309b0e891ac3ef4d841acefbfc030b2a041 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Oct 25 17:24:49 2018 +0200 Window.c: whitespace cleanup --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 170 ++++++---------------------- 1 file changed, 34 insertions(+), 136 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 80c348f..a21bc4e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -129,7 +129,7 @@ int nxagentSplashCount = 0; Bool nxagentExposeArrayIsInitialized = False; Window nxagentConfiguredSynchroWindow; -static int nxagentExposeSerial = 0; +static int nxagentExposeSerial = 0; StoringPixmapPtr nxagentBSPixmapList[BSPIXMAPLIMIT]; @@ -142,13 +142,10 @@ typedef struct _WindowMatch { WindowPtr pWin; Window id; - } WindowMatchRec; Bool nxagentReconnectAllWindows(void *); - Bool nxagentDisconnectAllWindows(void); - Bool nxagentIsIconic(WindowPtr); /* @@ -169,21 +166,13 @@ void nxagentClearSplash(WindowPtr pWin); */ static Bool nxagentSomeWindowsAreMapped(void); - static void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what); - static void nxagentTraverseWindow(WindowPtr, void(*)(void *, XID, void *), void *); - static void nxagentDisconnectWindow(void *, XID, void *); - static Bool nxagentLoopOverWindows(void(*)(void *, XID, void *)); - static void nxagentReconfigureWindowCursor(void *, XID, void *); - static void nxagentReconnectWindow(void *, XID, void *); - static void nxagentReconfigureWindow(void *, XID, void *); - static int nxagentForceExposure(WindowPtr pWin, void * ptr); /* by dimbor */ @@ -199,9 +188,7 @@ nxagentWMStateRec; */ #ifdef TEST - static Bool nxagentCheckWindowIntegrity(WindowPtr pWin); - #endif WindowPtr nxagentGetWindowFromID(Window id) @@ -235,7 +222,6 @@ static int nxagentFindWindowMatch(WindowPtr pWin, void * ptr) if (match -> id == nxagentWindow(pWin)) { match -> pWin = pWin; - return WT_STOPWALKING; } else @@ -247,7 +233,6 @@ static int nxagentFindWindowMatch(WindowPtr pWin, void * ptr) WindowPtr nxagentWindowPtr(Window window) { int i; - WindowMatchRec match; match.pWin = NullWindow; @@ -406,23 +391,14 @@ Bool nxagentCreateWindow(WindowPtr pWin) nxagentWindowPriv(pWin) -> isMapped = 0; nxagentWindowPriv(pWin) -> isRedirected = 0; - nxagentWindowPriv(pWin) -> visibilityState = VisibilityUnobscured; - nxagentWindowPriv(pWin) -> corruptedRegion = RegionCreate(NULL, 1); - nxagentWindowPriv(pWin) -> hasTransparentChildren = 0; - nxagentWindowPriv(pWin) -> containGlyphs = 0; - nxagentWindowPriv(pWin) -> corruptedId = 0; - nxagentWindowPriv(pWin) -> deferredBackgroundExpose = 0; - nxagentWindowPriv(pWin) -> synchronizationBitmap = NullPixmap; - nxagentWindowPriv(pWin) -> corruptedTimestamp = 0; - nxagentWindowPriv(pWin) -> splitResource = NULL; if (nxagentOption(Rootless) == 1) @@ -464,7 +440,6 @@ Bool nxagentCreateWindow(WindowPtr pWin) if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) { Atom prop = nxagentMakeAtom("WM_PROTOCOLS", strlen("WM_PROTOCOLS"), True); - XlibAtom atom = nxagentMakeAtom("WM_DELETE_WINDOW", strlen("WM_DELETE_WINDOW"), True); XSetWMProtocols(nxagentDisplay, nxagentWindowPriv(pWin)->window, &atom, 1); @@ -552,7 +527,6 @@ Bool nxagentCreateWindow(WindowPtr pWin) void nxagentSetVersionProperty(WindowPtr pWin) { char *name = "NX_AGENT_VERSION"; - Atom prop = MakeAtom(name, strlen(name), True); if (ChangeWindowProperty(pWin, prop, XA_STRING, 8, PropModeReplace, strlen(NX_VERSION_CURRENT_STRING), NX_VERSION_CURRENT_STRING, True) != Success) @@ -630,39 +604,26 @@ Bool nxagentDestroyWindow(WindowPtr pWin) pWindowPriv->siblingAbove; } - #ifdef NXAGENT_SHAPE2 - +#ifdef NXAGENT_SHAPE2 #ifdef SHAPE - if (pWindowPriv->boundingShape) { - RegionDestroy( - pWindowPriv->boundingShape); + RegionDestroy(pWindowPriv->boundingShape); } if (pWindowPriv->clipShape) { - RegionDestroy( - pWindowPriv->clipShape); + RegionDestroy(pWindowPriv->clipShape); } - - #endif - - #else - - RegionDestroy( - pWindowPriv->boundingShape); - - RegionDestroy( - pWindowPriv->clipShape); - #endif +#else + RegionDestroy(pWindowPriv->boundingShape); + RegionDestroy(pWindowPriv->clipShape); +#endif if (pWindowPriv -> corruptedRegion) { - RegionDestroy( - pWindowPriv -> corruptedRegion); - + RegionDestroy(pWindowPriv -> corruptedRegion); pWindowPriv -> corruptedRegion = NULL; } @@ -677,7 +638,6 @@ Bool nxagentDestroyWindow(WindowPtr pWin) } nxagentDestroyCorruptedResource((DrawablePtr) pWin, RT_NX_CORR_WINDOW); - nxagentDestroyDrawableBitmap((DrawablePtr) pWin); if (pWindowPriv -> splitResource != NULL) @@ -707,7 +667,6 @@ Bool nxagentDestroyWindow(WindowPtr pWin) if (pWin == nxagentRootTileWindow) { nxagentWindowPriv(nxagentRootTileWindow)->window = None; - nxagentRootTileWindow = None; } @@ -758,7 +717,6 @@ void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib) } nxagentAddConfiguredWindow(pWin, CW_RootlessRestack); - } void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) @@ -817,15 +775,13 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) if (switchOn) { nxagentFullscreenWindow = nxagentDefaultWindows[pScreen -> myNum]; - nxagentGrabPointerAndKeyboard(NULL); } else { nxagentFullscreenWindow = None; - nxagentUngrabPointerAndKeyboard(NULL); - } + } } void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) @@ -907,7 +863,6 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) nxagentChangeOption(Fullscreen, True); nxagentChangeOption(AllScreens, True); - /* * Save the window-mode configuration. @@ -956,7 +911,6 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) if (nxagentIconWindow == None) { nxagentIconWindow = nxagentCreateIconWindow(); - XMapWindow(nxagentDisplay, nxagentIconWindow); } @@ -988,7 +942,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) #ifdef WARNING fprintf(stderr, "nxagentSwitchAllScreens: WARNING! Expected ReparentNotify event missing.\n"); #endif - + nxagentWMIsRunning = False; attributes.override_redirect = False; XChangeWindowAttributes(nxagentDisplay, w, valuemask, &attributes); @@ -1030,10 +984,8 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) if (nxagentOption(WMBorderWidth) > 0 && nxagentOption(WMTitleHeight) > 0) { - nxagentChangeOption(X, nxagentOption(SavedX) - - nxagentOption(WMBorderWidth)); - nxagentChangeOption(Y, nxagentOption(SavedY) - - nxagentOption(WMTitleHeight)); + nxagentChangeOption(X, nxagentOption(SavedX) - nxagentOption(WMBorderWidth)); + nxagentChangeOption(Y, nxagentOption(SavedY) - nxagentOption(WMTitleHeight)); } else { @@ -1064,7 +1016,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) XMoveResizeWindow(nxagentDisplay, nxagentInputWindows[0], 0, 0, nxagentOption(Width), nxagentOption(Height)); - nxagentSetPrintGeometry(pScreen -> myNum); + nxagentSetPrintGeometry(pScreen -> myNum); } #ifdef VIEWPORT_FRAME @@ -1141,7 +1093,6 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift) #endif nxagentChangeOption(ViewportXSpan, nxagentOption(Width) - nxagentOption(RootWidth)); - nxagentChangeOption(ViewportYSpan, nxagentOption(Height) - nxagentOption(RootHeight)); if (nxagentOption(ViewportXSpan) < 0) @@ -1224,7 +1175,7 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift) if (nxagentOption(ClientOs) == ClientOsWinnt) { - /* + /* * If doMove is True we add exposed rectangles * to the remote expose region. This is done to * refresh the areas showed newly in the viewport. @@ -1505,7 +1456,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) } #ifdef NXAGENT_SPLASH - /* * This should bring again the splash window * on top, so why the else clause? Is this @@ -1531,8 +1481,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) * } * } */ - - #endif + #endif /* NXAGENT_SPLASH */ if (mask & CW_RootlessRestack) { @@ -1571,12 +1520,10 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) } #ifdef SHAPE - if (mask & CW_Shape) { nxagentShapeWindow(pWin); } - #endif if (mask & CW_Map && @@ -1584,7 +1531,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) nxagentRootlessWindow != pWin)) { XMapWindow(nxagentDisplay, nxagentWindow(pWin)); - return; } } @@ -1873,7 +1819,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { if (nxagentOption(Rootless)) { - if (pWin->cursorIsNone == 0 && pWin->optional != NULL && + if (pWin->cursorIsNone == 0 && pWin->optional != NULL && pWin->optional->cursor != NULL && nxagentCursorPriv(pWin -> optional -> cursor, pWin -> drawable.pScreen) != NULL) { @@ -1934,16 +1880,14 @@ Bool nxagentRealizeWindow(WindowPtr pWin) } } - #ifdef SHAPE - /* * Not needed. * - * nxagentShapeWindow(pWin); + #ifdef SHAPE + nxagentShapeWindow(pWin); + #endif */ - #endif /* SHAPE */ - /* * Mapping of the root window is called by * InitRootWindow in DIX. Skip the operation @@ -1999,7 +1943,6 @@ Bool nxagentUnrealizeWindow(WindowPtr pWin) void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) { - void (*PaintWindowBackgroundBackup)(WindowPtr, RegionPtr, int); if (pWin->backgroundState == BackgroundPixmap) @@ -2065,11 +2008,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) */ RegionInit(&temp, NullBox, 1); - RegionIntersect(&temp, pRegion, &pWin -> clipList); - nxagentFrameBufferPaintWindow(pWin, &temp, what); - RegionUninit(&temp); } @@ -2084,11 +2024,8 @@ void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) */ RegionInit(&temp, NullBox, 1); - RegionIntersect(&temp, pRegion, &pWin -> borderClip); - nxagentFrameBufferPaintWindow(pWin, &temp, what); - RegionUninit(&temp); } @@ -2106,18 +2043,12 @@ void nxagentClipNotify(WindowPtr pWin, int dx, int dy) nxagentAddConfiguredWindow(pWin, CWStackingOrder); nxagentAddConfiguredWindow(pWin, CW_Shape); -#ifdef NXAGENT_SHAPE - return; -#else - -#ifdef SHAPE - -/* +#ifndef NXAGENT_SHAPE + #ifdef SHAPE + /* * nxagentShapeWindow(pWin); */ - -#endif /* SHAPE */ - + #endif /* SHAPE */ #endif /* NXAGENT_SHAPE */ } @@ -2184,12 +2115,10 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo nxagentExposeQueue.exposures[i].serial = 0; } + nxagentExposeQueue.start = 0; nxagentExposeQueue.length = 0; - nxagentExposeSerial = 0; - nxagentExposeQueue.start = 0; - nxagentConfiguredSynchroWindow = XCreateWindow(nxagentDisplay, DefaultRootWindow(nxagentDisplay), 0, 0, 1, 1, 0, 0, InputOutput, 0, CWEventMask, &attributes); @@ -2228,7 +2157,6 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo int index = (nxagentExposeQueue.start + nxagentExposeQueue.length) % EXPOSED_SIZE; nxagentExposeQueue.exposures[index].pWindow = pWin; - nxagentExposeQueue.exposures[index].localRegion = RegionCreate(NULL, 1); if (nxagentOption(Rootless) && nxagentWindowPriv(pWin) && @@ -2270,7 +2198,6 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo */ nxagentExposeQueue.exposures[index].synchronize = 1; - nxagentExposeQueue.length++; if (nxagentOption(Rootless) && nxagentWindowPriv(pWin) && @@ -2390,12 +2317,11 @@ void nxagentShapeWindow(WindowPtr pWin) #ifdef NXAGENT_SHAPE2 if (!nxagentWindowPriv(pWin)->boundingShape) { - nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1); + nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1); } #endif - RegionCopy( - nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(pWin)); + RegionCopy(nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(pWin)); reg = XCreateRegion(); pBox = RegionRects(nxagentWindowPriv(pWin)->boundingShape); @@ -2423,8 +2349,7 @@ void nxagentShapeWindow(WindowPtr pWin) fprintf(stderr, "nxagentShapeWindow: wBounding shape does not exist. Removing the shape.\n"); #endif - RegionEmpty( - nxagentWindowPriv(pWin)->boundingShape); + RegionEmpty(nxagentWindowPriv(pWin)->boundingShape); #ifndef NXAGENT_SHAPE XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin), @@ -2454,8 +2379,7 @@ void nxagentShapeWindow(WindowPtr pWin) } #endif - RegionCopy( - nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin)); + RegionCopy(nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin)); reg = XCreateRegion(); pBox = RegionRects(nxagentWindowPriv(pWin)->clipShape); @@ -2483,8 +2407,7 @@ void nxagentShapeWindow(WindowPtr pWin) fprintf(stderr, "nxagentShapeWindow: wClip shape does not exist. Removing the shape.\n"); #endif - RegionEmpty( - nxagentWindowPriv(pWin)->clipShape); + RegionEmpty(nxagentWindowPriv(pWin)->clipShape); #ifndef NXAGENT_SHAPE XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin), @@ -2554,7 +2477,6 @@ void nxagentMapDefaultWindows(void) for (i = 0; i < screenInfo.numScreens; i++) { WindowPtr pWin = screenInfo.screens[i]->root; - ScreenPtr pScreen = pWin -> drawable.pScreen; MapWindow(pWin, serverClient); @@ -2819,11 +2741,8 @@ Bool nxagentReconnectAllWindows(void *p0) } #ifdef NXAGENT_RECONNECT_WINDOW_DEBUG - XSync(nxagentDisplay, 0); - fprintf(stderr, "nxagentReconnectAllWindows: All windows reconfigured.\n"); - #endif if (nxagentInitClipboard(screenInfo.screens[0]->root) == -1) @@ -2836,15 +2755,11 @@ Bool nxagentReconnectAllWindows(void *p0) } #ifdef NXAGENT_RECONNECT_WINDOW_DEBUG - XSync(nxagentDisplay, 0); - fprintf(stderr, "nxagentReconnectAllWindows: Clipboard initialized.\n"); - #endif #ifdef VIEWPORT_FRAME - /* * We move the viewport frames out of the way on the X server side. */ @@ -2863,7 +2778,6 @@ Bool nxagentReconnectAllWindows(void *p0) XMoveWindow(nxagentDisplay, nxagentWindow(nxagentViewportFrameBelow), 0, nxagentOption(RootHeight)); } - #endif /* #ifdef VIEWPORT_FRAME */ return True; @@ -3015,9 +2929,6 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer #ifdef TEST fprintf(stderr, "nxagentReconnectWindow: Going to create new window.\n"); - #endif - - #ifdef TEST fprintf(stderr, "nxagentReconnectWindow: Recreating %swindow at %p current event mask = %lX mask & CWEventMask = %ld " "event_mask = %lX\n", nxagentWindowTopLevel(pWin) ? "toplevel " : "", (void*)pWin, pWin -> eventMask, @@ -3104,10 +3015,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer XSizeHints hints = {0}; unsigned char *data = NULL; #ifdef _XSERVER64 - unsigned char *data64 = NULL; unsigned int i; - #endif ret = GetWindowProperty(pWin, @@ -3148,11 +3057,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer } props = (XSizeHints *) data64; - #else - props = (XSizeHints *) data; - #endif /* _XSERVER64 */ hints = *props; @@ -3284,15 +3190,13 @@ static void nxagentReconfigureWindow(void * param0, XID param1, void * data_buff #ifdef SHAPE if (nxagentWindowPriv(pWin) -> boundingShape) { - RegionDestroy( - nxagentWindowPriv(pWin) -> boundingShape); + RegionDestroy(nxagentWindowPriv(pWin) -> boundingShape); nxagentWindowPriv(pWin) -> boundingShape = NULL; } if (nxagentWindowPriv(pWin) -> clipShape) { - RegionDestroy( - nxagentWindowPriv(pWin) -> clipShape); + RegionDestroy(nxagentWindowPriv(pWin) -> clipShape); nxagentWindowPriv(pWin) -> clipShape = NULL; } nxagentShapeWindow(pWin); @@ -3330,7 +3234,6 @@ XXX: This would break Motif menus. XMoveWindow(nxagentDisplay, nxagentWindow(pWin), nxagentOption(RootX), nxagentOption(RootY)); - XMapWindow(nxagentDisplay, nxagentWindow(pWin)); } } @@ -3350,7 +3253,6 @@ Bool nxagentCheckIllegalRootMonitoring(WindowPtr pWin, Mask mask) } #ifdef TEST - Bool nxagentCheckWindowIntegrity(WindowPtr pWin) { Bool integrity = True; @@ -3444,8 +3346,7 @@ Bool nxagentCheckWindowIntegrity(WindowPtr pWin) return integrity; } - -#endif +#endif /* TEST */ Bool nxagentIsIconic(WindowPtr pWin) { @@ -3499,13 +3400,11 @@ void nxagentSetTopLevelEventMask(WindowPtr pWin) int nxagentExtentsPredicate(int total) { #ifdef TEST - if (total == 6 || total == 11 || total == 10) { fprintf(stderr, "nxagentExtentsPredicate: WARNING! Returning [%d] with [%d] rectangles.\n", (total == 6 || total == 11 || total == 10), total); } - #endif return (total == 6 || total == 11 || total == 10); @@ -3996,7 +3895,7 @@ StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId) #ifdef TEST fprintf(stderr, "nxagentFindItemBSPixmapList: WARNING! Item not found.\n"); #endif - + #ifdef TEST fprintf(stderr, "nxagentFindItemBSPixmapList: Pixmap with id [%lu] not found.\n", pixmapId); @@ -4006,4 +3905,3 @@ StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId) return NULL; } - -- 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 1fb32cf73167109db79723988fe85f1e22dbec16 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Oct 25 17:24:35 2018 +0200 Window.c: scope improvements --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 67 ++++++++++++----------------- 1 file changed, 27 insertions(+), 40 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 7c21f50..80c348f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -587,7 +587,6 @@ Bool nxagentSomeWindowsAreMapped(void) Bool nxagentDestroyWindow(WindowPtr pWin) { - int i; int j; nxagentPrivWindowPtr pWindowPriv; @@ -601,7 +600,7 @@ Bool nxagentDestroyWindow(WindowPtr pWin) for (j = 0; j < nxagentExposeQueue.length; j++) { - i = (nxagentExposeQueue.start + j) % EXPOSED_SIZE; + int i = (nxagentExposeQueue.start + j) % EXPOSED_SIZE; if (nxagentExposeQueue.exposures[i].pWindow == pWin) { @@ -1295,7 +1294,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) unsigned int valuemask; XWindowChanges values; int offX, offY; - int i, j; + int j; offX = nxagentWindowPriv(pWin)->x - pWin->origin.x; offY = nxagentWindowPriv(pWin)->y - pWin->origin.y; @@ -1397,7 +1396,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) for (j = 0; j < nxagentExposeQueue.length; j++) { - i = (nxagentExposeQueue.start + j) % EXPOSED_SIZE; + int i = (nxagentExposeQueue.start + j) % EXPOSED_SIZE; if (nxagentExposeQueue.exposures[i].pWindow == pWin && nxagentExposeQueue.exposures[i].remoteRegion != NullRegion) @@ -2034,15 +2033,12 @@ void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) { - int i; - RegionRec temp; if (pWin -> realized) { - BoxPtr pBox; - - pBox = RegionRects(pRegion); + int i; + BoxPtr pBox = RegionRects(pRegion); for (i = 0; i < RegionNumRects(pRegion); i++) { @@ -2229,9 +2225,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo if (nxagentExposeQueue.length < EXPOSED_SIZE) { - int index; - - index = (nxagentExposeQueue.start + nxagentExposeQueue.length) % EXPOSED_SIZE; + int index = (nxagentExposeQueue.start + nxagentExposeQueue.length) % EXPOSED_SIZE; nxagentExposeQueue.exposures[index].pWindow = pWin; @@ -2503,12 +2497,12 @@ void nxagentShapeWindow(WindowPtr pWin) static int nxagentForceExposure(WindowPtr pWin, void * ptr) { - RegionPtr exposedRgn; - BoxRec Box; - WindowPtr pRoot = pWin->drawable.pScreen->root; - if (pWin -> drawable.class != InputOnly) { + BoxRec Box; + RegionPtr exposedRgn; + WindowPtr pRoot = pWin->drawable.pScreen->root; + Box.x1 = pWin->drawable.x; Box.y1 = pWin->drawable.y; Box.x2 = Box.x1 + pWin->drawable.width; @@ -2537,10 +2531,10 @@ void nxagentRefreshWindows(WindowPtr pWin) void nxagentUnmapWindows(void) { - int i; - if (nxagentOption(Fullscreen) == 1) { + int i; + for (i = 0; i < screenInfo.numScreens; i++) { if (nxagentDefaultWindows[i]) @@ -2666,7 +2660,6 @@ Bool nxagentDisconnectAllWindows(void) { Bool succeeded = True; int i; - WindowPtr pWin; #if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_WINDOW_DEBUG) fprintf(stderr, "nxagentDisconnectAllWindows\n"); @@ -2674,7 +2667,7 @@ Bool nxagentDisconnectAllWindows(void) for (i = 0; i < screenInfo.numScreens; i++) { - pWin = screenInfo.screens[i]->root; + WindowPtr pWin = screenInfo.screens[i]->root; nxagentTraverseWindow( pWin, nxagentDisconnectWindow, &succeeded); nxagentDefaultWindows[i] = None; } @@ -2924,12 +2917,10 @@ static Bool nxagentLoopOverWindows(void (*pF)(void *, XID, void *)) { int i; Bool windowSuccess = True; - WindowPtr pWin; for (i = 0; i < screenInfo.numScreens; i++) { - pWin = screenInfo.screens[i]->root; - nxagentTraverseWindow(pWin, pF, &windowSuccess); + nxagentTraverseWindow(screenInfo.screens[i]->root, pF, &windowSuccess); } return windowSuccess; @@ -3110,9 +3101,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer Atom type; int format; unsigned long nItems, bytesLeft; - XSizeHints *props, hints; + XSizeHints hints = {0}; unsigned char *data = NULL; - #ifdef _XSERVER64 unsigned char *data64 = NULL; @@ -3120,8 +3110,6 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer #endif - hints.flags = 0; - ret = GetWindowProperty(pWin, XA_WM_NORMAL_HINTS, 0, sizeof(XSizeHints), @@ -3138,13 +3126,13 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer bytesLeft == 0 && type == XA_WM_SIZE_HINTS) { + XSizeHints *props; #ifdef TEST fprintf(stderr, "nxagentReconnectWindow: setting WMSizeHints on window %p [%lx - %lx].\n", (void*)pWin, pWin -> drawable.id, nxagentWindow(pWin)); #endif #ifdef _XSERVER64 - data64 = (unsigned char *) malloc(sizeof(XSizeHints) + 4); for (i = 0; i < 4; i++) @@ -3527,7 +3515,6 @@ void nxagentFlushConfigureWindow(void) { ConfiguredWindowStruct *index; XWindowChanges changes; - int i; int j; index = nxagentConfiguredWindowList; @@ -3544,8 +3531,6 @@ void nxagentFlushConfigureWindow(void) while (index) { - ConfiguredWindowStruct *tmp; - WindowPtr pWin = index -> pWin; unsigned int valuemask = index -> valuemask; @@ -3554,23 +3539,24 @@ void nxagentFlushConfigureWindow(void) nxagentConfigureWindow(pWin, valuemask); } - tmp = index; - if (index == nxagentConfiguredWindowList) { - free(tmp); + free(index); break; } - - index = index -> prev; - free(tmp); - } + else + { + ConfiguredWindowStruct *tmp = index; + index = index -> prev; + free(tmp); + } +} nxagentConfiguredWindowList = NULL; for (j = 0; j < nxagentExposeQueue.length; j++) { - i = (nxagentExposeQueue.start + j) % EXPOSED_SIZE; + int i = (nxagentExposeQueue.start + j) % EXPOSED_SIZE; if (nxagentExposeQueue.exposures[i].synchronize == 1) { @@ -3929,7 +3915,6 @@ int nxagentAddItemBSPixmapList(unsigned long id, PixmapPtr pPixmap, WindowPtr pW int nxagentRemoveItemBSPixmapList(unsigned long pixmapId) { int i; - int j; if (pixmapId == 0 || nxagentBSPixmapList[0] == NULL) { @@ -3946,6 +3931,8 @@ int nxagentRemoveItemBSPixmapList(unsigned long pixmapId) if (i < BSPIXMAPLIMIT - 1) { + int j; + for (j = i; j < BSPIXMAPLIMIT -1; j++) { nxagentBSPixmapList[j] = nxagentBSPixmapList[j + 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 1eb5603547c89e0cc4bbdaa3811853e6f8355fb6 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Oct 27 01:28:23 2018 +0200 Window.c: save some lines by declaring loop variables in the loop --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 69 +++++++++-------------------- 1 file changed, 21 insertions(+), 48 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index e7824b1..c62968d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -232,13 +232,12 @@ static int nxagentFindWindowMatch(WindowPtr pWin, void * ptr) WindowPtr nxagentWindowPtr(Window window) { - int i; WindowMatchRec match; match.pWin = NullWindow; match.id = window; - for (i = 0; i < nxagentNumScreens; i++) + for (int i = 0; i < nxagentNumScreens; i++) { WalkTree(screenInfo.screens[i], nxagentFindWindowMatch, (void *) &match); @@ -559,8 +558,6 @@ Bool nxagentSomeWindowsAreMapped(void) Bool nxagentDestroyWindow(WindowPtr pWin) { - int j; - nxagentPrivWindowPtr pWindowPriv; if (nxagentScreenTrap == 1) @@ -570,7 +567,7 @@ Bool nxagentDestroyWindow(WindowPtr pWin) nxagentClearClipboard(NULL, pWin); - for (j = 0; j < nxagentExposeQueue.length; j++) + for (int j = 0; j < nxagentExposeQueue.length; j++) { int i = (nxagentExposeQueue.start + j) % EXPOSED_SIZE; @@ -1234,7 +1231,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) { unsigned int valuemask; XWindowChanges values; - int j; int offX = nxagentWindowPriv(pWin)->x - pWin->origin.x; int offY = nxagentWindowPriv(pWin)->y - pWin->origin.y; @@ -1333,7 +1329,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) nxagentAddStaticResizedWindow(pWin, XNextRequest(nxagentDisplay), offX, offY); - for (j = 0; j < nxagentExposeQueue.length; j++) + for (int j = 0; j < nxagentExposeQueue.length; j++) { int i = (nxagentExposeQueue.start + j) % EXPOSED_SIZE; @@ -1966,10 +1962,9 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) if (pWin -> realized) { - int i; BoxPtr pBox = RegionRects(pRegion); - for (i = 0; i < RegionNumRects(pRegion); i++) + for (int i = 0; i < RegionNumRects(pRegion); i++) { XClearArea(nxagentDisplay, nxagentWindow(pWin), pBox[i].x1 - pWin->drawable.x, @@ -2082,13 +2077,11 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo { if (nxagentExposeArrayIsInitialized == 0) { - int i; - #ifdef TEST fprintf(stderr, "nxagentWindowExposures: Initializing expose queue.\n"); #endif - for (i = 0; i < EXPOSED_SIZE; i++) + for (int i = 0; i < EXPOSED_SIZE; i++) { nxagentExposeQueue.exposures[i].pWindow = NULL; nxagentExposeQueue.exposures[i].localRegion = NullRegion; @@ -2271,7 +2264,6 @@ void nxagentShapeWindow(WindowPtr pWin) Region reg; BoxPtr pBox; XRectangle rect; - int i; if (NXDisplayError(nxagentDisplay) == 1) { @@ -2308,7 +2300,7 @@ void nxagentShapeWindow(WindowPtr pWin) reg = XCreateRegion(); pBox = RegionRects(nxagentWindowPriv(pWin)->boundingShape); - for (i = 0; + for (int i = 0; i < RegionNumRects(nxagentWindowPriv(pWin)->boundingShape); i++) { @@ -2365,7 +2357,7 @@ void nxagentShapeWindow(WindowPtr pWin) reg = XCreateRegion(); pBox = RegionRects(nxagentWindowPriv(pWin)->clipShape); - for (i = 0; + for (int i = 0; i < RegionNumRects(nxagentWindowPriv(pWin)->clipShape); i++) { @@ -2438,9 +2430,7 @@ void nxagentUnmapWindows(void) { if (nxagentOption(Fullscreen) == 1) { - int i; - - for (i = 0; i < screenInfo.numScreens; i++) + for (int i = 0; i < screenInfo.numScreens; i++) { if (nxagentDefaultWindows[i]) { @@ -2454,9 +2444,7 @@ void nxagentUnmapWindows(void) void nxagentMapDefaultWindows(void) { - int i; - - for (i = 0; i < screenInfo.numScreens; i++) + for (int i = 0; i < screenInfo.numScreens; i++) { WindowPtr pWin = screenInfo.screens[i]->root; ScreenPtr pScreen = pWin -> drawable.pScreen; @@ -2563,13 +2551,12 @@ void nxagentMapDefaultWindows(void) Bool nxagentDisconnectAllWindows(void) { Bool succeeded = True; - int i; #if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_WINDOW_DEBUG) fprintf(stderr, "nxagentDisconnectAllWindows\n"); #endif - for (i = 0; i < screenInfo.numScreens; i++) + for (int i = 0; i < screenInfo.numScreens; i++) { WindowPtr pWin = screenInfo.screens[i]->root; nxagentTraverseWindow( pWin, nxagentDisconnectWindow, &succeeded); @@ -2709,9 +2696,7 @@ Bool nxagentReconnectAllWindows(void *p0) if (nxagentOption(Rootless) == 0) { - int i; - - for (i = 0; i < screenInfo.numScreens; i++) + for (int i = 0; i < screenInfo.numScreens; i++) { XRaiseWindow(nxagentDisplay, nxagentInputWindows[i]); } @@ -2817,10 +2802,9 @@ static void nxagentTraverseWindow( static Bool nxagentLoopOverWindows(void (*pF)(void *, XID, void *)) { - int i; Bool windowSuccess = True; - for (i = 0; i < screenInfo.numScreens; i++) + for (int i = 0; i < screenInfo.numScreens; i++) { nxagentTraverseWindow(screenInfo.screens[i]->root, pF, &windowSuccess); } @@ -3004,7 +2988,6 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer unsigned char *data = NULL; #ifdef _XSERVER64 unsigned char *data64 = NULL; - unsigned int i; #endif ret = GetWindowProperty(pWin, @@ -3032,14 +3015,14 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer #ifdef _XSERVER64 data64 = (unsigned char *) malloc(sizeof(XSizeHints) + 4); - for (i = 0; i < 4; i++) + for (int i = 0; i < 4; i++) { *(data64 + i) = *(data + i); } *(((int *) data64) + 1) = 0; - for (i = 8; i < sizeof(XSizeHints) + 4; i++) + for (int i = 8; i < sizeof(XSizeHints) + 4; i++) { *(data64 + i) = *(data + i - 4); } @@ -3276,15 +3259,12 @@ Bool nxagentCheckWindowIntegrity(WindowPtr pWin) if (image && memcmp(image->data, data, length) != 0) { - #ifdef TEST - int i; - char *p, *q; - #endif - integrity = False; #ifdef TEST - for (i = 0, p = image->data, q = data; i < length; i++) + char *p = image->data, *q = data; + + for (int i = 0; i < length; i++) { if (p[i] != q[i]) { @@ -3395,7 +3375,6 @@ void nxagentFlushConfigureWindow(void) { ConfiguredWindowStruct *index; XWindowChanges changes; - int j; index = nxagentConfiguredWindowList; @@ -3434,7 +3413,7 @@ void nxagentFlushConfigureWindow(void) nxagentConfiguredWindowList = NULL; - for (j = 0; j < nxagentExposeQueue.length; j++) + for (int j = 0; j < nxagentExposeQueue.length; j++) { int i = (nxagentExposeQueue.start + j) % EXPOSED_SIZE; @@ -3729,9 +3708,7 @@ void nxagentInitBSPixmapList(void) int nxagentAddItemBSPixmapList(unsigned long id, PixmapPtr pPixmap, WindowPtr pWin, int bsx, int bsy) { - int i; - - for (i = 0; i < BSPIXMAPLIMIT; i++) + for (int i = 0; i < BSPIXMAPLIMIT; i++) { if (nxagentBSPixmapList[i] == NULL) { @@ -3779,14 +3756,12 @@ int nxagentAddItemBSPixmapList(unsigned long id, PixmapPtr pPixmap, WindowPtr pW int nxagentRemoveItemBSPixmapList(unsigned long pixmapId) { - int i; - if (pixmapId == 0 || nxagentBSPixmapList[0] == NULL) { return 0; } - for (i = 0; i < BSPIXMAPLIMIT; i++) + for (int i = 0; i < BSPIXMAPLIMIT; i++) { if ((nxagentBSPixmapList[i] != NULL) && (nxagentBSPixmapList[i] -> storingPixmapId == pixmapId)) @@ -3828,9 +3803,7 @@ int nxagentRemoveItemBSPixmapList(unsigned long pixmapId) int nxagentEmptyBSPixmapList(void) { - int i; - - for (i = 0; i < BSPIXMAPLIMIT; i++) + for (int i = 0; i < BSPIXMAPLIMIT; i++) { free(nxagentBSPixmapList[i]); nxagentBSPixmapList[i] = NULL; -- 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 df531c16fd413e2b573dbb0818edd2f045fed38a Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Oct 27 00:19:33 2018 +0200 Window.c: silence compiler warnings --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 1997859..907b3df 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -2660,7 +2660,10 @@ void nxagentDisconnectWindow(void * p0, XID x1, void * p2) Bool nxagentReconnectAllWindows(void *p0) { - int flexibility = *(int *) p0; + /* + access the parameter like this if this function needs it in future: + int flexibility = *(int *) p0; + */ #if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_WINDOW_DEBUG) fprintf(stderr, "nxagentReconnectAllWindows\n"); @@ -2770,7 +2773,10 @@ Bool nxagentReconnectAllWindows(void *p0) Bool nxagentSetWindowCursors(void *p0) { - int flexibility = *(int *) p0; + /* + access the parameter like this if this function needs it in future: + int flexibility = *(int *) p0; + */ #if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_WINDOW_DEBUG) fprintf(stderr, "nxagentSetWindowCursors: Going to loop over the windows.\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 c8383b83dcbaeaab1470c030ade8b924b9635276 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Oct 27 00:53:44 2018 +0200 Window.c: indent ifdefs for better readability --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 89 ++++++++++++++--------------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 907b3df..e7824b1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -269,9 +269,9 @@ Bool nxagentCreateWindow(WindowPtr pWin) { nxagentClearSplash(nxagentRootTileWindow); } -#ifdef NXAGENT_LOGO_DEBUG + #ifdef NXAGENT_LOGO_DEBUG fprintf(stderr, "nxagentCreateWindow: nxagentSplashCount [%d]\n", nxagentSplashCount); -#endif + #endif if (pWin->drawable.class == InputOnly) { @@ -495,17 +495,15 @@ Bool nxagentCreateWindow(WindowPtr pWin) nxagentWindowPriv(pWin->nextSib)->siblingAbove = nxagentWindow(pWin); } -#ifdef NXAGENT_SHAPE2 -#ifdef SHAPE - nxagentWindowPriv(pWin)->boundingShape = NULL; - nxagentWindowPriv(pWin)->clipShape = NULL; -#endif /* SHAPE */ -#else -#ifdef SHAPE - nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1); - nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1); -#endif /* SHAPE */ -#endif + #ifdef SHAPE + #ifdef NXAGENT_SHAPE2 + nxagentWindowPriv(pWin)->boundingShape = NULL; + nxagentWindowPriv(pWin)->clipShape = NULL; + #else + nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1); + nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1); + #endif + #endif /* SHAPE */ fbCreateWindow(pWin); @@ -604,22 +602,22 @@ Bool nxagentDestroyWindow(WindowPtr pWin) pWindowPriv->siblingAbove; } -#ifdef NXAGENT_SHAPE2 - #ifdef SHAPE - if (pWindowPriv->boundingShape) - { - RegionDestroy(pWindowPriv->boundingShape); - } + #ifdef NXAGENT_SHAPE2 + #ifdef SHAPE + if (pWindowPriv->boundingShape) + { + RegionDestroy(pWindowPriv->boundingShape); + } - if (pWindowPriv->clipShape) - { + if (pWindowPriv->clipShape) + { + RegionDestroy(pWindowPriv->clipShape); + } + #endif + #else + RegionDestroy(pWindowPriv->boundingShape); RegionDestroy(pWindowPriv->clipShape); - } #endif -#else - RegionDestroy(pWindowPriv->boundingShape); - RegionDestroy(pWindowPriv->clipShape); -#endif if (pWindowPriv -> corruptedRegion) { @@ -2031,13 +2029,13 @@ void nxagentClipNotify(WindowPtr pWin, int dx, int dy) nxagentAddConfiguredWindow(pWin, CWStackingOrder); nxagentAddConfiguredWindow(pWin, CW_Shape); -#ifndef NXAGENT_SHAPE - #ifdef SHAPE - /* - * nxagentShapeWindow(pWin); - */ - #endif /* SHAPE */ -#endif /* NXAGENT_SHAPE */ + #ifndef NXAGENT_SHAPE + #ifdef SHAPE + /* + * nxagentShapeWindow(pWin); + */ + #endif /* SHAPE */ + #endif /* NXAGENT_SHAPE */ } void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) @@ -2299,12 +2297,12 @@ void nxagentShapeWindow(WindowPtr pWin) RegionNumRects(wBoundingShape(pWin))); #endif -#ifdef NXAGENT_SHAPE2 + #ifdef NXAGENT_SHAPE2 if (!nxagentWindowPriv(pWin)->boundingShape) { nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1); } -#endif + #endif RegionCopy(nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(pWin)); @@ -2321,10 +2319,10 @@ void nxagentShapeWindow(WindowPtr pWin) XUnionRectWithRegion(&rect, reg, reg); } -#ifndef NXAGENT_SHAPE + #ifndef NXAGENT_SHAPE XShapeCombineRegion(nxagentDisplay, nxagentWindow(pWin), ShapeBounding, 0, 0, reg, ShapeSet); -#endif + #endif XDestroyRegion(reg); } @@ -2336,11 +2334,10 @@ void nxagentShapeWindow(WindowPtr pWin) RegionEmpty(nxagentWindowPriv(pWin)->boundingShape); -#ifndef NXAGENT_SHAPE + #ifndef NXAGENT_SHAPE XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin), ShapeBounding, 0, 0, None, ShapeSet); -#endif - + #endif } } @@ -2357,12 +2354,12 @@ void nxagentShapeWindow(WindowPtr pWin) RegionNumRects(wClipShape(pWin))); #endif -#ifdef NXAGENT_SHAPE2 + #ifdef NXAGENT_SHAPE2 if (!nxagentWindowPriv(pWin)->clipShape) { nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1); } -#endif + #endif RegionCopy(nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin)); @@ -2379,10 +2376,10 @@ void nxagentShapeWindow(WindowPtr pWin) XUnionRectWithRegion(&rect, reg, reg); } -#ifndef NXAGENT_SHAPE + #ifndef NXAGENT_SHAPE XShapeCombineRegion(nxagentDisplay, nxagentWindow(pWin), ShapeClip, 0, 0, reg, ShapeSet); -#endif + #endif XDestroyRegion(reg); } @@ -2394,10 +2391,10 @@ void nxagentShapeWindow(WindowPtr pWin) RegionEmpty(nxagentWindowPriv(pWin)->clipShape); -#ifndef NXAGENT_SHAPE + #ifndef NXAGENT_SHAPE XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin), ShapeClip, 0, 0, None, ShapeSet); -#endif + #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 9e6e431376698f0bd20b785ff902941ed78262f8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Oct 25 17:46:15 2018 +0200 Window.c: some code simplifications --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 89 +++++++++-------------------- 1 file changed, 26 insertions(+), 63 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index a21bc4e..1997859 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -721,7 +721,7 @@ void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib) void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) { - XEvent e; + XEvent e = {0}; if (nxagentOption(Rootless) == 1) { @@ -759,8 +759,6 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) nxagentChangeOption(Fullscreen, switchOn); - memset(&e, 0, sizeof(e)); - e.xclient.type = ClientMessage; e.xclient.message_type = nxagentAtoms[13]; /* _NET_WM_STATE */ e.xclient.display = nxagentDisplay; @@ -1066,14 +1064,8 @@ void nxagentUpdateViewportFrame(int x, int y, int w, int h) void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift) { - int newX; - int newY; - int oldX; - int oldY; - + int newX, newY, oldX = 0, oldY = 0; Bool doMove = False; - oldX = 0; - oldY = 0; if (nxagentOption(Rootless)) { @@ -1244,11 +1236,9 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) { unsigned int valuemask; XWindowChanges values; - int offX, offY; int j; - - offX = nxagentWindowPriv(pWin)->x - pWin->origin.x; - offY = nxagentWindowPriv(pWin)->y - pWin->origin.y; + int offX = nxagentWindowPriv(pWin)->x - pWin->origin.x; + int offY = nxagentWindowPriv(pWin)->y - pWin->origin.y; if (nxagentScreenTrap == 1) { @@ -1789,9 +1779,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) if (mask & CWColormap) { - ColormapPtr pCmap; - - pCmap = (ColormapPtr) LookupIDByType(wColormap(pWin), RT_COLORMAP); + ColormapPtr pCmap = (ColormapPtr) LookupIDByType(wColormap(pWin), RT_COLORMAP); /* FIXME: When the caller is nxagentReconfigureWindow @@ -2098,14 +2086,10 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo { int i; - XSetWindowAttributes attributes; - #ifdef TEST fprintf(stderr, "nxagentWindowExposures: Initializing expose queue.\n"); #endif - attributes.event_mask = StructureNotifyMask; - for (i = 0; i < EXPOSED_SIZE; i++) { nxagentExposeQueue.exposures[i].pWindow = NULL; @@ -2119,6 +2103,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo nxagentExposeQueue.length = 0; nxagentExposeSerial = 0; + XSetWindowAttributes attributes = {.event_mask = StructureNotifyMask}; nxagentConfiguredSynchroWindow = XCreateWindow(nxagentDisplay, DefaultRootWindow(nxagentDisplay), 0, 0, 1, 1, 0, 0, InputOutput, 0, CWEventMask, &attributes); @@ -2423,7 +2408,6 @@ static int nxagentForceExposure(WindowPtr pWin, void * ptr) if (pWin -> drawable.class != InputOnly) { BoxRec Box; - RegionPtr exposedRgn; WindowPtr pRoot = pWin->drawable.pScreen->root; Box.x1 = pWin->drawable.x; @@ -2431,7 +2415,8 @@ static int nxagentForceExposure(WindowPtr pWin, void * ptr) Box.x2 = Box.x1 + pWin->drawable.width; Box.y2 = Box.y1 + pWin->drawable.height; - exposedRgn = RegionCreate(&Box, 1); + RegionPtr exposedRgn = RegionCreate(&Box, 1); + RegionIntersect(exposedRgn, exposedRgn, &pRoot->winSize); if (exposedRgn != NULL && RegionNotEmpty(exposedRgn) != 0) @@ -3270,15 +3255,12 @@ Bool nxagentCheckWindowIntegrity(WindowPtr pWin) if (width && height) { length = nxagentImageLength(width, height, format, 0, depth); - data = malloc(length); - + data = calloc(1, length); if (data == NULL) { FatalError("nxagentCheckWindowIntegrity: Failed to allocate a buffer of size %d.\n", length); } - memset(data, 0, length); - image = XGetImage(nxagentDisplay, nxagentWindow(pWin), 0, 0, width, height, plane_mask, format); if (image == NULL) @@ -3378,14 +3360,10 @@ Bool nxagentIsIconic(WindowPtr pWin) void nxagentSetTopLevelEventMask(WindowPtr pWin) { - unsigned long mask = CWEventMask; - XSetWindowAttributes attributes; - if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) { - attributes.event_mask = nxagentGetEventMask(pWin); - - XChangeWindowAttributes(nxagentDisplay, nxagentWindow(pWin), mask, &attributes); + XSetWindowAttributes attributes = {.event_mask = nxagentGetEventMask(pWin)}; + XChangeWindowAttributes(nxagentDisplay, nxagentWindow(pWin), CWEventMask, &attributes); } } @@ -3541,29 +3519,21 @@ void nxagentAddConfiguredWindow(WindowPtr pWin, unsigned int valuemask) valuemask |= CWStackingOrder; } - if (nxagentConfiguredWindowList == NULL) { + ConfiguredWindowStruct *tmp = nxagentConfiguredWindowList; + nxagentConfiguredWindowList = malloc(sizeof(ConfiguredWindowStruct)); - nxagentConfiguredWindowList -> next = NULL; + nxagentConfiguredWindowList -> next = tmp; /* can be NULL */ nxagentConfiguredWindowList -> prev = NULL; - nxagentConfiguredWindowList -> pWin = pWin; - } - else - { - ConfiguredWindowStruct *tmp; + nxagentConfiguredWindowList -> valuemask = valuemask; - tmp = malloc(sizeof(ConfiguredWindowStruct)); - - tmp -> next = nxagentConfiguredWindowList; - nxagentConfiguredWindowList -> prev = tmp; - tmp -> prev = NULL; - nxagentConfiguredWindowList = tmp; - nxagentConfiguredWindowList -> pWin = pWin; + if (tmp) + { + tmp -> prev = nxagentConfiguredWindowList; + } } - nxagentConfiguredWindowList -> valuemask = valuemask; - return; } @@ -3623,22 +3593,15 @@ void nxagentDeleteConfiguredWindow(WindowPtr pWin) void nxagentAddStaticResizedWindow(WindowPtr pWin, unsigned long sequence, int offX, int offY) { - if (nxagentStaticResizedWindowList == NULL) - { - nxagentStaticResizedWindowList = malloc(sizeof(StaticResizedWindowStruct)); - nxagentStaticResizedWindowList -> next = NULL; - nxagentStaticResizedWindowList -> prev = NULL; - } - else - { - StaticResizedWindowStruct *tmp; + StaticResizedWindowStruct *tmp = nxagentStaticResizedWindowList; - tmp = malloc(sizeof(StaticResizedWindowStruct)); + nxagentStaticResizedWindowList = malloc(sizeof(StaticResizedWindowStruct)); + nxagentStaticResizedWindowList -> next = tmp; + nxagentStaticResizedWindowList -> prev = NULL; - tmp -> next = nxagentStaticResizedWindowList; - nxagentStaticResizedWindowList -> prev = tmp; - tmp -> prev = NULL; - nxagentStaticResizedWindowList = tmp; + if (tmp) + { + tmp -> prev = nxagentStaticResizedWindowList; } nxagentStaticResizedWindowList -> pWin = 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 e2421bbd7ce4bf7d6c4902fc12600661f5c112e5 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Oct 27 02:50:12 2018 +0200 Window.c: use C99 designated initializers at some places --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 67 +++++++++++++---------------- 1 file changed, 30 insertions(+), 37 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index c5a481b..82f4991 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -232,10 +232,7 @@ static int nxagentFindWindowMatch(WindowPtr pWin, void * ptr) WindowPtr nxagentWindowPtr(Window window) { - WindowMatchRec match; - - match.pWin = NullWindow; - match.id = window; + WindowMatchRec match = {.pWin = NullWindow, .id = window}; for (int i = 0; i < nxagentNumScreens; i++) { @@ -716,8 +713,6 @@ void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib) void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) { - XEvent e = {0}; - if (nxagentOption(Rootless) == 1) { return; @@ -754,14 +749,15 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) nxagentChangeOption(Fullscreen, switchOn); - e.xclient.type = ClientMessage; - e.xclient.message_type = nxagentAtoms[13]; /* _NET_WM_STATE */ - e.xclient.display = nxagentDisplay; - e.xclient.window = nxagentDefaultWindows[pScreen -> myNum]; - e.xclient.format = 32; - e.xclient.data.l[0] = nxagentOption(Fullscreen) ? 1 : 0; - e.xclient.data.l[1] = nxagentAtoms[14]; /* _NET_WM_STATE_FULLSCREEN */ - + XEvent e = { + .xclient.type = ClientMessage, + .xclient.message_type = nxagentAtoms[13], /* _NET_WM_STATE */ + .xclient.display = nxagentDisplay, + .xclient.window = nxagentDefaultWindows[pScreen -> myNum], + .xclient.format = 32, + .xclient.data.l[0] = nxagentOption(Fullscreen) ? 1 : 0, + .xclient.data.l[1] = nxagentAtoms[14] /* _NET_WM_STATE_FULLSCREEN */ + }; XSendEvent(nxagentDisplay, DefaultRootWindow(nxagentDisplay), False, SubstructureRedirectMask, &e); @@ -1170,11 +1166,7 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift) * pan and one for vertical pan. */ - BoxRec hRect; - BoxRec vRect; - - hRect.x1 = -newX; - hRect.y1 = -newY; + BoxRec hRect = {.x1 = -newX, .y1 = -newY}; if (hShift < 0) { @@ -1192,8 +1184,7 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift) fprintf(stderr, "nxagentMoveViewport: hRect p1[%i, %i] - p2[%i, %i].\n", hRect.x1, hRect.y1, hRect.x2, hRect.y2); #endif - vRect.x1 = -newX; - vRect.y1 = -newY; + BoxRec vRect = {.x1 = -newX, .y1 = -newY}; if (vShift < 0) { @@ -2263,7 +2254,6 @@ void nxagentShapeWindow(WindowPtr pWin) { Region reg; BoxPtr pBox; - XRectangle rect; if (NXDisplayError(nxagentDisplay) == 1) { @@ -2308,10 +2298,12 @@ void nxagentShapeWindow(WindowPtr pWin) i < RegionNumRects(nxagentWindowPriv(pWin)->boundingShape); i++) { - rect.x = pBox[i].x1; - rect.y = pBox[i].y1; - rect.width = pBox[i].x2 - pBox[i].x1; - rect.height = pBox[i].y2 - pBox[i].y1; + XRectangle rect = { + .x = pBox[i].x1, + .y = pBox[i].y1, + .width = pBox[i].x2 - pBox[i].x1, + .height = pBox[i].y2 - pBox[i].y1 + }; XUnionRectWithRegion(&rect, reg, reg); } @@ -2365,10 +2357,12 @@ void nxagentShapeWindow(WindowPtr pWin) i < RegionNumRects(nxagentWindowPriv(pWin)->clipShape); i++) { - rect.x = pBox[i].x1; - rect.y = pBox[i].y1; - rect.width = pBox[i].x2 - pBox[i].x1; - rect.height = pBox[i].y2 - pBox[i].y1; + XRectangle rect = { + .x = pBox[i].x1, + .y = pBox[i].y1, + .width = pBox[i].x2 - pBox[i].x1, + .height = pBox[i].y2 - pBox[i].y1 + }; XUnionRectWithRegion(&rect, reg, reg); } @@ -2400,14 +2394,13 @@ static int nxagentForceExposure(WindowPtr pWin, void * ptr) { if (pWin -> drawable.class != InputOnly) { - BoxRec Box; WindowPtr pRoot = pWin->drawable.pScreen->root; - - Box.x1 = pWin->drawable.x; - Box.y1 = pWin->drawable.y; - Box.x2 = Box.x1 + pWin->drawable.width; - Box.y2 = Box.y1 + pWin->drawable.height; - + BoxRec Box = { + .x1 = pWin->drawable.x, + .y1 = pWin->drawable.y, + .x2 = Box.x1 + pWin->drawable.width, + .y2 = Box.y1 + pWin->drawable.height, + }; RegionPtr exposedRgn = RegionCreate(&Box, 1); RegionIntersect(exposedRgn, exposedRgn, &pRoot->winSize); -- 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 728a3d1c81187cb2331f6a4d0279203618278ea8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Oct 27 02:26:28 2018 +0200 Window.c: add FIXME --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index c62968d..c5a481b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -2275,6 +2275,10 @@ void nxagentShapeWindow(WindowPtr pWin) (void *) pWin, nxagentWindow(pWin)); #endif + /* + FIXME: this is the same code as below, just with another shape. Maybe move + this code to a helper function? + */ if (!nxagentRegionEqual(nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(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 70b49467c41e51eb11a50e4cbe3652246bf21140 Merge: 2804320 e2421bb Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Oct 27 21:06:11 2018 +0200 Merge branch 'uli42-pr/small_improvements' into 3.6.x Attributes GH PR #732: https://github.com/ArcticaProject/nx-libs/pull/732 nx-X11/programs/Xserver/hw/nxagent/Window.c | 751 ++++++++++++---------------- 1 file changed, 315 insertions(+), 436 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 266c3d68d5abae1de80e807dbbe3252b34c4a04f Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Nov 1 15:41:34 2018 +0100 Lift Xi to 1.3.0.0 (identical to 1.2.0) --- nx-X11/programs/Xserver/Xi/allowev.c | 1 - nx-X11/programs/Xserver/Xi/chgdctl.c | 1 - nx-X11/programs/Xserver/Xi/chgfctl.c | 1 - nx-X11/programs/Xserver/Xi/chgkbd.c | 1 - nx-X11/programs/Xserver/Xi/chgkmap.c | 1 - nx-X11/programs/Xserver/Xi/chgprop.c | 1 - nx-X11/programs/Xserver/Xi/chgptr.c | 1 - nx-X11/programs/Xserver/Xi/closedev.c | 1 - nx-X11/programs/Xserver/Xi/devbell.c | 1 - nx-X11/programs/Xserver/Xi/exevents.c | 18 ++++++++++++++++++ nx-X11/programs/Xserver/Xi/extinit.c | 10 ++++------ nx-X11/programs/Xserver/Xi/getbmap.c | 1 - nx-X11/programs/Xserver/Xi/getdctl.c | 1 - nx-X11/programs/Xserver/Xi/getfctl.c | 1 - nx-X11/programs/Xserver/Xi/getfocus.c | 1 - nx-X11/programs/Xserver/Xi/getkmap.c | 1 - nx-X11/programs/Xserver/Xi/getmmap.c | 1 - nx-X11/programs/Xserver/Xi/getprop.c | 1 - nx-X11/programs/Xserver/Xi/getselev.c | 1 - nx-X11/programs/Xserver/Xi/getvers.c | 1 - nx-X11/programs/Xserver/Xi/grabdev.c | 1 - nx-X11/programs/Xserver/Xi/grabdevb.c | 1 - nx-X11/programs/Xserver/Xi/grabdevk.c | 1 - nx-X11/programs/Xserver/Xi/gtmotion.c | 4 +--- nx-X11/programs/Xserver/Xi/listdev.c | 1 - nx-X11/programs/Xserver/Xi/opendev.c | 3 +-- nx-X11/programs/Xserver/Xi/selectev.c | 1 - nx-X11/programs/Xserver/Xi/sendexev.c | 1 - nx-X11/programs/Xserver/Xi/setbmap.c | 1 - nx-X11/programs/Xserver/Xi/setdval.c | 1 - nx-X11/programs/Xserver/Xi/setfocus.c | 1 - nx-X11/programs/Xserver/Xi/setmmap.c | 1 - nx-X11/programs/Xserver/Xi/setmode.c | 1 - nx-X11/programs/Xserver/Xi/stubs.c | 1 - nx-X11/programs/Xserver/Xi/ungrdev.c | 1 - nx-X11/programs/Xserver/Xi/ungrdevb.c | 1 - nx-X11/programs/Xserver/Xi/ungrdevk.c | 1 - nx-X11/programs/Xserver/code-versions.txt | 2 +- 38 files changed, 25 insertions(+), 45 deletions(-) diff --git a/nx-X11/programs/Xserver/Xi/allowev.c b/nx-X11/programs/Xserver/Xi/allowev.c index 8981f91..76b2f60 100644 --- a/nx-X11/programs/Xserver/Xi/allowev.c +++ b/nx-X11/programs/Xserver/Xi/allowev.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/chgdctl.c b/nx-X11/programs/Xserver/Xi/chgdctl.c index 566df59..260dd0e 100644 --- a/nx-X11/programs/Xserver/Xi/chgdctl.c +++ b/nx-X11/programs/Xserver/Xi/chgdctl.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/chgfctl.c b/nx-X11/programs/Xserver/Xi/chgfctl.c index 31cb0a0..00117fa 100644 --- a/nx-X11/programs/Xserver/Xi/chgfctl.c +++ b/nx-X11/programs/Xserver/Xi/chgfctl.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/chgkbd.c b/nx-X11/programs/Xserver/Xi/chgkbd.c index 4e8b5ee..8f4e357 100644 --- a/nx-X11/programs/Xserver/Xi/chgkbd.c +++ b/nx-X11/programs/Xserver/Xi/chgkbd.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/chgkmap.c b/nx-X11/programs/Xserver/Xi/chgkmap.c index 604fcd9..f8bad95 100644 --- a/nx-X11/programs/Xserver/Xi/chgkmap.c +++ b/nx-X11/programs/Xserver/Xi/chgkmap.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/chgprop.c b/nx-X11/programs/Xserver/Xi/chgprop.c index b8d0403..6ee00a0 100644 --- a/nx-X11/programs/Xserver/Xi/chgprop.c +++ b/nx-X11/programs/Xserver/Xi/chgprop.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/chgptr.c b/nx-X11/programs/Xserver/Xi/chgptr.c index af2625f..76cd1e0 100644 --- a/nx-X11/programs/Xserver/Xi/chgptr.c +++ b/nx-X11/programs/Xserver/Xi/chgptr.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/closedev.c b/nx-X11/programs/Xserver/Xi/closedev.c index b41474e..21180cd 100644 --- a/nx-X11/programs/Xserver/Xi/closedev.c +++ b/nx-X11/programs/Xserver/Xi/closedev.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/devbell.c b/nx-X11/programs/Xserver/Xi/devbell.c index a709175..22fe5cb 100644 --- a/nx-X11/programs/Xserver/Xi/devbell.c +++ b/nx-X11/programs/Xserver/Xi/devbell.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/exevents.c b/nx-X11/programs/Xserver/Xi/exevents.c index e614b5a..428e577 100644 --- a/nx-X11/programs/Xserver/Xi/exevents.c +++ b/nx-X11/programs/Xserver/Xi/exevents.c @@ -174,6 +174,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) } if (xE->u.u.type == DeviceKeyPress) { + if (!k) + return; + modifiers = k->modifierMap[key]; kptr = &k->down[key >> 3]; if (*kptr & bit) { /* allow ddx to generate multiple downs */ @@ -203,6 +206,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) return; } } else if (xE->u.u.type == DeviceKeyRelease) { + if (!k) + return; + kptr = &k->down[key >> 3]; if (!(*kptr & bit)) /* guard against duplicates */ return; @@ -225,6 +231,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) if (other->fromPassiveGrab && (key == other->activatingKey)) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == DeviceButtonPress) { + if (!b) + return; + kptr = &b->down[key >> 3]; *kptr |= bit; if (other->valuator) @@ -242,6 +251,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) return; } else if (xE->u.u.type == DeviceButtonRelease) { + if (!b) + return; + kptr = &b->down[key >> 3]; *kptr &= ~bit; if (other->valuator) @@ -1075,6 +1087,9 @@ MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask) DeviceIntPtr dev; dev = LookupDeviceIntRec(pEvents->deviceid & DEVICE_BITS); + if (!dev) + return 0; + if (pEvents->type == DeviceMotionNotify) { if (mask & DevicePointerMotionHintMask) { if (WID(dev->valuator->motionHintWindow) == pEvents->event) { @@ -1096,6 +1111,9 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, DeviceIntPtr dev; dev = LookupDeviceIntRec(xE->deviceid & DEVICE_BITS); + if (!dev) + return; + if (type == DeviceMotionNotify) dev->valuator->motionHintWindow = pWin; else if ((type == DeviceButtonPress) && (!grab) && diff --git a/nx-X11/programs/Xserver/Xi/extinit.c b/nx-X11/programs/Xserver/Xi/extinit.c index a50552c..adf69b0 100644 --- a/nx-X11/programs/Xserver/Xi/extinit.c +++ b/nx-X11/programs/Xserver/Xi/extinit.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group @@ -201,8 +200,8 @@ Mask PropagateMask[MAX_DEVICES]; * */ -static XExtensionVersion thisversion = - {XI_Present, +static XExtensionVersion thisversion = + {XI_Present, SERVER_XI_MAJOR_VERSION, SERVER_XI_MINOR_VERSION, }; @@ -576,8 +575,7 @@ SEventDeviceValuator(deviceValuator * from, deviceValuator * to) swaps(&to->sequenceNumber); swaps(&to->device_state); ip = &to->valuator0; - for (i=0; i<6; i++) - { + for (i = 0; i < 6; i++) { swapl((ip + i)); /* macro - braces are required */ } } @@ -822,7 +820,7 @@ IResetProc(ExtensionEntry * unused) * */ - void +void AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name) { dev->type = type; diff --git a/nx-X11/programs/Xserver/Xi/getbmap.c b/nx-X11/programs/Xserver/Xi/getbmap.c index 696685b..45f9764 100644 --- a/nx-X11/programs/Xserver/Xi/getbmap.c +++ b/nx-X11/programs/Xserver/Xi/getbmap.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/getdctl.c b/nx-X11/programs/Xserver/Xi/getdctl.c index 7cc96cb..e050e36 100644 --- a/nx-X11/programs/Xserver/Xi/getdctl.c +++ b/nx-X11/programs/Xserver/Xi/getdctl.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/getfctl.c b/nx-X11/programs/Xserver/Xi/getfctl.c index 9f75753..82de179 100644 --- a/nx-X11/programs/Xserver/Xi/getfctl.c +++ b/nx-X11/programs/Xserver/Xi/getfctl.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/getfocus.c b/nx-X11/programs/Xserver/Xi/getfocus.c index 5111522..8d0850d 100644 --- a/nx-X11/programs/Xserver/Xi/getfocus.c +++ b/nx-X11/programs/Xserver/Xi/getfocus.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/getkmap.c b/nx-X11/programs/Xserver/Xi/getkmap.c index 419d108..87fd4ba 100644 --- a/nx-X11/programs/Xserver/Xi/getkmap.c +++ b/nx-X11/programs/Xserver/Xi/getkmap.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/getmmap.c b/nx-X11/programs/Xserver/Xi/getmmap.c index ce11e3e..74b6d02 100644 --- a/nx-X11/programs/Xserver/Xi/getmmap.c +++ b/nx-X11/programs/Xserver/Xi/getmmap.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c index 77075c9..0782194 100644 --- a/nx-X11/programs/Xserver/Xi/getprop.c +++ b/nx-X11/programs/Xserver/Xi/getprop.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/getselev.c b/nx-X11/programs/Xserver/Xi/getselev.c index b36b833..010cc83 100644 --- a/nx-X11/programs/Xserver/Xi/getselev.c +++ b/nx-X11/programs/Xserver/Xi/getselev.c @@ -44,7 +44,6 @@ SOFTWARE. ********************************************************/ - /*********************************************************************** * * Extension function to get the current selected events for a given window. diff --git a/nx-X11/programs/Xserver/Xi/getvers.c b/nx-X11/programs/Xserver/Xi/getvers.c index d66175d..93d9c25 100644 --- a/nx-X11/programs/Xserver/Xi/getvers.c +++ b/nx-X11/programs/Xserver/Xi/getvers.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/grabdev.c b/nx-X11/programs/Xserver/Xi/grabdev.c index dc95e7c..654775d 100644 --- a/nx-X11/programs/Xserver/Xi/grabdev.c +++ b/nx-X11/programs/Xserver/Xi/grabdev.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/grabdevb.c b/nx-X11/programs/Xserver/Xi/grabdevb.c index 922a819..55336fb 100644 --- a/nx-X11/programs/Xserver/Xi/grabdevb.c +++ b/nx-X11/programs/Xserver/Xi/grabdevb.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/grabdevk.c b/nx-X11/programs/Xserver/Xi/grabdevk.c index aceeec1..428452d 100644 --- a/nx-X11/programs/Xserver/Xi/grabdevk.c +++ b/nx-X11/programs/Xserver/Xi/grabdevk.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/gtmotion.c b/nx-X11/programs/Xserver/Xi/gtmotion.c index 72209d1..2be719b 100644 --- a/nx-X11/programs/Xserver/Xi/gtmotion.c +++ b/nx-X11/programs/Xserver/Xi/gtmotion.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group @@ -142,8 +141,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client) size = sizeof(Time) + (axes * sizeof(INT32)); tsize = num_events * size; coords = (INT32 *) malloc(tsize); - if (!coords) - { + if (!coords) { SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0, BadAlloc); return Success; diff --git a/nx-X11/programs/Xserver/Xi/listdev.c b/nx-X11/programs/Xserver/Xi/listdev.c index bd62fa0..44f1286 100644 --- a/nx-X11/programs/Xserver/Xi/listdev.c +++ b/nx-X11/programs/Xserver/Xi/listdev.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/opendev.c b/nx-X11/programs/Xserver/Xi/opendev.c index 5927546..e3ad4da 100644 --- a/nx-X11/programs/Xserver/Xi/opendev.c +++ b/nx-X11/programs/Xserver/Xi/opendev.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group @@ -163,7 +162,7 @@ ProcXOpenDevice(register ClientPtr client) rep.length = (j * sizeof(xInputClassInfo) + 3) >> 2; rep.num_classes = j; WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep); - WriteToClient(client, j * sizeof (xInputClassInfo), evbase); + WriteToClient(client, j * sizeof(xInputClassInfo), evbase); return (Success); } diff --git a/nx-X11/programs/Xserver/Xi/selectev.c b/nx-X11/programs/Xserver/Xi/selectev.c index bb3d11b..5c06465 100644 --- a/nx-X11/programs/Xserver/Xi/selectev.c +++ b/nx-X11/programs/Xserver/Xi/selectev.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/sendexev.c b/nx-X11/programs/Xserver/Xi/sendexev.c index ef7b9c4..a86829f 100644 --- a/nx-X11/programs/Xserver/Xi/sendexev.c +++ b/nx-X11/programs/Xserver/Xi/sendexev.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/setbmap.c b/nx-X11/programs/Xserver/Xi/setbmap.c index d7a5b67..7f67ef7 100644 --- a/nx-X11/programs/Xserver/Xi/setbmap.c +++ b/nx-X11/programs/Xserver/Xi/setbmap.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/setdval.c b/nx-X11/programs/Xserver/Xi/setdval.c index 69a5275..909f03f 100644 --- a/nx-X11/programs/Xserver/Xi/setdval.c +++ b/nx-X11/programs/Xserver/Xi/setdval.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/setfocus.c b/nx-X11/programs/Xserver/Xi/setfocus.c index 18ef292..b561832 100644 --- a/nx-X11/programs/Xserver/Xi/setfocus.c +++ b/nx-X11/programs/Xserver/Xi/setfocus.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/setmmap.c b/nx-X11/programs/Xserver/Xi/setmmap.c index 74e0821..cfc0819 100644 --- a/nx-X11/programs/Xserver/Xi/setmmap.c +++ b/nx-X11/programs/Xserver/Xi/setmmap.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/setmode.c b/nx-X11/programs/Xserver/Xi/setmode.c index 4f6f816..da2c634 100644 --- a/nx-X11/programs/Xserver/Xi/setmode.c +++ b/nx-X11/programs/Xserver/Xi/setmode.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/stubs.c b/nx-X11/programs/Xserver/Xi/stubs.c index e737855..0ba8a40 100644 --- a/nx-X11/programs/Xserver/Xi/stubs.c +++ b/nx-X11/programs/Xserver/Xi/stubs.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/ungrdev.c b/nx-X11/programs/Xserver/Xi/ungrdev.c index e84a1c3..f095fd1 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdev.c +++ b/nx-X11/programs/Xserver/Xi/ungrdev.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/ungrdevb.c b/nx-X11/programs/Xserver/Xi/ungrdevb.c index f5e086e..9cd0755 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdevb.c +++ b/nx-X11/programs/Xserver/Xi/ungrdevb.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xi/ungrdevk.c b/nx-X11/programs/Xserver/Xi/ungrdevk.c index 42ebcd6..8829fcc 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdevk.c +++ b/nx-X11/programs/Xserver/Xi/ungrdevk.c @@ -1,4 +1,3 @@ - /************************************************************ Copyright 1989, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/code-versions.txt b/nx-X11/programs/Xserver/code-versions.txt index 1337a1d..5a09d89 100644 --- a/nx-X11/programs/Xserver/code-versions.txt +++ b/nx-X11/programs/Xserver/code-versions.txt @@ -18,5 +18,5 @@ record 1.4.2 render 6.9/7.0 Xext 7.1/1.1 xfixes 1.4.2 -Xi 7.1/1.1 +Xi 1.3.0.0 xkb 7.1/1.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 122db3fde2b934df206567abc0c8b431962ce4b3 Merge: 70b4946 266c3d6 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Nov 1 20:12:44 2018 +0100 Merge branch 'uli42-pr/Xi-1.2.0' into 3.6.x Attributes GH PR #734: https://github.com/ArcticaProject/nx-libs/pull/734 nx-X11/programs/Xserver/Xi/allowev.c | 1 - nx-X11/programs/Xserver/Xi/chgdctl.c | 1 - nx-X11/programs/Xserver/Xi/chgfctl.c | 1 - nx-X11/programs/Xserver/Xi/chgkbd.c | 1 - nx-X11/programs/Xserver/Xi/chgkmap.c | 1 - nx-X11/programs/Xserver/Xi/chgprop.c | 1 - nx-X11/programs/Xserver/Xi/chgptr.c | 1 - nx-X11/programs/Xserver/Xi/closedev.c | 1 - nx-X11/programs/Xserver/Xi/devbell.c | 1 - nx-X11/programs/Xserver/Xi/exevents.c | 18 ++++++++++++++++++ nx-X11/programs/Xserver/Xi/extinit.c | 10 ++++------ nx-X11/programs/Xserver/Xi/getbmap.c | 1 - nx-X11/programs/Xserver/Xi/getdctl.c | 1 - nx-X11/programs/Xserver/Xi/getfctl.c | 1 - nx-X11/programs/Xserver/Xi/getfocus.c | 1 - nx-X11/programs/Xserver/Xi/getkmap.c | 1 - nx-X11/programs/Xserver/Xi/getmmap.c | 1 - nx-X11/programs/Xserver/Xi/getprop.c | 1 - nx-X11/programs/Xserver/Xi/getselev.c | 1 - nx-X11/programs/Xserver/Xi/getvers.c | 1 - nx-X11/programs/Xserver/Xi/grabdev.c | 1 - nx-X11/programs/Xserver/Xi/grabdevb.c | 1 - nx-X11/programs/Xserver/Xi/grabdevk.c | 1 - nx-X11/programs/Xserver/Xi/gtmotion.c | 4 +--- nx-X11/programs/Xserver/Xi/listdev.c | 1 - nx-X11/programs/Xserver/Xi/opendev.c | 3 +-- nx-X11/programs/Xserver/Xi/selectev.c | 1 - nx-X11/programs/Xserver/Xi/sendexev.c | 1 - nx-X11/programs/Xserver/Xi/setbmap.c | 1 - nx-X11/programs/Xserver/Xi/setdval.c | 1 - nx-X11/programs/Xserver/Xi/setfocus.c | 1 - nx-X11/programs/Xserver/Xi/setmmap.c | 1 - nx-X11/programs/Xserver/Xi/setmode.c | 1 - nx-X11/programs/Xserver/Xi/stubs.c | 1 - nx-X11/programs/Xserver/Xi/ungrdev.c | 1 - nx-X11/programs/Xserver/Xi/ungrdevb.c | 1 - nx-X11/programs/Xserver/Xi/ungrdevk.c | 1 - nx-X11/programs/Xserver/code-versions.txt | 2 +- 38 files changed, 25 insertions(+), 45 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 2db519141865cd504351aabf042db5bdf2ac5d96 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Jun 24 23:33:33 2018 +0200 Check nxagentXkbInfo.EventBase before use --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 94480c4..4c85145 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2782,7 +2782,8 @@ int nxagentHandleXkbKeyboardStateEvent(XEvent *X) { XkbEvent *xkbev = (XkbEvent *) X; - if (xkbev -> type == nxagentXkbInfo.EventBase + XkbEventCode && + if (nxagentXkbInfo.EventBase != -1 && + xkbev -> type == nxagentXkbInfo.EventBase + XkbEventCode && xkbev -> any.xkb_type == XkbStateNotify) { #ifdef TEST @@ -3815,6 +3816,11 @@ int nxagentInitXkbKeyboardState(void) XkbEvent *xkbev = (XkbEvent *) &X; + if (nxagentXkbInfo.EventBase == -1) + { + return 1; + } + #ifdef TEST fprintf(stderr, "%s: Initializing XKB state.\n", __func__); #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 d54f1fb7360ab2f35d916b53baba3e3aee8d9128 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jul 5 23:14:05 2018 +0200 Keyboard.c: remove unused defines Defines regarding XKB-BASE_DIRECTORY are used only xkb. --- 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 647a0a8..5abfc70 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -135,12 +135,6 @@ extern Status XkbGetControls( #endif ); -#ifndef XKB_BASE_DIRECTORY -#define XKB_BASE_DIRECTORY "/usr/share/X11/xkb" -#endif -#ifndef XKB_ALTERNATE_BASE_DIRECTORY -#define XKB_ALTERNATE_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb" -#endif #ifndef XKB_DFLT_RULES_FILE #define XKB_DFLT_RULES_FILE "base" #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 9808c66ec37d5d99f58bdb6136ae96381cb9cfc8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 29 22:34:32 2018 +0200 Lift xkb to XORG-1.2.0 state --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 2 +- nx-X11/programs/Xserver/include/xkbfile.h | 32 +- nx-X11/programs/Xserver/include/xkbsrv.h | 3 +- nx-X11/programs/Xserver/xkb/Imakefile | 8 +- nx-X11/programs/Xserver/xkb/XKBMisc.c | 7 +- nx-X11/programs/Xserver/xkb/ddxBeep.c | 1 + nx-X11/programs/Xserver/xkb/ddxKillSrv.c | 5 - nx-X11/programs/Xserver/xkb/ddxList.c | 13 +- nx-X11/programs/Xserver/xkb/ddxLoad.c | 1 - nx-X11/programs/Xserver/xkb/ddxPrivate.c | 5 - nx-X11/programs/Xserver/xkb/ddxVT.c | 5 - nx-X11/programs/Xserver/xkb/maprules.c | 16 +- nx-X11/programs/Xserver/xkb/xkb.c | 294 +++--- nx-X11/programs/Xserver/xkb/xkbActions.c | 4 - nx-X11/programs/Xserver/xkb/xkbEvents.c | 4 + nx-X11/programs/Xserver/xkb/xkbInit.c | 8 - nx-X11/programs/Xserver/xkb/xkbLEDs.c | 18 +- nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c | 4 - nx-X11/programs/Xserver/xkb/xkbUtils.c | 4 +- nx-X11/programs/Xserver/xkb/xkbfmisc.c | 456 ++++++++- nx-X11/programs/Xserver/xkb/xkbout.c | 1047 +++++++++++++++++++ nx-X11/programs/Xserver/xkb/xkbtext.c | 1325 +++++++++++++++++++++++++ nx-X11/programs/Xserver/xkb/xkmread.c | 94 +- 23 files changed, 2979 insertions(+), 377 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 6a14667..c6998e8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -155,7 +155,7 @@ extern Status XkbGetControls( #define XKB_CONFIG_FILE_X2GO "/etc/x2go/x2goagent.keyboard" #endif #ifndef XKB_DFLT_RULES_FILE -#define XKB_DFLT_RULES_FILE "xfree86" +#define XKB_DFLT_RULES_FILE "base" #endif #ifndef XKB_ALTS_RULES_FILE #define XKB_ALTS_RULES_FILE "xorg" diff --git a/nx-X11/programs/Xserver/include/xkbfile.h b/nx-X11/programs/Xserver/include/xkbfile.h index e99de6c..2b02244 100644 --- a/nx-X11/programs/Xserver/include/xkbfile.h +++ b/nx-X11/programs/Xserver/include/xkbfile.h @@ -10,19 +10,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -83,9 +83,9 @@ typedef void (*XkbFileAddOnFunc)( #define _XkbErrXReqFailure 25 #define _XkbErrBadImplementation 26 -extern char * _XkbErrMessages[]; +extern const char * _XkbErrMessages[]; extern unsigned _XkbErrCode; -extern char * _XkbErrLocation; +extern const char * _XkbErrLocation; extern unsigned _XkbErrData; /***====================================================================***/ @@ -233,12 +233,14 @@ extern Bool XkbLookupGroupAndLevel( /***====================================================================***/ - -/***====================================================================***/ +extern char * XkbAtomGetString( + Display * /* dpy */, + Atom /* atm */ +); extern Atom XkbInternAtom( Display * /* dpy */, - char * /* name */, + char * /* name */, Bool /* onlyIfExists */ ); @@ -272,7 +274,7 @@ typedef struct _XkbDrawable { XkbSectionPtr section; } u; struct _XkbDrawable * next; -} XkbDrawableRec,*XkbDrawablePtr; +} XkbDrawableRec,*XkbDrawablePtr; extern XkbDrawablePtr XkbGetOrderedDrawables( diff --git a/nx-X11/programs/Xserver/include/xkbsrv.h b/nx-X11/programs/Xserver/include/xkbsrv.h index 9f9ccc5..a3f8718 100644 --- a/nx-X11/programs/Xserver/include/xkbsrv.h +++ b/nx-X11/programs/Xserver/include/xkbsrv.h @@ -267,7 +267,8 @@ extern int XkbEventBase; extern int XkbDisableLockActions; extern char * XkbBaseDirectory; extern char * XkbBinDirectory; -extern char * XkbInitialMap; +extern int _XkbClientMajor; +extern int _XkbClientMinor; extern unsigned int XkbXIUnsupported; extern Bool noXkbExtension; diff --git a/nx-X11/programs/Xserver/xkb/Imakefile b/nx-X11/programs/Xserver/xkb/Imakefile index 5acd977..21d631a 100644 --- a/nx-X11/programs/Xserver/xkb/Imakefile +++ b/nx-X11/programs/Xserver/xkb/Imakefile @@ -26,13 +26,13 @@ XKB_DDXDEFS = XkbServerDefines ddxList.o ddxDevBtn.o ddxPrivate.o SRCS = xkb.c xkbUtils.c xkbEvents.c xkbAccessX.c xkbSwap.c \ xkbLEDs.c xkbInit.c xkbActions.c xkbPrKeyEv.c \ - xkmread.c xkbfmisc.c xkberrs.c maprules.c \ - XKBMisc.c XKBMAlloc.c XKBAlloc.c XKBGAlloc.c \ + xkmread.c xkbtext.c xkbfmisc.c xkberrs.c maprules.c \ + XKBMisc.c XKBMAlloc.c XKBAlloc.c XKBGAlloc.c xkbout.c \ $(XKBXI_SRCS) $(DDX_SRCS) OBJS = xkb.o xkbUtils.o xkbEvents.o xkbAccessX.o xkbSwap.o \ xkbLEDs.o xkbInit.o xkbActions.o xkbPrKeyEv.o \ - xkmread.o xkbfmisc.o xkberrs.o maprules.o \ - XKBMisc.o XKBMAlloc.o XKBAlloc.o XKBGAlloc.o \ + xkmread.o xkbtext.o xkbfmisc.o xkberrs.o maprules.o \ + XKBMisc.o XKBMAlloc.o XKBAlloc.o XKBGAlloc.o xkbout.o \ $(XKBXI_OBJS) $(DDX_OBJS) INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext \ -I$(SERVERSRC)/mi $(XF86INCLUDES) \ diff --git a/nx-X11/programs/Xserver/xkb/XKBMisc.c b/nx-X11/programs/Xserver/xkb/XKBMisc.c index 98f11a2..2c5cf42 100644 --- a/nx-X11/programs/Xserver/xkb/XKBMisc.c +++ b/nx-X11/programs/Xserver/xkb/XKBMisc.c @@ -366,8 +366,11 @@ unsigned changed,tmp; unsigned int new_vmodmask; changed|= XkbKeyActionsMask; pActs= XkbResizeKeyActions(xkb,key,nSyms); - if (!pActs) + if (!pActs) { + if (nSyms > IBUF_SIZE) + free(interps); return False; + } new_vmodmask= 0; for (n=0;n<nSyms;n++) { if (interps[n]) { @@ -470,7 +473,7 @@ register int i; int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups]; if ((!xkb) || (!XkbKeycodeInRange(xkb,key)) || (!xkb->map) || - (!xkb->map->types)||((groups&XkbAllGroupsMask)==0)|| + (!xkb->map->types)||(!newTypesIn)||((groups&XkbAllGroupsMask)==0)|| (nGroups>XkbNumKbdGroups)) { return BadMatch; } diff --git a/nx-X11/programs/Xserver/xkb/ddxBeep.c b/nx-X11/programs/Xserver/xkb/ddxBeep.c index fa4af74..9f55ff3 100644 --- a/nx-X11/programs/Xserver/xkb/ddxBeep.c +++ b/nx-X11/programs/Xserver/xkb/ddxBeep.c @@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <xkbsrv.h> #include <nx-X11/extensions/XI.h> + /*#define FALLING_TONE 1*/ /*#define RISING_TONE 1*/ #define FALLING_TONE 10 diff --git a/nx-X11/programs/Xserver/xkb/ddxKillSrv.c b/nx-X11/programs/Xserver/xkb/ddxKillSrv.c index c581d42..3a8ffdd 100644 --- a/nx-X11/programs/Xserver/xkb/ddxKillSrv.c +++ b/nx-X11/programs/Xserver/xkb/ddxKillSrv.c @@ -28,10 +28,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <dix-config.h> #endif -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - #include <stdio.h> #include <nx-X11/X.h> #include <nx-X11/Xproto.h> @@ -40,7 +36,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "scrnintstr.h" #include "windowstr.h" #include <xkbsrv.h> -#include <nx-X11/extensions/XI.h> int XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act) diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c index 6023366..e48e28d 100644 --- a/nx-X11/programs/Xserver/xkb/ddxList.c +++ b/nx-X11/programs/Xserver/xkb/ddxList.c @@ -164,8 +164,6 @@ char tmpname[PATH_MAX]; if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) { buf = Xprintf("%s/%s.dir",XkbBaseDirectory,componentDirs[what]); in= fopen(buf,"r"); - free (buf); - buf = NULL; } if (!in) { haveDir= False; @@ -181,8 +179,6 @@ char tmpname[PATH_MAX]; if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) { buf = Xprintf("%s.dir",componentDirs[what]); in= fopen(buf,"r"); - free (buf); - buf = NULL; } if (!in) { haveDir= False; @@ -219,6 +215,13 @@ char tmpname[PATH_MAX]; return BadImplementation; } list->nFound[what]= 0; + if (buf) { + free(buf); + buf = NULL; + } + buf = malloc(PATH_MAX * sizeof(char)); + if (!buf) + return BadAlloc; while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) { unsigned flags; register unsigned int i; @@ -263,7 +266,7 @@ char tmpname[PATH_MAX]; #ifndef WIN32 if (haveDir) fclose(in); - else if ((rval=pclose(in))!=0) { + else if ((rval=Pclose(in))!=0) { if (xkbDebugFlags) ErrorF("xkbcomp returned exit code %d\n",rval); } diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c index 83db435..f710af2 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLoad.c +++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c @@ -565,7 +565,6 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; char *xkbbasedir = XkbBaseDirectory; char *xkbbindir = XkbBinDirectory; #endif - cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", xkbbindir, ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), diff --git a/nx-X11/programs/Xserver/xkb/ddxPrivate.c b/nx-X11/programs/Xserver/xkb/ddxPrivate.c index 0064cab..f602f0a 100644 --- a/nx-X11/programs/Xserver/xkb/ddxPrivate.c +++ b/nx-X11/programs/Xserver/xkb/ddxPrivate.c @@ -3,11 +3,6 @@ #include <dix-config.h> #endif -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <stdio.h> #include <nx-X11/X.h> #include "windowstr.h" #include <xkbsrv.h> diff --git a/nx-X11/programs/Xserver/xkb/ddxVT.c b/nx-X11/programs/Xserver/xkb/ddxVT.c index 6c61de0..f0edddc 100644 --- a/nx-X11/programs/Xserver/xkb/ddxVT.c +++ b/nx-X11/programs/Xserver/xkb/ddxVT.c @@ -28,10 +28,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <dix-config.h> #endif -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - #include <stdio.h> #include <nx-X11/X.h> #include <nx-X11/Xproto.h> @@ -40,7 +36,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "scrnintstr.h" #include "windowstr.h" #include <xkbsrv.h> -#include <nx-X11/extensions/XI.h> int XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act) diff --git a/nx-X11/programs/Xserver/xkb/maprules.c b/nx-X11/programs/Xserver/xkb/maprules.c index c64e1f7..295f1ac 100644 --- a/nx-X11/programs/Xserver/xkb/maprules.c +++ b/nx-X11/programs/Xserver/xkb/maprules.c @@ -58,12 +58,6 @@ #define PR_DEBUG2(s,a,b) #endif -#ifdef NEED_STRCASECMP -extern int _XkbStrCaseCmp(char *s1, char *s2); -#else -#define _XkbStrCaseCmp strcasecmp -#endif - /***====================================================================***/ #define DFLT_LINE_SIZE 128 @@ -1088,20 +1082,20 @@ int len,headingtype,extra_ndx = 0; for ( ; GetInputLine(file,&line,False); line.num_line= 0) { if (line.line[0]=='!') { tok = strtok(&(line.line[1]), " \t"); - if (_XkbStrCaseCmp(tok,"model") == 0) + if (strcasecmp(tok,"model") == 0) headingtype = HEAD_MODEL; - else if (_XkbStrCaseCmp(tok,"layout") == 0) + else if (strcasecmp(tok,"layout") == 0) headingtype = HEAD_LAYOUT; - else if (_XkbStrCaseCmp(tok,"variant") == 0) + else if (strcasecmp(tok,"variant") == 0) headingtype = HEAD_VARIANT; - else if (_XkbStrCaseCmp(tok,"option") == 0) + else if (strcasecmp(tok,"option") == 0) headingtype = HEAD_OPTION; else { int i; headingtype = HEAD_EXTRA; extra_ndx= -1; for (i=0;(i<rules->num_extra)&&(extra_ndx<0);i++) { - if (!_XkbStrCaseCmp(tok,rules->extra_names[i])) + if (!strcasecmp(tok,rules->extra_names[i])) extra_ndx= i; } if (extra_ndx<0) { diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index 2138497..3de41c0 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -47,13 +47,6 @@ static int XkbKeyboardErrorCode; CARD32 xkbDebugFlags = 0; static CARD32 xkbDebugCtrls = 0; - -#ifndef XKB_SRV_UNSUPPORTED_XI_FEATURES -#define XKB_SRV_UNSUPPORTED_XI_FEATURES XkbXI_KeyboardsMask -#endif - -unsigned XkbXIUnsupported= XKB_SRV_UNSUPPORTED_XI_FEATURES; - static RESTYPE RT_XKBCLIENT; /***====================================================================***/ @@ -168,11 +161,6 @@ ProcXkbUseExtension(ClientPtr client) } else supported = 1; -#ifdef XKB_SWAPPING_BUSTED - if (client->swapped) - supported= 0; -#endif - if ((supported) && (!(client->xkbClientFlags&_XkbClientInitialized))) { client->xkbClientFlags= _XkbClientInitialized; client->vMajor= stuff->wantedMajor; @@ -2891,7 +2879,6 @@ ProcXkbGetNamedIndicator(ClientPtr client) register int i = 0; XkbSrvLedInfoPtr sli; XkbIndicatorMapPtr map = NULL; - Bool supported; REQUEST(xkbGetNamedIndicatorReq); REQUEST_SIZE_MATCH(xkbGetNamedIndicatorReq); @@ -2906,25 +2893,15 @@ ProcXkbGetNamedIndicator(ClientPtr client) if (!sli) return BadAlloc; - supported= True; - if (XkbXIUnsupported&XkbXI_IndicatorsMask) { - if ((dev!=(DeviceIntPtr)LookupKeyboardDevice())|| - ((sli->flags&XkbSLI_IsDefault)==0)) { - supported= False; - } - } - - if (supported) { - i= 0; - map= NULL; - if ((sli->names)&&(sli->maps)) { - for (i=0;i<XkbNumIndicators;i++) { - if (stuff->indicator==sli->names[i]) { - map= &sli->maps[i]; - break; - } - } - } + i= 0; + map= NULL; + if ((sli->names)&&(sli->maps)) { + for (i=0;i<XkbNumIndicators;i++) { + if (stuff->indicator==sli->names[i]) { + map= &sli->maps[i]; + break; + } + } } rep.type= X_Reply; @@ -2932,7 +2909,7 @@ ProcXkbGetNamedIndicator(ClientPtr client) rep.sequenceNumber = client->sequence; rep.deviceID = dev->id; rep.indicator= stuff->indicator; - if ((map!=NULL)&&(supported)) { + if (map!=NULL) { rep.found= True; rep.on= ((sli->effectiveState&(1<<i))!=0); rep.realIndicator= ((sli->physIndicators&(1<<i))!=0); @@ -2960,7 +2937,7 @@ ProcXkbGetNamedIndicator(ClientPtr client) rep.realMods= 0; rep.virtualMods= 0; rep.ctrls= 0; - rep.supported= supported; + rep.supported= True; } if ( client->swapped ) { swapl(&rep.length); @@ -2971,21 +2948,6 @@ ProcXkbGetNamedIndicator(ClientPtr client) } WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), &rep); - if (!supported) { - xkbExtensionDeviceNotify edev; - - bzero(&edev,sizeof(xkbExtensionDeviceNotify)); - edev.reason= XkbXI_UnsupportedFeatureMask; - edev.ledClass= stuff->ledClass; - edev.ledID= stuff->ledID; - edev.ledsDefined= sli->namesPresent|sli->mapsPresent; - edev.ledState= sli->effectiveState; - edev.firstBtn= 0; - edev.nBtns= 0; - edev.unsupported= XkbXIUnsupported&XkbXI_IndicatorsMask; - edev.supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported); - XkbSendExtensionDeviceNotify(dev,client,&edev); - } return client->noClientException; } @@ -3020,24 +2982,6 @@ ProcXkbSetNamedIndicator(ClientPtr client) if (!sli) return BadAlloc; - if (XkbXIUnsupported&XkbXI_IndicatorsMask) { - if ((dev!=(DeviceIntPtr)LookupKeyboardDevice())|| - ((sli->flags&XkbSLI_IsDefault)==0)) { - bzero(&ed,sizeof(xkbExtensionDeviceNotify)); - ed.reason= XkbXI_UnsupportedFeatureMask; - ed.ledClass= stuff->ledClass; - ed.ledID= stuff->ledID; - ed.ledsDefined= sli->namesPresent|sli->mapsPresent; - ed.ledState= sli->effectiveState; - ed.firstBtn= 0; - ed.nBtns= 0; - ed.unsupported= XkbXIUnsupported&XkbXI_IndicatorsMask; - ed.supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported); - XkbSendExtensionDeviceNotify(dev,client,&ed); - return client->noClientException; - } - } - statec= mapc= namec= 0; map= NULL; if (sli->names && sli->maps) { @@ -3052,7 +2996,8 @@ ProcXkbSetNamedIndicator(ClientPtr client) if (!stuff->createMap) return client->noClientException; for (led=0,map=NULL;(led<XkbNumIndicators)&&(map==NULL);led++) { - if ((sli->names[led]==None)&&(!XkbIM_InUse(&sli->maps[led]))) { + if ((sli->names)&&(sli->maps)&&(sli->names[led]==None)&& + (!XkbIM_InUse(&sli->maps[led]))) { map= &sli->maps[led]; sli->names[led]= stuff->indicator; break; @@ -3261,118 +3206,121 @@ char * desc; start = desc = (char *)malloc(length); if ( !start ) return BadAlloc; - if (which&XkbKeycodesNameMask) { - *((CARD32 *)desc)= xkb->names->keycodes; - if (client->swapped) { + if (xkb->names) { + if (which&XkbKeycodesNameMask) { + *((CARD32 *)desc)= xkb->names->keycodes; + if (client->swapped) { swapl((int *)desc); - } - desc+= 4; - } - if (which&XkbGeometryNameMask) { - *((CARD32 *)desc)= xkb->names->geometry; - if (client->swapped) { + } + desc+= 4; + } + if (which&XkbGeometryNameMask) { + *((CARD32 *)desc)= xkb->names->geometry; + if (client->swapped) { swapl((int *)desc); - } - desc+= 4; - } - if (which&XkbSymbolsNameMask) { - *((CARD32 *)desc)= xkb->names->symbols; - if (client->swapped) { + } + desc+= 4; + } + if (which&XkbSymbolsNameMask) { + *((CARD32 *)desc)= xkb->names->symbols; + if (client->swapped) { swapl((int *)desc); - } - desc+= 4; - } - if (which&XkbPhysSymbolsNameMask) { - register CARD32 *atm= (CARD32 *)desc; - atm[0]= (CARD32)xkb->names->phys_symbols; - if (client->swapped) { + } + desc+= 4; + } + if (which&XkbPhysSymbolsNameMask) { + register CARD32 *atm= (CARD32 *)desc; + atm[0]= (CARD32)xkb->names->phys_symbols; + if (client->swapped) { swapl(&atm[0]); - } - desc+= 4; - } - if (which&XkbTypesNameMask) { - *((CARD32 *)desc)= (CARD32)xkb->names->types; - if (client->swapped) { + } + desc+= 4; + } + if (which&XkbTypesNameMask) { + *((CARD32 *)desc)= (CARD32)xkb->names->types; + if (client->swapped) { swapl((int *)desc); - } - desc+= 4; - } - if (which&XkbCompatNameMask) { - *((CARD32 *)desc)= (CARD32)xkb->names->compat; - if (client->swapped) { + } + desc+= 4; + } + if (which&XkbCompatNameMask) { + *((CARD32 *)desc)= (CARD32)xkb->names->compat; + if (client->swapped) { swapl((int *)desc); - } - desc+= 4; - } - if (which&XkbKeyTypeNamesMask) { - register CARD32 *atm= (CARD32 *)desc; - register XkbKeyTypePtr type= xkb->map->types; + } + desc+= 4; + } + if (which&XkbKeyTypeNamesMask) { + register CARD32 *atm= (CARD32 *)desc; + register XkbKeyTypePtr type= xkb->map->types; - for (i=0;i<xkb->map->num_types;i++,atm++,type++) { - *atm= (CARD32)type->name; - if (client->swapped) { + for (i=0;i<xkb->map->num_types;i++,atm++,type++) { + *atm= (CARD32)type->name; + if (client->swapped) { swapl(atm); - } - } - desc= (char *)atm; - } - if (which&XkbKTLevelNamesMask) { - XkbKeyTypePtr type = xkb->map->types; - register CARD32 *atm; - for (i=0;i<rep->nTypes;i++,type++) { - *desc++ = type->num_levels; - } - desc+= XkbPaddedSize(rep->nTypes)-rep->nTypes; - - atm= (CARD32 *)desc; - type = xkb->map->types; - for (i=0;i<xkb->map->num_types;i++,type++) { - register unsigned l; - if (type->level_names) { - for (l=0;l<type->num_levels;l++,atm++) { - *atm= type->level_names[l]; - if (client->swapped) { + } + } + desc= (char *)atm; + } + if (which&XkbKTLevelNamesMask && xkb->map) { + XkbKeyTypePtr type = xkb->map->types; + register CARD32 *atm; + for (i=0;i<rep->nTypes;i++,type++) { + *desc++ = type->num_levels; + } + desc+= XkbPaddedSize(rep->nTypes)-rep->nTypes; + + atm= (CARD32 *)desc; + type = xkb->map->types; + for (i=0;i<xkb->map->num_types;i++,type++) { + register unsigned l; + if (type->level_names) { + for (l=0;l<type->num_levels;l++,atm++) { + *atm= type->level_names[l]; + if (client->swapped) { swapl(atm); - } - } - desc+= type->num_levels*4; - } - } - } - if (which&XkbIndicatorNamesMask) { - desc= _XkbWriteAtoms(desc,xkb->names->indicators,XkbNumIndicators, - client->swapped); - } - if (which&XkbVirtualModNamesMask) { - desc= _XkbWriteAtoms(desc,xkb->names->vmods,XkbNumVirtualMods, - client->swapped); - } - if (which&XkbGroupNamesMask) { - desc= _XkbWriteAtoms(desc,xkb->names->groups,XkbNumKbdGroups, - client->swapped); - } - if (which&XkbKeyNamesMask) { - for (i=0;i<rep->nKeys;i++,desc+= sizeof(XkbKeyNameRec)) { - *((XkbKeyNamePtr)desc)= xkb->names->keys[i+rep->firstKey]; - } - } - if (which&XkbKeyAliasesMask) { - XkbKeyAliasPtr pAl; - pAl= xkb->names->key_aliases; - for (i=0;i<rep->nKeyAliases;i++,pAl++,desc+=2*XkbKeyNameLength) { - *((XkbKeyAliasPtr)desc)= *pAl; - } - } - if ((which&XkbRGNamesMask)&&(rep->nRadioGroups>0)) { - register CARD32 *atm= (CARD32 *)desc; - for (i=0;i<rep->nRadioGroups;i++,atm++) { - *atm= (CARD32)xkb->names->radio_groups[i]; - if (client->swapped) { + } + } + desc+= type->num_levels*4; + } + } + } + if (which&XkbIndicatorNamesMask) { + desc= _XkbWriteAtoms(desc,xkb->names->indicators,XkbNumIndicators, + client->swapped); + } + if (which&XkbVirtualModNamesMask) { + desc= _XkbWriteAtoms(desc,xkb->names->vmods,XkbNumVirtualMods, + client->swapped); + } + if (which&XkbGroupNamesMask) { + desc= _XkbWriteAtoms(desc,xkb->names->groups,XkbNumKbdGroups, + client->swapped); + } + if (which&XkbKeyNamesMask) { + for (i=0;i<rep->nKeys;i++,desc+= sizeof(XkbKeyNameRec)) { + *((XkbKeyNamePtr)desc)= xkb->names->keys[i+rep->firstKey]; + } + } + if (which&XkbKeyAliasesMask) { + XkbKeyAliasPtr pAl; + pAl= xkb->names->key_aliases; + for (i=0;i<rep->nKeyAliases;i++,pAl++,desc+=2*XkbKeyNameLength) { + *((XkbKeyAliasPtr)desc)= *pAl; + } + } + if ((which&XkbRGNamesMask)&&(rep->nRadioGroups>0)) { + register CARD32 *atm= (CARD32 *)desc; + for (i=0;i<rep->nRadioGroups;i++,atm++) { + *atm= (CARD32)xkb->names->radio_groups[i]; + if (client->swapped) { swapl(atm); - } - } - desc+= rep->nRadioGroups*4; + } + } + desc+= rep->nRadioGroups*4; + } } + if ((desc-start)!=(length)) { ErrorF("BOGUS LENGTH in write names, expected %d, got %ld\n", length, (unsigned long)(desc-start)); @@ -4722,7 +4670,7 @@ char * wire; if (XkbAddGeomProperty(geom,name,val)==NULL) { free(name); free(val); - return BadAlloc; + return BadAlloc; } free(name); free(val); @@ -5610,7 +5558,7 @@ char * str; wanted&= ~XkbXI_ButtonActionsMask; if ((!dev->kbdfeed)&&(!dev->leds)) wanted&= ~XkbXI_IndicatorsMask; - wanted&= ~XkbXIUnsupported; + wanted&= ~XkbXI_KeyboardsMask; nameLen= XkbSizeCountedString(dev->name); rep.type = X_Reply; @@ -5618,8 +5566,8 @@ char * str; rep.sequenceNumber = client->sequence; rep.length = nameLen/4; rep.present = wanted; - rep.supported = XkbXI_AllDeviceFeaturesMask&(~XkbXIUnsupported); - rep.unsupported = XkbXIUnsupported; + rep.supported = XkbXI_AllDeviceFeaturesMask&(~XkbXI_KeyboardsMask); + rep.unsupported = XkbXI_KeyboardsMask; rep.firstBtnWanted = rep.nBtnsWanted = 0; rep.firstBtnRtrn = rep.nBtnsRtrn = 0; if (dev->button) diff --git a/nx-X11/programs/Xserver/xkb/xkbActions.c b/nx-X11/programs/Xserver/xkb/xkbActions.c index 2bb41b9..d2dda00 100644 --- a/nx-X11/programs/Xserver/xkb/xkbActions.c +++ b/nx-X11/programs/Xserver/xkb/xkbActions.c @@ -996,7 +996,6 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi, return 1; } -#ifdef XFree86Server static int _XkbFilterXF86Private( XkbSrvInfoPtr xkbi, XkbFilterPtr filter, @@ -1018,7 +1017,6 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi, } return 1; } -#endif #ifdef XINPUT @@ -1248,12 +1246,10 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); sendEvent= _XkbFilterDeviceBtn(xkbi,filter,key,&act); break; #endif -#ifdef XFree86Server case XkbSA_XFree86Private: filter = _XkbNextFreeFilter(); sendEvent= _XkbFilterXF86Private(xkbi,filter,key,&act); break; -#endif } } } diff --git a/nx-X11/programs/Xserver/xkb/xkbEvents.c b/nx-X11/programs/Xserver/xkb/xkbEvents.c index d6408a6..c7a0f9e 100644 --- a/nx-X11/programs/Xserver/xkb/xkbEvents.c +++ b/nx-X11/programs/Xserver/xkb/xkbEvents.c @@ -207,6 +207,10 @@ int i; CARD32 changedControls; changedControls= 0; + + if (!kbd || !kbd->kbdfeed) + return 0; + if (old->enabled_ctrls!=new->enabled_ctrls) changedControls|= XkbControlsEnabledMask; if ((old->repeat_delay!=new->repeat_delay)|| diff --git a/nx-X11/programs/Xserver/xkb/xkbInit.c b/nx-X11/programs/Xserver/xkb/xkbInit.c index f39e47a..a459065 100644 --- a/nx-X11/programs/Xserver/xkb/xkbInit.c +++ b/nx-X11/programs/Xserver/xkb/xkbInit.c @@ -54,13 +54,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1) -#if defined(ultrix) || defined(__alpha) || defined(__alpha__) -#define LED_COMPOSE 2 -#define LED_CAPS 3 -#define LED_SCROLL 4 -#define LED_NUM 5 -#define PHYS_LEDS 0x1f -#else #ifdef sun #define LED_NUM 1 #define LED_SCROLL 2 @@ -73,7 +66,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define LED_SCROLL 3 #define PHYS_LEDS 0x07 #endif -#endif #define MAX_TOC 16 typedef struct _SrvXkmInfo { diff --git a/nx-X11/programs/Xserver/xkb/xkbLEDs.c b/nx-X11/programs/Xserver/xkb/xkbLEDs.c index 75e8ef3..2383bdd 100644 --- a/nx-X11/programs/Xserver/xkb/xkbLEDs.c +++ b/nx-X11/programs/Xserver/xkb/xkbLEDs.c @@ -745,13 +745,13 @@ xkbExtensionDeviceNotify my_ed; changes->names.changed_indicators|= changed_names; } - ed->reason|= (XkbXI_IndicatorNamesMask&(~XkbXIUnsupported)); + ed->reason|= (XkbXI_IndicatorNamesMask&(~XkbXI_KeyboardsMask)); ed->ledClass= sli->class; ed->ledID= sli->id; ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledState= sli->effectiveState; - ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorNamesMask; - ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported); + ed->unsupported= XkbXI_KeyboardsMask; + ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask); if (changes!=&my_changes) changes= NULL; if (ed!=&my_ed) ed= NULL; @@ -823,13 +823,13 @@ xkbExtensionDeviceNotify my_ed; XkbCheckIndicatorMaps(dev,sli,changed_maps); - ed->reason|= (XkbXI_IndicatorMapsMask&(~XkbXIUnsupported)); + ed->reason|= (XkbXI_IndicatorMapsMask&(~XkbXI_KeyboardsMask)); ed->ledClass= sli->class; ed->ledID= sli->id; ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledState= sli->effectiveState; - ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorMapsMask; - ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported); + ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorMapsMask; + ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask); XkbUpdateLedAutoState(dev,sli,changed_maps,ed,changes,cause); @@ -904,13 +904,13 @@ Bool kb_changed; if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault)) changes->indicators.state_changes|= affected; if (affected) { - ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXIUnsupported)); + ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXI_KeyboardsMask)); ed->ledClass= sli->class; ed->ledID= sli->id; ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledState= sli->effectiveState; - ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorStateMask; - ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported); + ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorStateMask; + ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask); } if (kb_changed) { diff --git a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c index 9c13d99..ede2355 100644 --- a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c +++ b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c @@ -149,11 +149,7 @@ unsigned ndx; break; default: ErrorF("unknown key behavior 0x%04x\n",behavior.type); -#if defined(MetroLink) - return; -#else break; -#endif } } XkbHandleActions(keybd,keybd,xE,count); diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c index bf88458..c97a54b 100644 --- a/nx-X11/programs/Xserver/xkb/xkbUtils.c +++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c @@ -711,11 +711,11 @@ unsigned char grp; grp= state->locked_group; if (grp>=ctrls->num_groups) - state->locked_group= XkbAdjustGroup(grp,ctrls); + state->locked_group= XkbAdjustGroup(XkbCharToInt(grp),ctrls); grp= state->locked_group+state->base_group+state->latched_group; if (grp>=ctrls->num_groups) - state->group= XkbAdjustGroup(grp,ctrls); + state->group= XkbAdjustGroup(XkbCharToInt(grp),ctrls); else state->group= grp; XkbComputeCompatState(xkbi); return; diff --git a/nx-X11/programs/Xserver/xkb/xkbfmisc.c b/nx-X11/programs/Xserver/xkb/xkbfmisc.c index d2d4a5d..823bb74 100644 --- a/nx-X11/programs/Xserver/xkb/xkbfmisc.c +++ b/nx-X11/programs/Xserver/xkb/xkbfmisc.c @@ -46,18 +46,185 @@ #include "xkbgeom.h" #include "xkb.h" +unsigned +_XkbKSCheckCase(KeySym ks) +{ +unsigned set,rtrn; + + set= (ks & (~0xff)) >> 8; + rtrn= 0; + switch (set) { + case 0: /* latin 1 */ + if (((ks>=XK_A)&&(ks<=XK_Z))|| + ((ks>=XK_Agrave)&&(ks<=XK_THORN)&&(ks!=XK_multiply))) { + rtrn|= _XkbKSUpper; + } + if (((ks>=XK_a)&&(ks<=XK_z))|| + ((ks>=XK_agrave)&&(ks<=XK_ydiaeresis))) { + rtrn|= _XkbKSLower; + } + break; + case 1: /* latin 2 */ + if (((ks>=XK_Aogonek)&&(ks<=XK_Zabovedot)&&(ks!=XK_breve))|| + ((ks>=XK_Racute)&&(ks<=XK_Tcedilla))) { + rtrn|= _XkbKSUpper; + } + if (((ks>=XK_aogonek)&&(ks<=XK_zabovedot)&&(ks!=XK_caron))|| + ((ks>=XK_racute)&&(ks<=XK_tcedilla))) { + rtrn|= _XkbKSLower; + } + break; + case 2: /* latin 3 */ + if (((ks>=XK_Hstroke)&&(ks<=XK_Jcircumflex))|| + ((ks>=XK_Cabovedot)&&(ks<=XK_Scircumflex))) { + rtrn|= _XkbKSUpper; + } + if (((ks>=XK_hstroke)&&(ks<=XK_jcircumflex))|| + ((ks>=XK_cabovedot)&&(ks<=XK_scircumflex))) { + rtrn|= _XkbKSLower; + } + break; + case 3: /* latin 4 */ + if (((ks>=XK_Rcedilla)&&(ks<=XK_Tslash))|| + (ks==XK_ENG)|| + ((ks>=XK_Amacron)&&(ks<=XK_Umacron))) { + rtrn|= _XkbKSUpper; + } + if (((ks>=XK_rcedilla)&&(ks<=XK_tslash))|| + (ks==XK_eng)|| + ((ks>=XK_amacron)&&(ks<=XK_umacron))) { + rtrn|= _XkbKSLower; + } + break; + case 18: /* latin 8 */ + if ((ks==XK_Babovedot)|| + ((ks>=XK_Dabovedot)&&(ks<=XK_Wacute))|| + ((ks>=XK_Ygrave)&&(ks<=XK_Fabovedot))|| + (ks==XK_Mabovedot)|| + (ks==XK_Pabovedot)|| + (ks==XK_Sabovedot)|| + (ks==XK_Wdiaeresis)|| + ((ks>=XK_Wcircumflex)&&(ks<=XK_Ycircumflex))) { + rtrn|= _XkbKSUpper; + } + if ((ks==XK_babovedot)|| + (ks==XK_dabovedot)|| + (ks==XK_fabovedot)|| + (ks==XK_mabovedot)|| + ((ks>=XK_wgrave)&&(ks<=XK_wacute))|| + (ks==XK_ygrave)|| + ((ks>=XK_wdiaeresis)&&(ks<=XK_ycircumflex))) { + rtrn|= _XkbKSLower; + } + break; + case 19: /* latin 9 */ + if ((ks==XK_OE)||(ks==XK_Ydiaeresis)) { + rtrn|= _XkbKSUpper; + } + if (ks==XK_oe) { + rtrn|= _XkbKSLower; + } + break; + } + return rtrn; +} + +/***===================================================================***/ + +Bool +XkbLookupGroupAndLevel( XkbDescPtr xkb, + int key, + int * mods_inout, + int * grp_inout, + int * lvl_rtrn) +{ +int nG,eG; + + if ((!xkb)||(!XkbKeycodeInRange(xkb,key))||(!grp_inout)) + return False; + + nG= XkbKeyNumGroups(xkb,key); + eG= *grp_inout; + + if ( nG==0 ) { + *grp_inout= 0; + if (lvl_rtrn!=NULL) + *lvl_rtrn= 0; + return False; + } + else if ( nG==1 ) { + eG= 0; + } + else if ( eG>=nG ) { + unsigned gI= XkbKeyGroupInfo(xkb,key); + switch (XkbOutOfRangeGroupAction(gI)) { + default: + eG %= nG; + break; + case XkbClampIntoRange: + eG = nG-1; + break; + case XkbRedirectIntoRange: + eG = XkbOutOfRangeGroupNumber(gI); + if (eG>=nG) + eG= 0; + break; + } + } + *grp_inout= eG; + if (mods_inout!=NULL) { + XkbKeyTypePtr type; + int preserve; + + type = XkbKeyKeyType(xkb,key,eG); + if (lvl_rtrn!=NULL) + *lvl_rtrn= 0; + preserve= 0; + if (type->map) { /* find the shift level */ + register int i; + register XkbKTMapEntryPtr entry; + for (i=0,entry=type->map;i<type->map_count;i++,entry++) { + if ((entry->active)&& + (((*mods_inout)&type->mods.mask)==entry->mods.mask)){ + if (lvl_rtrn!=NULL) + *lvl_rtrn= entry->level; + if (type->preserve) + preserve= type->preserve[i].mask; + break; + } + } + } + (*mods_inout)&= ~(type->mods.mask&(~preserve)); + } + return True; +} + /***===================================================================***/ static Bool XkbWriteSectionFromName(FILE *file,char *sectionName,char *name) { fprintf(file," xkb_%-20s { include \"%s\" };\n",sectionName,name); - ErrorF(" xkb_%-20s { include \"%s\" };\n",sectionName,name); return True; } -#define NEED_DESC(n) ((!n)||((n)[0]=='+')||((n)[0]=='|')||(strchr((n),'%'))) -#define COMPLETE(n) ((n)&&(!NEED_DESC(n))) +#define NEED_DESC(n) ((!n)||((n)[0]=='+')||((n)[0]=='|')||(strchr((n),'%'))) +#define COMPLETE(n) ((n)&&(!NEED_DESC(n))) + +/* ARGSUSED */ +static void +_AddIncl( FILE * file, + XkbFileInfo * result, + Bool topLevel, + Bool showImplicit, + int index, + void * priv) +{ + if ((priv)&&(strcmp((char *)priv,"%")!=0)) + fprintf(file," include \"%s\"\n",(char *)priv); + return; +} + Bool XkbWriteXKBKeymapForNames( FILE * file, XkbComponentNamesPtr names, @@ -66,29 +233,230 @@ XkbWriteXKBKeymapForNames( FILE * file, unsigned want, unsigned need) { - if (!names || (!names->keycodes && !names->types && !names->compat && - !names->symbols && !names->geometry)) - return False; - - fprintf(file, "xkb_keymap \"%s\" {\n", names->keymap ? names->keymap : - "default"); - - if (names->keycodes) - XkbWriteSectionFromName(file, "keycodes", names->keycodes); - if (names->types) - XkbWriteSectionFromName(file, "types", names->types); - if (names->compat) - XkbWriteSectionFromName(file, "compatibility", names->compat); - if (names->symbols) - XkbWriteSectionFromName(file, "symbols", names->symbols); - if (names->geometry) - XkbWriteSectionFromName(file, "geometry", names->geometry); - - fprintf(file,"};\n"); +char * name; +const char * tmp; +unsigned complete; +XkbNamesPtr old_names; +int multi_section; +unsigned wantNames,wantConfig,wantDflts; +XkbFileInfo finfo; + + bzero(&finfo,sizeof(XkbFileInfo)); + + complete= 0; + if ((name=names->keymap)==NULL) name= "default"; + if (COMPLETE(names->keycodes)) complete|= XkmKeyNamesMask; + if (COMPLETE(names->types)) complete|= XkmTypesMask; + if (COMPLETE(names->compat)) complete|= XkmCompatMapMask; + if (COMPLETE(names->symbols)) complete|= XkmSymbolsMask; + if (COMPLETE(names->geometry)) complete|= XkmGeometryMask; + want|= (complete|need); + if (want&XkmSymbolsMask) + want|= XkmKeyNamesMask|XkmTypesMask; + + if (want==0) + return False; + + if (xkb!=NULL) { + old_names= xkb->names; + finfo.type= 0; + finfo.defined= 0; + finfo.xkb= xkb; + if (!XkbDetermineFileType(&finfo,XkbXKBFile,NULL)) + return False; + } + else old_names= NULL; + wantConfig= want&(~complete); + if (xkb!=NULL) { + if (wantConfig&XkmTypesMask) { + if ((!xkb->map) || (xkb->map->num_types<XkbNumRequiredTypes)) + wantConfig&= ~XkmTypesMask; + } + if (wantConfig&XkmCompatMapMask) { + if ((!xkb->compat) || (xkb->compat->num_si<1)) + wantConfig&= ~XkmCompatMapMask; + } + if (wantConfig&XkmSymbolsMask) { + if ((!xkb->map) || (!xkb->map->key_sym_map)) + wantConfig&= ~XkmSymbolsMask; + } + if (wantConfig&XkmIndicatorsMask) { + if (!xkb->indicators) + wantConfig&= ~XkmIndicatorsMask; + } + if (wantConfig&XkmKeyNamesMask) { + if ((!xkb->names)||(!xkb->names->keys)) + wantConfig&= ~XkmKeyNamesMask; + } + if ((wantConfig&XkmGeometryMask)&&(!xkb->geom)) + wantConfig&= ~XkmGeometryMask; + } + else { + wantConfig= 0; + } + complete|= wantConfig; + + wantDflts= 0; + wantNames= want&(~complete); + if ((xkb!=NULL) && (old_names!=NULL)) { + if (wantNames&XkmTypesMask) { + if (old_names->types!=None) { + tmp= NameForAtom(old_names->types); + names->types= Xstrdup(tmp); + } + else { + wantDflts|= XkmTypesMask; + } + complete|= XkmTypesMask; + } + if (wantNames&XkmCompatMapMask) { + if (old_names->compat!=None) { + tmp= NameForAtom(old_names->compat); + names->compat= Xstrdup(tmp); + } + else wantDflts|= XkmCompatMapMask; + complete|= XkmCompatMapMask; + } + if (wantNames&XkmSymbolsMask) { + if (old_names->symbols==None) + return False; + tmp= NameForAtom(old_names->symbols); + names->symbols= Xstrdup(tmp); + complete|= XkmSymbolsMask; + } + if (wantNames&XkmKeyNamesMask) { + if (old_names->keycodes!=None) { + tmp= NameForAtom(old_names->keycodes); + names->keycodes= Xstrdup(tmp); + } + else wantDflts|= XkmKeyNamesMask; + complete|= XkmKeyNamesMask; + } + if (wantNames&XkmGeometryMask) { + if (old_names->geometry==None) + return False; + tmp= NameForAtom(old_names->geometry); + names->geometry= Xstrdup(tmp); + complete|= XkmGeometryMask; + wantNames&= ~XkmGeometryMask; + } + } + if (complete&XkmCompatMapMask) + complete|= XkmIndicatorsMask|XkmVirtualModsMask; + else if (complete&(XkmSymbolsMask|XkmTypesMask)) + complete|= XkmVirtualModsMask; + if (need & (~complete)) + return False; + if ((complete&XkmSymbolsMask)&&((XkmKeyNamesMask|XkmTypesMask)&(~complete))) + return False; + + multi_section= 1; + if (((complete&XkmKeymapRequired)==XkmKeymapRequired)&& + ((complete&(~XkmKeymapLegal))==0)) { + fprintf(file,"xkb_keymap \"%s\" {\n",name); + } + else if (((complete&XkmSemanticsRequired)==XkmSemanticsRequired)&& + ((complete&(~XkmSemanticsLegal))==0)) { + fprintf(file,"xkb_semantics \"%s\" {\n",name); + } + else if (((complete&XkmLayoutRequired)==XkmLayoutRequired)&& + ((complete&(~XkmLayoutLegal))==0)) { + fprintf(file,"xkb_layout \"%s\" {\n",name); + } + else if (XkmSingleSection(complete&(~XkmVirtualModsMask))) { + multi_section= 0; + } + else { + return False; + } + + wantNames= complete&(~(wantConfig|wantDflts)); + name= names->keycodes; + if (wantConfig&XkmKeyNamesMask) + XkbWriteXKBKeycodes(file,&finfo,False,False,_AddIncl,name); + else if (wantDflts&XkmKeyNamesMask) + fprintf(stderr,"Default symbols not implemented yet!\n"); + else if (wantNames&XkmKeyNamesMask) + XkbWriteSectionFromName(file,"keycodes",name); + + name= names->types; + if (wantConfig&XkmTypesMask) + XkbWriteXKBKeyTypes(file,&finfo,False,False,_AddIncl,name); + else if (wantDflts&XkmTypesMask) + fprintf(stderr,"Default types not implemented yet!\n"); + else if (wantNames&XkmTypesMask) + XkbWriteSectionFromName(file,"types",name); + + name= names->compat; + if (wantConfig&XkmCompatMapMask) + XkbWriteXKBCompatMap(file,&finfo,False,False,_AddIncl,name); + else if (wantDflts&XkmCompatMapMask) + fprintf(stderr,"Default interps not implemented yet!\n"); + else if (wantNames&XkmCompatMapMask) + XkbWriteSectionFromName(file,"compatibility",name); + + name= names->symbols; + if (wantConfig&XkmSymbolsMask) + XkbWriteXKBSymbols(file,&finfo,False,False,_AddIncl,name); + else if (wantNames&XkmSymbolsMask) + XkbWriteSectionFromName(file,"symbols",name); + + name= names->geometry; + if (wantConfig&XkmGeometryMask) + XkbWriteXKBGeometry(file,&finfo,False,False,_AddIncl,name); + else if (wantNames&XkmGeometryMask) + XkbWriteSectionFromName(file,"geometry",name); + + if (multi_section) + fprintf(file,"};\n"); return True; } +/***====================================================================***/ + +/*ARGSUSED*/ +Status +XkbMergeFile(XkbDescPtr xkb,XkbFileInfo finfo) +{ + return BadImplementation; +} + +/***====================================================================***/ + +int +XkbFindKeycodeByName(XkbDescPtr xkb,char *name,Bool use_aliases) +{ +register int i; + + if ((!xkb)||(!xkb->names)||(!xkb->names->keys)) + return 0; + for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) { + if (strncmp(xkb->names->keys[i].name,name,XkbKeyNameLength)==0) + return i; + } + if (!use_aliases) + return 0; + if (xkb->geom && xkb->geom->key_aliases) { + XkbKeyAliasPtr a; + a= xkb->geom->key_aliases; + for (i=0;i<xkb->geom->num_key_aliases;i++,a++) { + if (strncmp(name,a->alias,XkbKeyNameLength)==0) + return XkbFindKeycodeByName(xkb,a->real,False); + } + } + if (xkb->names && xkb->names->key_aliases) { + XkbKeyAliasPtr a; + a= xkb->names->key_aliases; + for (i=0;i<xkb->names->num_key_aliases;i++,a++) { + if (strncmp(name,a->alias,XkbKeyNameLength)==0) + return XkbFindKeycodeByName(xkb,a->real,False); + } + } + return 0; +} + + unsigned XkbConvertGetByNameComponents(Bool toXkm,unsigned orig) { @@ -115,6 +483,34 @@ unsigned rtrn; return rtrn; } +unsigned +XkbConvertXkbComponents(Bool toXkm,unsigned orig) +{ +unsigned rtrn; + + rtrn= 0; + if (toXkm) { + if (orig&XkbClientMapMask) rtrn|= XkmTypesMask|XkmSymbolsMask; + if (orig&XkbServerMapMask) rtrn|= XkmTypesMask|XkmSymbolsMask; + if (orig&XkbCompatMapMask) rtrn|= XkmCompatMapMask; + if (orig&XkbIndicatorMapMask) rtrn|= XkmIndicatorsMask; + if (orig&XkbNamesMask) rtrn|= XkmKeyNamesMask; + if (orig&XkbGeometryMask) rtrn|= XkmGeometryMask; + } + else { + if (orig!=0) rtrn|= XkbNamesMask; + if (orig&XkmTypesMask) rtrn|= XkbClientMapMask; + if (orig&XkmCompatMapMask) + rtrn|= XkbCompatMapMask|XkbIndicatorMapMask; + if (orig&XkmSymbolsMask) rtrn|=XkbClientMapMask|XkbServerMapMask; + if (orig&XkmIndicatorsMask) rtrn|= XkbIndicatorMapMask; + if (orig&XkmKeyNamesMask) + rtrn|= XkbNamesMask|XkbIndicatorMapMask; + if (orig&XkmGeometryMask) rtrn|= XkbGeometryMask; + } + return rtrn; +} + Bool XkbDetermineFileType(XkbFileInfoPtr finfo,int format,int *opts_missing) { @@ -245,19 +641,3 @@ XkbNameMatchesPattern(char *name,char *ptrn) /* if we get here, the pattern is exhausted (-:just like me:-) */ return (name[0]=='\0'); } - -#ifdef NEED_STRCASECMP -_X_HIDDEN int -_XkbStrCaseCmp(char *str1,char *str2) -{ - const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2; - - while (tolower(*us1) == tolower(*us2)) { - if (*us1++ == '\0') - return (0); - us2++; - } - - return (tolower(*us1) - tolower(*us2)); -} -#endif diff --git a/nx-X11/programs/Xserver/xkb/xkbout.c b/nx-X11/programs/Xserver/xkb/xkbout.c new file mode 100644 index 0000000..ae821c9 --- /dev/null +++ b/nx-X11/programs/Xserver/xkb/xkbout.c @@ -0,0 +1,1047 @@ +/************************************************************ + Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, provided that the above copyright + notice appear in all copies and that both that copyright + notice and this permission notice appear in supporting + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH + THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <stdio.h> +#include <ctype.h> +#include <stdlib.h> +#include <nx-X11/Xfuncs.h> + +#include <nx-X11/X.h> +#include <nx-X11/keysym.h> +#include <nx-X11/Xproto.h> +#include "misc.h" +#include "inputstr.h" +#include "dix.h" +#include "xkbstr.h" +#include <xkbsrv.h> + +#include "xkbgeom.h" +#include <xkbfile.h> + +#define VMOD_HIDE_VALUE 0 +#define VMOD_SHOW_VALUE 1 +#define VMOD_COMMENT_VALUE 2 + +static Bool +WriteXKBVModDecl(FILE *file,Display *dpy,XkbDescPtr xkb,int showValue) +{ +register int i,nMods; +Atom * vmodNames; + + if (xkb==NULL) + return False; + if (xkb->names!=NULL) + vmodNames= xkb->names->vmods; + else vmodNames= NULL; + + for (i=nMods=0;i<XkbNumVirtualMods;i++) { + if ((vmodNames!=NULL)&&(vmodNames[i]!=None)) { + if (nMods==0) fprintf(file," virtual_modifiers "); + else fprintf(file,","); + fprintf(file,"%s",XkbAtomText(dpy,vmodNames[i],XkbXKBFile)); + if ((showValue!=VMOD_HIDE_VALUE)&& + (xkb->server)&&(xkb->server->vmods[i]!=XkbNoModifierMask)) { + if (showValue==VMOD_COMMENT_VALUE) { + fprintf(file,"/* = %s */", + XkbModMaskText(xkb->server->vmods[i],XkbXKBFile)); + } + else { + fprintf(file,"= %s", + XkbModMaskText(xkb->server->vmods[i],XkbXKBFile)); + } + } + nMods++; + } + } + if (nMods>0) + fprintf(file,";\n\n"); + return True; +} + +/***====================================================================***/ + +static Bool +WriteXKBAction(FILE *file,XkbFileInfo *result,XkbAnyAction *action) +{ +XkbDescPtr xkb; +Display * dpy; + + xkb= result->xkb; + dpy= xkb->dpy; + fprintf(file,"%s",XkbActionText(dpy,xkb,(XkbAction *)action,XkbXKBFile)); + return True; +} + +/***====================================================================***/ + +Bool +XkbWriteXKBKeycodes( FILE * file, + XkbFileInfo * result, + Bool topLevel, + Bool showImplicit, + XkbFileAddOnFunc addOn, + void * priv) +{ +Atom kcName; +register unsigned i; +XkbDescPtr xkb; +Display * dpy; +char * alternate; + + xkb= result->xkb; + dpy= xkb->dpy; + if ((!xkb)||(!xkb->names)||(!xkb->names->keys)) { + _XkbLibError(_XkbErrMissingNames,"XkbWriteXKBKeycodes",0); + return False; + } + kcName= xkb->names->keycodes; + if (kcName!=None) + fprintf(file,"xkb_keycodes \"%s\" {\n", + XkbAtomText(dpy,kcName,XkbXKBFile)); + else fprintf(file,"xkb_keycodes {\n"); + fprintf(file," minimum = %d;\n",xkb->min_key_code); + fprintf(file," maximum = %d;\n",xkb->max_key_code); + for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) { + if (xkb->names->keys[i].name[0]!='\0') { + if (XkbFindKeycodeByName(xkb,xkb->names->keys[i].name,True)!=i) + alternate= "alternate "; + else alternate= ""; + fprintf(file," %s%6s = %d;\n",alternate, + XkbKeyNameText(xkb->names->keys[i].name,XkbXKBFile), + i); + } + } + if (xkb->indicators!=NULL) { + for (i=0;i<XkbNumIndicators;i++) { + char *type; + if (xkb->indicators->phys_indicators&(1<<i)) + type= " "; + else type= " virtual "; + if (xkb->names->indicators[i]!=None) { + fprintf(file,"%sindicator %d = \"%s\";\n",type,i+1, + XkbAtomText(dpy,xkb->names->indicators[i],XkbXKBFile)); + } + } + } + if (xkb->names->key_aliases!=NULL) { + XkbKeyAliasPtr pAl; + pAl= xkb->names->key_aliases; + for (i=0;i<xkb->names->num_key_aliases;i++,pAl++) { + fprintf(file," alias %6s = %6s;\n", + XkbKeyNameText(pAl->alias,XkbXKBFile), + XkbKeyNameText(pAl->real,XkbXKBFile)); + } + } + if (addOn) + (*addOn)(file,result,topLevel,showImplicit,XkmKeyNamesIndex,priv); + fprintf(file,"};\n\n"); + return True; +} + +Bool +XkbWriteXKBKeyTypes( FILE * file, + XkbFileInfo * result, + Bool topLevel, + Bool showImplicit, + XkbFileAddOnFunc addOn, + void * priv) +{ +Display * dpy; +register unsigned i,n; +XkbKeyTypePtr type; +XkbKTMapEntryPtr entry; +XkbDescPtr xkb; + + xkb= result->xkb; + dpy= xkb->dpy; + if ((!xkb)||(!xkb->map)||(!xkb->map->types)) { + _XkbLibError(_XkbErrMissingTypes,"XkbWriteXKBKeyTypes",0); + return False; + } + if (xkb->map->num_types<XkbNumRequiredTypes) { + _XkbLibError(_XkbErrMissingReqTypes,"XkbWriteXKBKeyTypes",0); + return 0; + } + if ((xkb->names==NULL)||(xkb->names->types==None)) + fprintf(file,"xkb_types {\n\n"); + else fprintf(file,"xkb_types \"%s\" {\n\n", + XkbAtomText(dpy,xkb->names->types,XkbXKBFile)); + WriteXKBVModDecl(file,dpy,xkb, + (showImplicit?VMOD_COMMENT_VALUE:VMOD_HIDE_VALUE)); + + type= xkb->map->types; + for (i=0;i<xkb->map->num_types;i++,type++) { + fprintf(file," type \"%s\" {\n", + XkbAtomText(dpy,type->name,XkbXKBFile)); + fprintf(file," modifiers= %s;\n", + XkbVModMaskText(dpy,xkb,type->mods.real_mods,type->mods.vmods, + XkbXKBFile)); + entry= type->map; + for (n=0;n<type->map_count;n++,entry++) { + char *str; + str=XkbVModMaskText(dpy,xkb,entry->mods.real_mods,entry->mods.vmods, + XkbXKBFile); + fprintf(file," map[%s]= Level%d;\n",str,entry->level+1); + if ((type->preserve)&&((type->preserve[n].real_mods)|| + (type->preserve[n].vmods))) { + fprintf(file," preserve[%s]= ",str); + fprintf(file,"%s;\n",XkbVModMaskText(dpy,xkb, + type->preserve[n].real_mods, + type->preserve[n].vmods, + XkbXKBFile)); + } + } + if (type->level_names!=NULL) { + Atom *name= type->level_names; + for (n=0;n<type->num_levels;n++,name++) { + if ((*name)==None) + continue; + fprintf(file," level_name[Level%d]= \"%s\";\n",n+1, + XkbAtomText(dpy,*name,XkbXKBFile)); + } + } + fprintf(file," };\n"); + } + if (addOn) + (*addOn)(file,result,topLevel,showImplicit,XkmTypesIndex,priv); + fprintf(file,"};\n\n"); + return True; +} + +static Bool +WriteXKBIndicatorMap( FILE * file, + XkbFileInfo * result, + Atom name, + XkbIndicatorMapPtr led, + XkbFileAddOnFunc addOn, + void * priv) +{ +XkbDescPtr xkb; + + xkb= result->xkb; + fprintf(file," indicator \"%s\" {\n",NameForAtom(name)); + if (led->flags&XkbIM_NoExplicit) + fprintf(file," !allowExplicit;\n"); + if (led->flags&XkbIM_LEDDrivesKB) + fprintf(file," indicatorDrivesKeyboard;\n"); + if (led->which_groups!=0) { + if (led->which_groups!=XkbIM_UseEffective) { + fprintf(file," whichGroupState= %s;\n", + XkbIMWhichStateMaskText(led->which_groups,XkbXKBFile)); + } + fprintf(file," groups= 0x%02x;\n",led->groups); + } + if (led->which_mods!=0) { + if (led->which_mods!=XkbIM_UseEffective) { + fprintf(file," whichModState= %s;\n", + XkbIMWhichStateMaskText(led->which_mods,XkbXKBFile)); + } + fprintf(file," modifiers= %s;\n", + XkbVModMaskText(xkb->dpy,xkb, + led->mods.real_mods,led->mods.vmods, + XkbXKBFile)); + } + if (led->ctrls!=0) { + fprintf(file," controls= %s;\n", + XkbControlsMaskText(led->ctrls,XkbXKBFile)); + } + if (addOn) + (*addOn)(file,result,False,True,XkmIndicatorsIndex,priv); + fprintf(file," };\n"); + return True; +} + +Bool +XkbWriteXKBCompatMap( FILE * file, + XkbFileInfo * result, + Bool topLevel, + Bool showImplicit, + XkbFileAddOnFunc addOn, + void * priv) +{ +Display * dpy; +register unsigned i; +XkbSymInterpretPtr interp; +XkbDescPtr xkb; + + xkb= result->xkb; + dpy= xkb->dpy; + if ((!xkb)||(!xkb->compat)||(!xkb->compat->sym_interpret)) { + _XkbLibError(_XkbErrMissingCompatMap,"XkbWriteXKBCompatMap",0); + return False; + } + if ((xkb->names==NULL)||(xkb->names->compat==None)) + fprintf(file,"xkb_compatibility {\n\n"); + else fprintf(file,"xkb_compatibility \"%s\" {\n\n", + XkbAtomText(dpy,xkb->names->compat,XkbXKBFile)); + WriteXKBVModDecl(file,dpy,xkb, + (showImplicit?VMOD_COMMENT_VALUE:VMOD_HIDE_VALUE)); + + fprintf(file," interpret.useModMapMods= AnyLevel;\n"); + fprintf(file," interpret.repeat= False;\n"); + fprintf(file," interpret.locking= False;\n"); + interp= xkb->compat->sym_interpret; + for (i=0;i<xkb->compat->num_si;i++,interp++) { + fprintf(file," interpret %s+%s(%s) {\n", + ((interp->sym==NoSymbol)?"Any": + XkbKeysymText(interp->sym,XkbXKBFile)), + XkbSIMatchText(interp->match,XkbXKBFile), + XkbModMaskText(interp->mods,XkbXKBFile)); + if (interp->virtual_mod!=XkbNoModifier) { + fprintf(file," virtualModifier= %s;\n", + XkbVModIndexText(dpy,xkb,interp->virtual_mod,XkbXKBFile)); + } + if (interp->match&XkbSI_LevelOneOnly) + fprintf(file," useModMapMods=level1;\n"); + if (interp->flags&XkbSI_LockingKey) + fprintf(file," locking= True;\n"); + if (interp->flags&XkbSI_AutoRepeat) + fprintf(file," repeat= True;\n"); + fprintf(file," action= "); + WriteXKBAction(file,result,&interp->act); + fprintf(file,";\n"); + fprintf(file," };\n"); + } + for (i=0;i<XkbNumKbdGroups;i++) { + XkbModsPtr gc; + + gc= &xkb->compat->groups[i]; + if ((gc->real_mods==0)&&(gc->vmods==0)) + continue; + fprintf(file," group %d = %s;\n",i+1,XkbVModMaskText(xkb->dpy,xkb, + gc->real_mods,gc->vmods, + XkbXKBFile)); + } + if (xkb->indicators) { + for (i=0;i<XkbNumIndicators;i++) { + XkbIndicatorMapPtr map= &xkb->indicators->maps[i]; + if ((map->flags!=0)||(map->which_groups!=0)||(map->groups!=0)|| + (map->which_mods!=0)|| + (map->mods.real_mods!=0)||(map->mods.vmods!=0)|| + (map->ctrls!=0)) { + WriteXKBIndicatorMap(file,result,xkb->names->indicators[i],map, + addOn,priv); + } + } + } + if (addOn) + (*addOn)(file,result,topLevel,showImplicit,XkmCompatMapIndex,priv); + fprintf(file,"};\n\n"); + return True; +} + +Bool +XkbWriteXKBSymbols( FILE * file, + XkbFileInfo * result, + Bool topLevel, + Bool showImplicit, + XkbFileAddOnFunc addOn, + void * priv) +{ +Display * dpy; +register unsigned i,tmp; +XkbDescPtr xkb; +XkbClientMapPtr map; +XkbServerMapPtr srv; +Bool showActions; + + xkb= result->xkb; + map= xkb->map; + srv= xkb->server; + dpy= xkb->dpy; + if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) { + _XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0); + return False; + } + if ((!xkb->names)||(!xkb->names->keys)) { + _XkbLibError(_XkbErrMissingNames,"XkbWriteXKBSymbols",0); + return False; + } + if ((xkb->names==NULL)||(xkb->names->symbols==None)) + fprintf(file,"xkb_symbols {\n\n"); + else fprintf(file,"xkb_symbols \"%s\" {\n\n", + XkbAtomText(dpy,xkb->names->symbols,XkbXKBFile)); + for (tmp=i=0;i<XkbNumKbdGroups;i++) { + if (xkb->names->groups[i]!=None) { + fprintf(file," name[group%d]=\"%s\";\n",i+1, + XkbAtomText(dpy,xkb->names->groups[i],XkbXKBFile)); + tmp++; + } + } + if (tmp>0) + fprintf(file,"\n"); + for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) { + Bool simple; + if ((int)XkbKeyNumSyms(xkb,i)<1) + continue; + if (XkbFindKeycodeByName(xkb,xkb->names->keys[i].name,True)!=i) + continue; + simple= True; + fprintf(file," key %6s {", + XkbKeyNameText(xkb->names->keys[i].name,XkbXKBFile)); + if (srv->explicit) { + if (((srv->explicit[i]&XkbExplicitKeyTypesMask)!=0)|| + (showImplicit)) { + int typeNdx,g; + Bool multi; + char * comment=" "; + + if ((srv->explicit[i]&XkbExplicitKeyTypesMask)==0) + comment= "//"; + multi= False; + typeNdx= XkbKeyKeyTypeIndex(xkb,i,0); + for (g=1;(g<XkbKeyNumGroups(xkb,i))&&(!multi);g++) { + if (XkbKeyKeyTypeIndex(xkb,i,g)!=typeNdx) + multi= True; + } + if (multi) { + for (g=0;g<XkbKeyNumGroups(xkb,i);g++) { + typeNdx= XkbKeyKeyTypeIndex(xkb,i,g); + if (srv->explicit[i]&(1<<g)) { + fprintf(file,"\n%s type[group%d]= \"%s\",", + comment,g+1, + XkbAtomText(dpy,map->types[typeNdx].name, + XkbXKBFile)); + } + else if (showImplicit) { + fprintf(file,"\n// type[group%d]= \"%s\",",g+1, + XkbAtomText(dpy,map->types[typeNdx].name, + XkbXKBFile)); + } + } + } + else { + fprintf(file,"\n%s type= \"%s\",",comment, + XkbAtomText(dpy,map->types[typeNdx].name, + XkbXKBFile)); + } + simple= False; + } + if (((srv->explicit[i]&XkbExplicitAutoRepeatMask)!=0)&& + (xkb->ctrls!=NULL)) { + if (xkb->ctrls->per_key_repeat[i/8]&(1<<(i%8))) + fprintf(file,"\n repeat= Yes,"); + else fprintf(file,"\n repeat= No,"); + simple= False; + } + if ((xkb->server!=NULL)&&(xkb->server->vmodmap!=NULL)&& + (xkb->server->vmodmap[i]!=0)) { + if ((srv->explicit[i]&XkbExplicitVModMapMask)!=0) { + fprintf(file,"\n virtualMods= %s,", + XkbVModMaskText(dpy,xkb,0, + xkb->server->vmodmap[i], + XkbXKBFile)); + } + else if (showImplicit) { + fprintf(file,"\n// virtualMods= %s,", + XkbVModMaskText(dpy,xkb,0, + xkb->server->vmodmap[i], + XkbXKBFile)); + } + } + } + switch (XkbOutOfRangeGroupAction(XkbKeyGroupInfo(xkb,i))) { + case XkbClampIntoRange: + fprintf(file,"\n groupsClamp,"); + break; + case XkbRedirectIntoRange: + fprintf(file,"\n groupsRedirect= Group%d,", + XkbOutOfRangeGroupNumber(XkbKeyGroupInfo(xkb,i))+1); + break; + } + if (srv->behaviors!=NULL) { + unsigned type; + type= srv->behaviors[i].type&XkbKB_OpMask; + + if (type!=XkbKB_Default) { + simple= False; + fprintf(file,"\n %s,", + XkbBehaviorText(xkb,&srv->behaviors[i],XkbXKBFile)); + } + } + if ((srv->explicit==NULL) || showImplicit || + ((srv->explicit[i]&XkbExplicitInterpretMask)!=0)) + showActions= XkbKeyHasActions(xkb,i); + else showActions= False; + + if (((unsigned)XkbKeyNumGroups(xkb,i)>1)||showActions) + simple= False; + if (simple) { + KeySym *syms; + unsigned s; + + syms= XkbKeySymsPtr(xkb,i); + fprintf(file," [ "); + for (s=0;s<XkbKeyGroupWidth(xkb,i,XkbGroup1Index);s++) { + if (s!=0) + fprintf(file,", "); + fprintf(file,"%15s",XkbKeysymText(*syms++,XkbXKBFile)); + } + fprintf(file," ] };\n"); + } + else { + unsigned g,s; + KeySym *syms; + XkbAction *acts; + syms= XkbKeySymsPtr(xkb,i); + acts= XkbKeyActionsPtr(xkb,i); + for (g=0;g<XkbKeyNumGroups(xkb,i);g++) { + if (g!=0) + fprintf(file,","); + fprintf(file,"\n symbols[Group%d]= [ ",g+1); + for (s=0;s<XkbKeyGroupWidth(xkb,i,g);s++) { + if (s!=0) + fprintf(file,", "); + fprintf(file,"%15s",XkbKeysymText(syms[s],XkbXKBFile)); + } + fprintf(file," ]"); + syms+= XkbKeyGroupsWidth(xkb,i); + if (showActions) { + fprintf(file,",\n actions[Group%d]= [ ",g+1); + for (s=0;s<XkbKeyGroupWidth(xkb,i,g);s++) { + if (s!=0) + fprintf(file,", "); + WriteXKBAction(file,result,(XkbAnyAction *)&acts[s]); + } + fprintf(file," ]"); + acts+= XkbKeyGroupsWidth(xkb,i); + } + } + fprintf(file,"\n };\n"); + } + } + if (map && map->modmap) { + for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) { + if (map->modmap[i]!=0) { + register int n,bit; + for (bit=1,n=0;n<XkbNumModifiers;n++,bit<<=1) { + if (map->modmap[i]&bit) { + char buf[5]; + memcpy(buf,xkb->names->keys[i].name,4); + buf[4]= '\0'; + fprintf(file," modifier_map %s { <%s> };\n", + XkbModIndexText(n,XkbXKBFile),buf); + } + } + } + } + } + if (addOn) + (*addOn)(file,result,topLevel,showImplicit,XkmSymbolsIndex,priv); + fprintf(file,"};\n\n"); + return True; +} + +static Bool +WriteXKBOutline( FILE * file, + XkbShapePtr shape, + XkbOutlinePtr outline, + int lastRadius, + int first, + int indent) +{ +register int i; +XkbPointPtr pt; +char * iStr; + + fprintf(file,"%s",iStr= XkbIndentText(first)); + if (first!=indent) + iStr= XkbIndentText(indent); + if (outline->corner_radius!=lastRadius) { + fprintf(file,"corner= %s,", + XkbGeomFPText(outline->corner_radius,XkbMessage)); + if (shape!=NULL) { + fprintf(file,"\n%s",iStr); + } + } + if (shape) { + if (outline==shape->approx) + fprintf(file,"approx= "); + else if (outline==shape->primary) + fprintf(file,"primary= "); + } + fprintf(file,"{"); + for (pt=outline->points,i=0;i<outline->num_points;i++,pt++) { + if (i==0) fprintf(file," "); + else if ((i%4)==0) fprintf(file,",\n%s ",iStr); + else fprintf(file,", "); + fprintf(file,"[ %3s, %3s ]",XkbGeomFPText(pt->x,XkbXKBFile), + XkbGeomFPText(pt->y,XkbXKBFile)); + } + fprintf(file," }"); + return True; +} + +static Bool +WriteXKBDoodad( FILE * file, + Display * dpy, + unsigned indent, + XkbGeometryPtr geom, + XkbDoodadPtr doodad) +{ +register char * i_str; +XkbShapePtr shape; +XkbColorPtr color; + + i_str= XkbIndentText(indent); + fprintf(file,"%s%s \"%s\" {\n",i_str, + XkbDoodadTypeText(doodad->any.type,XkbMessage), + XkbAtomText(dpy,doodad->any.name,XkbMessage)); + fprintf(file,"%s top= %s;\n",i_str, + XkbGeomFPText(doodad->any.top,XkbXKBFile)); + fprintf(file,"%s left= %s;\n",i_str, + XkbGeomFPText(doodad->any.left,XkbXKBFile)); + fprintf(file,"%s priority= %d;\n",i_str,doodad->any.priority); + switch (doodad->any.type) { + case XkbOutlineDoodad: + case XkbSolidDoodad: + if (doodad->shape.angle!=0) { + fprintf(file,"%s angle= %s;\n",i_str, + XkbGeomFPText(doodad->shape.angle,XkbXKBFile)); + } + if (doodad->shape.color_ndx!=0) { + fprintf(file,"%s color= \"%s\";\n",i_str, + XkbShapeDoodadColor(geom,&doodad->shape)->spec); + } + shape= XkbShapeDoodadShape(geom,&doodad->shape); + fprintf(file,"%s shape= \"%s\";\n",i_str, + XkbAtomText(dpy,shape->name,XkbXKBFile)); + break; + case XkbTextDoodad: + if (doodad->text.angle!=0) { + fprintf(file,"%s angle= %s;\n",i_str, + XkbGeomFPText(doodad->text.angle,XkbXKBFile)); + } + if (doodad->text.width!=0) { + fprintf(file,"%s width= %s;\n",i_str, + XkbGeomFPText(doodad->text.width,XkbXKBFile)); + + } + if (doodad->text.height!=0) { + fprintf(file,"%s height= %s;\n",i_str, + XkbGeomFPText(doodad->text.height,XkbXKBFile)); + + } + if (doodad->text.color_ndx!=0) { + color= XkbTextDoodadColor(geom,&doodad->text); + fprintf(file,"%s color= \"%s\";\n",i_str, + XkbStringText(color->spec,XkbXKBFile)); + } + fprintf(file,"%s XFont= \"%s\";\n",i_str, + XkbStringText(doodad->text.font,XkbXKBFile)); + fprintf(file,"%s text= \"%s\";\n",i_str, + XkbStringText(doodad->text.text,XkbXKBFile)); + break; + case XkbIndicatorDoodad: + shape= XkbIndicatorDoodadShape(geom,&doodad->indicator); + color= XkbIndicatorDoodadOnColor(geom,&doodad->indicator); + fprintf(file,"%s onColor= \"%s\";\n",i_str, + XkbStringText(color->spec,XkbXKBFile)); + color= XkbIndicatorDoodadOffColor(geom,&doodad->indicator); + fprintf(file,"%s offColor= \"%s\";\n",i_str, + XkbStringText(color->spec,XkbXKBFile)); + fprintf(file,"%s shape= \"%s\";\n",i_str, + XkbAtomText(dpy,shape->name,XkbXKBFile)); + break; + case XkbLogoDoodad: + fprintf(file,"%s logoName= \"%s\";\n",i_str, + XkbStringText(doodad->logo.logo_name,XkbXKBFile)); + if (doodad->shape.angle!=0) { + fprintf(file,"%s angle= %s;\n",i_str, + XkbGeomFPText(doodad->logo.angle,XkbXKBFile)); + } + if (doodad->shape.color_ndx!=0) { + fprintf(file,"%s color= \"%s\";\n",i_str, + XkbLogoDoodadColor(geom,&doodad->logo)->spec); + } + shape= XkbLogoDoodadShape(geom,&doodad->logo); + fprintf(file,"%s shape= \"%s\";\n",i_str, + XkbAtomText(dpy,shape->name,XkbXKBFile)); + break; + } + fprintf(file,"%s};\n",i_str); + return True; +} + +/*ARGSUSED*/ +static Bool +WriteXKBOverlay( FILE * file, + Display * dpy, + unsigned indent, + XkbGeometryPtr geom, + XkbOverlayPtr ol) +{ +register char * i_str; +int r,k,nOut; +XkbOverlayRowPtr row; +XkbOverlayKeyPtr key; + + i_str= XkbIndentText(indent); + if (ol->name!=None) { + fprintf(file,"%soverlay \"%s\" {\n",i_str, + XkbAtomText(dpy,ol->name,XkbMessage)); + } + else fprintf(file,"%soverlay {\n",i_str); + for (nOut=r=0,row=ol->rows;r<ol->num_rows;r++,row++) { + for (k=0,key=row->keys;k<row->num_keys;k++,key++) { + char *over,*under; + over= XkbKeyNameText(key->over.name,XkbXKBFile); + under= XkbKeyNameText(key->under.name,XkbXKBFile); + if (nOut==0) + fprintf(file,"%s %6s=%6s",i_str,under,over); + else if ((nOut%4)==0) + fprintf(file,",\n%s %6s=%6s",i_str,under,over); + else fprintf(file,", %6s=%6s",under,over); + nOut++; + } + } + fprintf(file,"\n%s};\n",i_str); + return True; +} + +static Bool +WriteXKBSection( FILE * file, + Display * dpy, + XkbSectionPtr s, + XkbGeometryPtr geom) +{ +register int i; +XkbRowPtr row; +int dfltKeyColor = 0; + + fprintf(file," section \"%s\" {\n", + XkbAtomText(dpy,s->name,XkbXKBFile)); + if (s->rows&&(s->rows->num_keys>0)) { + dfltKeyColor= s->rows->keys[0].color_ndx; + fprintf(file," key.color= \"%s\";\n", + XkbStringText(geom->colors[dfltKeyColor].spec,XkbXKBFile)); + } + fprintf(file," priority= %d;\n",s->priority); + fprintf(file," top= %s;\n",XkbGeomFPText(s->top,XkbXKBFile)); + fprintf(file," left= %s;\n",XkbGeomFPText(s->left,XkbXKBFile)); + fprintf(file," width= %s;\n",XkbGeomFPText(s->width,XkbXKBFile)); + fprintf(file," height= %s;\n", + XkbGeomFPText(s->height,XkbXKBFile)); + if (s->angle!=0) { + fprintf(file," angle= %s;\n", + XkbGeomFPText(s->angle,XkbXKBFile)); + } + for (i=0,row=s->rows;i<s->num_rows;i++,row++) { + fprintf(file," row {\n"); + fprintf(file," top= %s;\n", + XkbGeomFPText(row->top,XkbXKBFile)); + fprintf(file," left= %s;\n", + XkbGeomFPText(row->left,XkbXKBFile)); + if (row->vertical) + fprintf(file," vertical;\n"); + if (row->num_keys>0) { + register int k; + register XkbKeyPtr key; + int forceNL=0; + int nThisLine= 0; + fprintf(file," keys {\n"); + for (k=0,key=row->keys;k<row->num_keys;k++,key++) { + XkbShapePtr shape; + if (key->color_ndx!=dfltKeyColor) + forceNL= 1; + if (k==0) { + fprintf(file," "); + nThisLine= 0; + } + else if (((nThisLine%2)==1)||(forceNL)) { + fprintf(file,",\n "); + forceNL= nThisLine= 0; + } + else { + fprintf(file,", "); + nThisLine++; + } + shape= XkbKeyShape(geom,key); + fprintf(file,"{ %6s, \"%s\", %3s", + XkbKeyNameText(key->name.name,XkbXKBFile), + XkbAtomText(dpy,shape->name,XkbXKBFile), + XkbGeomFPText(key->gap,XkbXKBFile)); + if (key->color_ndx!=dfltKeyColor) { + fprintf(file,", color=\"%s\"",XkbKeyColor(geom,key)->spec); + forceNL= 1; + } + fprintf(file," }"); + } + fprintf(file,"\n };\n"); + } + fprintf(file," };\n"); + } + if (s->doodads!=NULL) { + XkbDoodadPtr doodad; + for (i=0,doodad=s->doodads;i<s->num_doodads;i++,doodad++) { + WriteXKBDoodad(file,dpy,8,geom,doodad); + } + } + if (s->overlays!=NULL) { + XkbOverlayPtr ol; + for (i=0,ol=s->overlays;i<s->num_overlays;i++,ol++) { + WriteXKBOverlay(file,dpy,8,geom,ol); + } + } + fprintf(file," }; // End of \"%s\" section\n\n", + XkbAtomText(dpy,s->name,XkbXKBFile)); + return True; +} + +Bool +XkbWriteXKBGeometry( FILE * file, + XkbFileInfo * result, + Bool topLevel, + Bool showImplicit, + XkbFileAddOnFunc addOn, + void * priv) +{ +Display * dpy; +register unsigned i,n; +XkbDescPtr xkb; +XkbGeometryPtr geom; + + xkb= result->xkb; + if ((!xkb)||(!xkb->geom)) { + _XkbLibError(_XkbErrMissingGeometry,"XkbWriteXKBGeometry",0); + return False; + } + dpy= xkb->dpy; + geom= xkb->geom; + if (geom->name==None) + fprintf(file,"xkb_geometry {\n\n"); + else fprintf(file,"xkb_geometry \"%s\" {\n\n", + XkbAtomText(dpy,geom->name,XkbXKBFile)); + fprintf(file," width= %s;\n", + XkbGeomFPText(geom->width_mm,XkbXKBFile)); + fprintf(file," height= %s;\n\n", + XkbGeomFPText(geom->height_mm,XkbXKBFile)); + + if (geom->key_aliases!=NULL) { + XkbKeyAliasPtr pAl; + pAl= geom->key_aliases; + for (i=0;i<geom->num_key_aliases;i++,pAl++) { + fprintf(file," alias %6s = %6s;\n", + XkbKeyNameText(pAl->alias,XkbXKBFile), + XkbKeyNameText(pAl->real,XkbXKBFile)); + } + fprintf(file,"\n"); + } + + if (geom->base_color!=NULL) + fprintf(file," baseColor= \"%s\";\n", + XkbStringText(geom->base_color->spec,XkbXKBFile)); + if (geom->label_color!=NULL) + fprintf(file," labelColor= \"%s\";\n", + XkbStringText(geom->label_color->spec,XkbXKBFile)); + if (geom->label_font!=NULL) + fprintf(file," xfont= \"%s\";\n", + XkbStringText(geom->label_font,XkbXKBFile)); + if ((geom->num_colors>0)&&(showImplicit)) { + XkbColorPtr color; + for (color=geom->colors,i=0;i<geom->num_colors;i++,color++) { + fprintf(file,"// color[%d]= \"%s\"\n",i, + XkbStringText(color->spec,XkbXKBFile)); + } + fprintf(file,"\n"); + } + if (geom->num_properties>0) { + XkbPropertyPtr prop; + for (prop=geom->properties,i=0;i<geom->num_properties;i++,prop++) { + fprintf(file," %s= \"%s\";\n",prop->name, + XkbStringText(prop->value,XkbXKBFile)); + } + fprintf(file,"\n"); + } + if (geom->num_shapes>0) { + XkbShapePtr shape; + XkbOutlinePtr outline; + int lastR; + for (shape=geom->shapes,i=0;i<geom->num_shapes;i++,shape++) { + lastR=0; + fprintf(file," shape \"%s\" {", + XkbAtomText(dpy,shape->name,XkbXKBFile)); + outline= shape->outlines; + if (shape->num_outlines>1) { + for (n=0;n<shape->num_outlines;n++,outline++) { + if (n==0) fprintf(file,"\n"); + else fprintf(file,",\n"); + WriteXKBOutline(file,shape,outline,lastR,8,8); + lastR= outline->corner_radius; + } + fprintf(file,"\n };\n"); + } + else { + WriteXKBOutline(file,NULL,outline,lastR,1,8); + fprintf(file," };\n"); + } + } + } + if (geom->num_sections>0) { + XkbSectionPtr section; + for (section=geom->sections,i=0;i<geom->num_sections;i++,section++){ + WriteXKBSection(file,dpy,section,geom); + } + } + if (geom->num_doodads>0) { + XkbDoodadPtr doodad; + for (i=0,doodad=geom->doodads;i<geom->num_doodads;i++,doodad++) { + WriteXKBDoodad(file,dpy,4,geom,doodad); + } + } + if (addOn) + (*addOn)(file,result,topLevel,showImplicit,XkmGeometryIndex,priv); + fprintf(file,"};\n\n"); + return True; +} + +/*ARGSUSED*/ +Bool +XkbWriteXKBSemantics( FILE * file, + XkbFileInfo * result, + Bool topLevel, + Bool showImplicit, + XkbFileAddOnFunc addOn, + void * priv) +{ +Bool ok; + + fprintf(file,"xkb_semantics {\n"); + ok= XkbWriteXKBKeyTypes(file,result,False,False,addOn,priv); + ok= ok&&XkbWriteXKBCompatMap(file,result,False,False,addOn,priv); + fprintf(file,"};\n"); + return ok; +} + +/*ARGSUSED*/ +Bool +XkbWriteXKBLayout( FILE * file, + XkbFileInfo * result, + Bool topLevel, + Bool showImplicit, + XkbFileAddOnFunc addOn, + void * priv) +{ +Bool ok; +XkbDescPtr xkb; + + xkb= result->xkb; + fprintf(file,"xkb_layout {\n"); + ok= XkbWriteXKBKeycodes(file,result,False,showImplicit,addOn,priv); + ok= ok&&XkbWriteXKBKeyTypes(file,result,False,showImplicit,addOn,priv); + ok= ok&&XkbWriteXKBSymbols(file,result,False,showImplicit,addOn,priv); + if (xkb->geom) + ok= ok&&XkbWriteXKBGeometry(file,result,False,showImplicit,addOn,priv); + fprintf(file,"};\n"); + return ok; +} + +/*ARGSUSED*/ +Bool +XkbWriteXKBKeymap( FILE * file, + XkbFileInfo * result, + Bool topLevel, + Bool showImplicit, + XkbFileAddOnFunc addOn, + void * priv) +{ +Bool ok; +XkbDescPtr xkb; + + xkb= result->xkb; + fprintf(file,"xkb_keymap {\n"); + ok= XkbWriteXKBKeycodes(file,result,False,showImplicit,addOn,priv); + ok= ok&&XkbWriteXKBKeyTypes(file,result,False,showImplicit,addOn,priv); + ok= ok&&XkbWriteXKBCompatMap(file,result,False,showImplicit,addOn,priv); + ok= ok&&XkbWriteXKBSymbols(file,result,False,showImplicit,addOn,priv); + if (xkb->geom) + ok= ok&&XkbWriteXKBGeometry(file,result,False,showImplicit,addOn,priv); + fprintf(file,"};\n"); + return ok; +} + +Bool +XkbWriteXKBFile( FILE * out, + XkbFileInfo * result, + Bool showImplicit, + XkbFileAddOnFunc addOn, + void * priv) +{ +Bool ok = False; +Bool (*func)( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +) = NULL; + + switch (result->type) { + case XkmSemanticsFile: + func= XkbWriteXKBSemantics; + break; + case XkmLayoutFile: + func= XkbWriteXKBLayout; + break; + case XkmKeymapFile: + func= XkbWriteXKBKeymap; + break; + case XkmTypesIndex: + func= XkbWriteXKBKeyTypes; + break; + case XkmCompatMapIndex: + func= XkbWriteXKBCompatMap; + break; + case XkmSymbolsIndex: + func= XkbWriteXKBSymbols; + break; + case XkmKeyNamesIndex: + func= XkbWriteXKBKeycodes; + break; + case XkmGeometryFile: + case XkmGeometryIndex: + func= XkbWriteXKBGeometry; + break; + case XkmVirtualModsIndex: + case XkmIndicatorsIndex: + _XkbLibError(_XkbErrBadImplementation, + XkbConfigText(result->type,XkbMessage),0); + return False; + } + if (out==NULL) { + _XkbLibError(_XkbErrFileCannotOpen,"XkbWriteXkbFile",0); + ok= False; + } + else if (func) { + ok= (*func)(out,result,True,showImplicit,addOn,priv); + } + return ok; +} diff --git a/nx-X11/programs/Xserver/xkb/xkbtext.c b/nx-X11/programs/Xserver/xkb/xkbtext.c new file mode 100644 index 0000000..dc1c712 --- /dev/null +++ b/nx-X11/programs/Xserver/xkb/xkbtext.c @@ -0,0 +1,1325 @@ +/************************************************************ + Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, provided that the above copyright + notice appear in all copies and that both that copyright + notice and this permission notice appear in supporting + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH + THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <stdio.h> +#include <ctype.h> +#include <stdlib.h> + +#include <nx-X11/Xos.h> + +#include <nx-X11/X.h> +#include <nx-X11/Xproto.h> +#include "misc.h" +#include "inputstr.h" +#include "dix.h" +#include "xkbstr.h" +#include <xkbsrv.h> +#include "xkbgeom.h" + +/***====================================================================***/ + +#define BUFFER_SIZE 512 + +static char textBuffer[BUFFER_SIZE]; +static int tbNext= 0; + +static char * +tbGetBuffer(unsigned size) +{ +char *rtrn; + + if (size>=BUFFER_SIZE) + return NULL; + if ((BUFFER_SIZE-tbNext)<=size) + tbNext= 0; + rtrn= &textBuffer[tbNext]; + tbNext+= size; + return rtrn; +} + +/***====================================================================***/ + +char * +XkbAtomText(Display *dpy,Atom atm,unsigned format) +{ +const char *atmstr; +char *rtrn,*tmp; + + atmstr= NameForAtom(atm); + if (atmstr!=NULL) { + int len; + len= strlen(atmstr)+1; + if (len>BUFFER_SIZE) + len= BUFFER_SIZE-2; + rtrn= tbGetBuffer(len); + strncpy(rtrn,atmstr,len); + rtrn[len]= '\0'; + } + else { + rtrn= tbGetBuffer(1); + rtrn[0]= '\0'; + } + if (format==XkbCFile) { + for (tmp=rtrn;*tmp!='\0';tmp++) { + if ((tmp==rtrn)&&(!isalpha(*tmp))) + *tmp= '_'; + else if (!isalnum(*tmp)) + *tmp= '_'; + } + } + return XkbStringText(rtrn,format); +} + +/***====================================================================***/ + +char * +XkbVModIndexText(Display *dpy,XkbDescPtr xkb,unsigned ndx,unsigned format) +{ +register int len; +register Atom *vmodNames; +char *rtrn; +const char *tmp; +char numBuf[20]; + + if (xkb && xkb->names) + vmodNames= xkb->names->vmods; + else vmodNames= NULL; + + tmp= NULL; + if (ndx>=XkbNumVirtualMods) + tmp= "illegal"; + else if (vmodNames&&(vmodNames[ndx]!=None)) + tmp= NameForAtom(vmodNames[ndx]); + if (tmp==NULL) { + sprintf(numBuf,"%d",ndx); + tmp = numBuf; + } + + len= strlen(tmp)+1; + if (format==XkbCFile) + len+= 4; + if (len>=BUFFER_SIZE) + len= BUFFER_SIZE-1; + rtrn= tbGetBuffer(len); + if (format==XkbCFile) { + strcpy(rtrn,"vmod_"); + strncpy(&rtrn[5],tmp,len-4); + } + else strncpy(rtrn,tmp,len); + return rtrn; +} + +char * +XkbVModMaskText( Display * dpy, + XkbDescPtr xkb, + unsigned modMask, + unsigned mask, + unsigned format) +{ +register int i,bit; +int len; +char *mm,*rtrn; +char *str,buf[BUFFER_SIZE]; + + if ((modMask==0)&&(mask==0)) { + rtrn= tbGetBuffer(5); + if (format==XkbCFile) + sprintf(rtrn,"0"); + else sprintf(rtrn,"none"); + return rtrn; + } + if (modMask!=0) + mm= XkbModMaskText(modMask,format); + else mm= NULL; + + str= buf; + buf[0]= '\0'; + if (mask) { + char *tmp; + for (i=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) { + if (mask&bit) { + tmp= XkbVModIndexText(dpy,xkb,i,format); + len= strlen(tmp)+1+(str==buf?0:1); + if (format==XkbCFile) + len+= 4; + if ((str-(buf+len))<=BUFFER_SIZE) { + if (str!=buf) { + if (format==XkbCFile) *str++= '|'; + else *str++= '+'; + len--; + } + } + if (format==XkbCFile) + sprintf(str,"%sMask",tmp); + else strcpy(str,tmp); + str= &str[len-1]; + } + } + str= buf; + } + else str= NULL; + if (mm) + len= strlen(mm); + else len= 0; + if (str) + len+= strlen(str)+(mm==NULL?0:1); + if (len>=BUFFER_SIZE) + len= BUFFER_SIZE-1; + rtrn= tbGetBuffer(len+1); + rtrn[0]= '\0'; + + if (mm!=NULL) { + i= strlen(mm); + if (i>len) + i= len; + strcpy(rtrn,mm); + } + else { + i=0; + } + if (str!=NULL) { + if (mm!=NULL) { + if (format==XkbCFile) strcat(rtrn,"|"); + else strcat(rtrn,"+"); + } + strncat(rtrn,str,len-i); + } + rtrn[len]= '\0'; + return rtrn; +} + +static char *modNames[XkbNumModifiers] = { + "Shift", "Lock", "Control", "Mod1", "Mod2", "Mod3", "Mod4", "Mod5" +}; + +char * +XkbModIndexText(unsigned ndx,unsigned format) +{ +char * rtrn; +char buf[100]; + + if (format==XkbCFile) { + if (ndx<XkbNumModifiers) + sprintf(buf,"%sMapIndex",modNames[ndx]); + else if (ndx==XkbNoModifier) + sprintf(buf,"XkbNoModifier"); + else sprintf(buf,"0x%02x",ndx); + } + else { + if (ndx<XkbNumModifiers) + strcpy(buf,modNames[ndx]); + else if (ndx==XkbNoModifier) + strcpy(buf,"none"); + else sprintf(buf,"ILLEGAL_%02x",ndx); + } + rtrn= tbGetBuffer(strlen(buf)+1); + strcpy(rtrn,buf); + return rtrn; +} + +char * +XkbModMaskText(unsigned mask,unsigned format) +{ +register int i,bit; +char buf[64],*rtrn; + + if ((mask&0xff)==0xff) { + if (format==XkbCFile) strcpy(buf,"0xff"); + else strcpy(buf,"all"); + } + else if ((mask&0xff)==0) { + if (format==XkbCFile) strcpy(buf,"0"); + else strcpy(buf,"none"); + } + else { + char *str= buf; + buf[0]= '\0'; + for (i=0,bit=1;i<XkbNumModifiers;i++,bit<<=1) { + if (mask&bit) { + if (str!=buf) { + if (format==XkbCFile) *str++= '|'; + else *str++= '+'; + } + strcpy(str,modNames[i]); + str= &str[strlen(str)]; + if (format==XkbCFile) { + strcpy(str,"Mask"); + str+= 4; + } + } + } + } + rtrn= tbGetBuffer(strlen(buf)+1); + strcpy(rtrn,buf); + return rtrn; +} + +/***====================================================================***/ + +/*ARGSUSED*/ +char * +XkbConfigText(unsigned config,unsigned format) +{ +static char *buf; + + buf= tbGetBuffer(32); + switch (config) { + case XkmSemanticsFile: + strcpy(buf,"Semantics"); + break; + case XkmLayoutFile: + strcpy(buf,"Layout"); + break; + case XkmKeymapFile: + strcpy(buf,"Keymap"); + break; + case XkmGeometryFile: + case XkmGeometryIndex: + strcpy(buf,"Geometry"); + break; + case XkmTypesIndex: + strcpy(buf,"Types"); + break; + case XkmCompatMapIndex: + strcpy(buf,"CompatMap"); + break; + case XkmSymbolsIndex: + strcpy(buf,"Symbols"); + break; + case XkmIndicatorsIndex: + strcpy(buf,"Indicators"); + break; + case XkmKeyNamesIndex: + strcpy(buf,"KeyNames"); + break; + case XkmVirtualModsIndex: + strcpy(buf,"VirtualMods"); + break; + default: + sprintf(buf,"unknown(%d)",config); + break; + } + return buf; +} + +/***====================================================================***/ + +char * +XkbKeysymText(KeySym sym,unsigned format) +{ +static char buf[32],*rtrn; + + if (sym==NoSymbol) + strcpy(rtrn=buf,"NoSymbol"); + else sprintf(rtrn=buf, "0x%lx", (long)sym); + return rtrn; +} + +char * +XkbKeyNameText(char *name,unsigned format) +{ +char *buf; + + if (format==XkbCFile) { + buf= tbGetBuffer(5); + memcpy(buf,name,4); + buf[4]= '\0'; + } + else { + int len; + buf= tbGetBuffer(7); + buf[0]= '<'; + memcpy(&buf[1],name,4); + buf[5]= '\0'; + len= strlen(buf); + buf[len++]= '>'; + buf[len]= '\0'; + } + return buf; +} + +/***====================================================================***/ + +static char *siMatchText[5] = { + "NoneOf", "AnyOfOrNone", "AnyOf", "AllOf", "Exactly" +}; + +char * +XkbSIMatchText(unsigned type,unsigned format) +{ +static char buf[40]; +char *rtrn; + + switch (type&XkbSI_OpMask) { + case XkbSI_NoneOf: rtrn= siMatchText[0]; break; + case XkbSI_AnyOfOrNone: rtrn= siMatchText[1]; break; + case XkbSI_AnyOf: rtrn= siMatchText[2]; break; + case XkbSI_AllOf: rtrn= siMatchText[3]; break; + case XkbSI_Exactly: rtrn= siMatchText[4]; break; + default: sprintf(buf,"0x%x",type&XkbSI_OpMask); + return buf; + } + if (format==XkbCFile) { + if (type&XkbSI_LevelOneOnly) + sprintf(buf,"XkbSI_LevelOneOnly|XkbSI_%s",rtrn); + else sprintf(buf,"XkbSI_%s",rtrn); + rtrn= buf; + } + return rtrn; +} + +/***====================================================================***/ + +static char *imWhichNames[]= { + "base", + "latched", + "locked", + "effective", + "compat" +}; + +char * +XkbIMWhichStateMaskText(unsigned use_which,unsigned format) +{ +int len; +unsigned i,bit,tmp; +char * buf; + + if (use_which==0) { + buf= tbGetBuffer(2); + strcpy(buf,"0"); + return buf; + } + tmp= use_which&XkbIM_UseAnyMods; + for (len=i=0,bit=1;tmp!=0;i++,bit<<=1) { + if (tmp&bit) { + tmp&= ~bit; + len+= strlen(imWhichNames[i])+1; + if (format==XkbCFile) + len+= 9; + } + } + buf= tbGetBuffer(len+1); + tmp= use_which&XkbIM_UseAnyMods; + for (len=i=0,bit=1;tmp!=0;i++,bit<<=1) { + if (tmp&bit) { + tmp&= ~bit; + if (format==XkbCFile) { + if (len!=0) + buf[len++]= '|'; + sprintf(&buf[len],"XkbIM_Use%s",imWhichNames[i]); + buf[len+9]= toupper(buf[len+9]); + } + else { + if (len!=0) + buf[len++]= '+'; + sprintf(&buf[len],"%s",imWhichNames[i]); + } + len+= strlen(&buf[len]); + } + } + return buf; +} + +char * +XkbAccessXDetailText(unsigned state,unsigned format) +{ +char *buf,*prefix; + + buf= tbGetBuffer(32); + if (format==XkbMessage) prefix= ""; + else prefix= "XkbAXN_"; + switch (state){ + case XkbAXN_SKPress: sprintf(buf,"%sSKPress",prefix); break; + case XkbAXN_SKAccept: sprintf(buf,"%sSKAccept",prefix); break; + case XkbAXN_SKRelease: sprintf(buf,"%sSKRelease",prefix); break; + case XkbAXN_SKReject: sprintf(buf,"%sSKReject",prefix); break; + case XkbAXN_BKAccept: sprintf(buf,"%sBKAccept",prefix); break; + case XkbAXN_BKReject: sprintf(buf,"%sBKReject",prefix); break; + case XkbAXN_AXKWarning: sprintf(buf,"%sAXKWarning",prefix); break; + default: sprintf(buf,"ILLEGAL"); break; + } + return buf; +} + +static char *nknNames[] = { + "keycodes", "geometry", "deviceID" +}; +#define NUM_NKN (sizeof(nknNames)/sizeof(char *)) + +char * +XkbNKNDetailMaskText(unsigned detail,unsigned format) +{ +char *buf,*prefix,*suffix; +register int i; +register unsigned bit; +int len,plen,slen; + + + if ((detail&XkbAllNewKeyboardEventsMask)==0) { + char *tmp = ""; + if (format==XkbCFile) tmp= "0"; + else if (format==XkbMessage) tmp= "none"; + buf= tbGetBuffer(strlen(tmp)+1); + strcpy(buf,tmp); + return buf; + } + else if ((detail&XkbAllNewKeyboardEventsMask)==XkbAllNewKeyboardEventsMask){ + char * tmp; + if (format==XkbCFile) tmp= "XkbAllNewKeyboardEventsMask"; + else tmp= "all"; + buf= tbGetBuffer(strlen(tmp)+1); + strcpy(buf,tmp); + return buf; + } + if (format==XkbMessage) { + prefix= ""; + suffix= ""; + slen= plen= 0; + } + else { + prefix= "XkbNKN_"; + plen= 7; + if (format==XkbCFile) + suffix= "Mask"; + else suffix= ""; + slen= strlen(suffix); + } + for (len=0,i=0,bit=1;i<NUM_NKN;i++,bit<<=1) { + if (detail&bit) { + if (len!=0) len+= 1; /* room for '+' or '|' */ + len+= plen+slen+strlen(nknNames[i]); + } + } + buf= tbGetBuffer(len+1); + buf[0]= '\0'; + for (len=0,i=0,bit=1;i<NUM_NKN;i++,bit<<=1) { + if (detail&bit) { + if (len!=0) { + if (format==XkbCFile) buf[len++]= '|'; + else buf[len++]= '+'; + } + if (plen) { + strcpy(&buf[len],prefix); + len+= plen; + } + strcpy(&buf[len],nknNames[i]); + len+= strlen(nknNames[i]); + if (slen) { + strcpy(&buf[len],suffix); + len+= slen; + } + } + } + buf[len++]= '\0'; + return buf; +} + +static char *ctrlNames[] = { + "repeatKeys", + "slowKeys", + "bounceKeys", + "stickyKeys", + "mouseKeys", + "mouseKeysAccel", + "accessXKeys", + "accessXTimeout", + "accessXFeedback", + "audibleBell", + "overlay1", + "overlay2", + "ignoreGroupLock" +}; + +char * +XkbControlsMaskText(unsigned ctrls,unsigned format) +{ +int len; +unsigned i,bit,tmp; +char * buf; + + if (ctrls==0) { + buf= tbGetBuffer(5); + if (format==XkbCFile) + strcpy(buf,"0"); + else strcpy(buf,"none"); + return buf; + } + tmp= ctrls&XkbAllBooleanCtrlsMask; + for (len=i=0,bit=1;tmp!=0;i++,bit<<=1) { + if (tmp&bit) { + tmp&= ~bit; + len+= strlen(ctrlNames[i])+1; + if (format==XkbCFile) + len+= 7; + } + } + buf= tbGetBuffer(len+1); + tmp= ctrls&XkbAllBooleanCtrlsMask; + for (len=i=0,bit=1;tmp!=0;i++,bit<<=1) { + if (tmp&bit) { + tmp&= ~bit; + if (format==XkbCFile) { + if (len!=0) + buf[len++]= '|'; + sprintf(&buf[len],"Xkb%sMask",ctrlNames[i]); + buf[len+3]= toupper(buf[len+3]); + } + else { + if (len!=0) + buf[len++]= '+'; + sprintf(&buf[len],"%s",ctrlNames[i]); + } + len+= strlen(&buf[len]); + } + } + return buf; +} + +/***====================================================================***/ + +char * +XkbStringText(char *str,unsigned format) +{ +char * buf; +register char *in,*out; +int len; +Bool ok; + + if (str==NULL) { + buf= tbGetBuffer(2); + buf[0]='\0'; + return buf; + } + else if (format==XkbXKMFile) + return str; + for (ok= True,len=0,in=str;*in!='\0';in++,len++) { + if (!isprint(*in)) { + ok= False; + switch (*in) { + case '\n': case '\t': case '\v': + case '\b': case '\r': case '\f': + len++; + break; + default: + len+= 4; + break; + } + } + } + if (ok) + return str; + buf= tbGetBuffer(len+1); + for (in=str,out=buf;*in!='\0';in++) { + if (isprint(*in)) + *out++= *in; + else { + *out++= '\\'; + if (*in=='\n') *out++= 'n'; + else if (*in=='\t') *out++= 't'; + else if (*in=='\v') *out++= 'v'; + else if (*in=='\b') *out++= 'b'; + else if (*in=='\r') *out++= 'r'; + else if (*in=='\f') *out++= 'f'; + else if ((*in=='\033')&&(format==XkbXKMFile)) { + *out++= 'e'; + } + else { + *out++= '0'; + sprintf(out,"%o",*in); + while (*out!='\0') + out++; + } + } + } + *out++= '\0'; + return buf; +} + +/***====================================================================***/ + +char * +XkbGeomFPText(int val,unsigned format) +{ +int whole,frac; +char * buf; + + buf= tbGetBuffer(12); + if (format==XkbCFile) { + sprintf(buf,"%d",val); + } + else { + whole= val/XkbGeomPtsPerMM; + frac= val%XkbGeomPtsPerMM; + if (frac!=0) + sprintf(buf,"%d.%d",whole,frac); + else sprintf(buf,"%d",whole); + } + return buf; +} + +char * +XkbDoodadTypeText(unsigned type,unsigned format) +{ +char * buf; + if (format==XkbCFile) { + buf= tbGetBuffer(24); + if (type==XkbOutlineDoodad) strcpy(buf,"XkbOutlineDoodad"); + else if (type==XkbSolidDoodad) strcpy(buf,"XkbSolidDoodad"); + else if (type==XkbTextDoodad) strcpy(buf,"XkbTextDoodad"); + else if (type==XkbIndicatorDoodad) strcpy(buf,"XkbIndicatorDoodad"); + else if (type==XkbLogoDoodad) strcpy(buf,"XkbLogoDoodad"); + else sprintf(buf,"UnknownDoodad%d",type); + } + else { + buf= tbGetBuffer(12); + if (type==XkbOutlineDoodad) strcpy(buf,"outline"); + else if (type==XkbSolidDoodad) strcpy(buf,"solid"); + else if (type==XkbTextDoodad) strcpy(buf,"text"); + else if (type==XkbIndicatorDoodad) strcpy(buf,"indicator"); + else if (type==XkbLogoDoodad) strcpy(buf,"logo"); + else sprintf(buf,"unknown%d",type); + } + return buf; +} + +static char *actionTypeNames[XkbSA_NumActions]= { + "NoAction", + "SetMods", "LatchMods", "LockMods", + "SetGroup", "LatchGroup", "LockGroup", + "MovePtr", + "PtrBtn", "LockPtrBtn", + "SetPtrDflt", + "ISOLock", + "Terminate", "SwitchScreen", + "SetControls", "LockControls", + "ActionMessage", + "RedirectKey", + "DeviceBtn", "LockDeviceBtn" +}; + +char * +XkbActionTypeText(unsigned type,unsigned format) +{ +static char buf[32]; +char *rtrn; + + if (type<=XkbSA_LastAction) { + rtrn= actionTypeNames[type]; + if (format==XkbCFile) { + sprintf(buf,"XkbSA_%s",rtrn); + return buf; + } + return rtrn; + } + sprintf(buf,"Private"); + return buf; +} + +/***====================================================================***/ + +static int +TryCopyStr(char *to,char *from,int *pLeft) +{ +register int len; + if (*pLeft>0) { + len= strlen(from); + if (len<((*pLeft)-3)) { + strcat(to,from); + *pLeft-= len; + return True; + } + } + *pLeft= -1; + return False; +} + +/*ARGSUSED*/ +static Bool +CopyNoActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int*sz) +{ + return True; +} + +static Bool +CopyModActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, + int* sz) +{ +XkbModAction * act; +unsigned tmp; + + act= &action->mods; + tmp= XkbModActionVMods(act); + TryCopyStr(buf,"modifiers=",sz); + if (act->flags&XkbSA_UseModMapMods) + TryCopyStr(buf,"modMapMods",sz); + else if (act->real_mods || tmp) { + TryCopyStr(buf, + XkbVModMaskText(dpy,xkb,act->real_mods,tmp,XkbXKBFile), + sz); + } + else TryCopyStr(buf,"none",sz); + if (act->type==XkbSA_LockMods) + return True; + if (act->flags&XkbSA_ClearLocks) + TryCopyStr(buf,",clearLocks",sz); + if (act->flags&XkbSA_LatchToLock) + TryCopyStr(buf,",latchToLock",sz); + return True; +} + +/*ARGSUSED*/ +static Bool +CopyGroupActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, + int *sz) +{ +XkbGroupAction * act; +char tbuf[32]; + + act= &action->group; + TryCopyStr(buf,"group=",sz); + if (act->flags&XkbSA_GroupAbsolute) + sprintf(tbuf,"%d",XkbSAGroup(act)+1); + else if (XkbSAGroup(act)<0) + sprintf(tbuf,"%d",XkbSAGroup(act)); + else sprintf(tbuf,"+%d",XkbSAGroup(act)); + TryCopyStr(buf,tbuf,sz); + if (act->type==XkbSA_LockGroup) + return True; + if (act->flags&XkbSA_ClearLocks) + TryCopyStr(buf,",clearLocks",sz); + if (act->flags&XkbSA_LatchToLock) + TryCopyStr(buf,",latchToLock",sz); + return True; +} + +/*ARGSUSED*/ +static Bool +CopyMovePtrArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +{ +XkbPtrAction * act; +int x,y; +char tbuf[32]; + + act= &action->ptr; + x= XkbPtrActionX(act); + y= XkbPtrActionY(act); + if ((act->flags&XkbSA_MoveAbsoluteX)||(x<0)) + sprintf(tbuf,"x=%d",x); + else sprintf(tbuf,"x=+%d",x); + TryCopyStr(buf,tbuf,sz); + + if ((act->flags&XkbSA_MoveAbsoluteY)||(y<0)) + sprintf(tbuf,",y=%d",y); + else sprintf(tbuf,",y=+%d",y); + TryCopyStr(buf,tbuf,sz); + if (act->flags&XkbSA_NoAcceleration) + TryCopyStr(buf,",!accel",sz); + return True; +} + +/*ARGSUSED*/ +static Bool +CopyPtrBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +{ +XkbPtrBtnAction * act; +char tbuf[32]; + + act= &action->btn; + TryCopyStr(buf,"button=",sz); + if ((act->button>0)&&(act->button<6)) { + sprintf(tbuf,"%d",act->button); + TryCopyStr(buf,tbuf,sz); + } + else TryCopyStr(buf,"default",sz); + if (act->count>0) { + sprintf(tbuf,",count=%d",act->count); + TryCopyStr(buf,tbuf,sz); + } + if (action->type==XkbSA_LockPtrBtn) { + switch (act->flags&(XkbSA_LockNoUnlock|XkbSA_LockNoLock)) { + case XkbSA_LockNoLock: + sprintf(tbuf,",affect=unlock"); break; + case XkbSA_LockNoUnlock: + sprintf(tbuf,",affect=lock"); break; + case XkbSA_LockNoUnlock|XkbSA_LockNoLock: + sprintf(tbuf,",affect=neither"); break; + default: + sprintf(tbuf,",affect=both"); break; + } + TryCopyStr(buf,tbuf,sz); + } + return True; +} + +/*ARGSUSED*/ +static Bool +CopySetPtrDfltArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, + int *sz) +{ +XkbPtrDfltAction * act; +char tbuf[32]; + + act= &action->dflt; + if (act->affect==XkbSA_AffectDfltBtn) { + TryCopyStr(buf,"affect=button,button=",sz); + if ((act->flags&XkbSA_DfltBtnAbsolute)||(XkbSAPtrDfltValue(act)<0)) + sprintf(tbuf,"%d",XkbSAPtrDfltValue(act)); + else sprintf(tbuf,"+%d",XkbSAPtrDfltValue(act)); + TryCopyStr(buf,tbuf,sz); + } + return True; +} + +static Bool +CopyISOLockArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +{ +XkbISOAction * act; +char tbuf[64]; + + act= &action->iso; + if (act->flags&XkbSA_ISODfltIsGroup) { + TryCopyStr(tbuf,"group=",sz); + if (act->flags&XkbSA_GroupAbsolute) + sprintf(tbuf,"%d",XkbSAGroup(act)+1); + else if (XkbSAGroup(act)<0) + sprintf(tbuf,"%d",XkbSAGroup(act)); + else sprintf(tbuf,"+%d",XkbSAGroup(act)); + TryCopyStr(buf,tbuf,sz); + } + else { + unsigned tmp; + tmp= XkbModActionVMods(act); + TryCopyStr(buf,"modifiers=",sz); + if (act->flags&XkbSA_UseModMapMods) + TryCopyStr(buf,"modMapMods",sz); + else if (act->real_mods || tmp) { + if (act->real_mods) { + TryCopyStr(buf,XkbModMaskText(act->real_mods,XkbXKBFile),sz); + if (tmp) + TryCopyStr(buf,"+",sz); + } + if (tmp) + TryCopyStr(buf,XkbVModMaskText(dpy,xkb,0,tmp,XkbXKBFile),sz); + } + else TryCopyStr(buf,"none",sz); + } + TryCopyStr(buf,",affect=",sz); + if ((act->affect&XkbSA_ISOAffectMask)==0) + TryCopyStr(buf,"all",sz); + else { + int nOut= 0; + if ((act->affect&XkbSA_ISONoAffectMods)==0) { + TryCopyStr(buf,"mods",sz); + nOut++; + } + if ((act->affect&XkbSA_ISONoAffectGroup)==0) { + sprintf(tbuf,"%sgroups",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if ((act->affect&XkbSA_ISONoAffectPtr)==0) { + sprintf(tbuf,"%spointer",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if ((act->affect&XkbSA_ISONoAffectCtrls)==0) { + sprintf(tbuf,"%scontrols",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + } + return True; +} + +/*ARGSUSED*/ +static Bool +CopySwitchScreenArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, + int *sz) +{ +XkbSwitchScreenAction * act; +char tbuf[32]; + + act= &action->screen; + if ((act->flags&XkbSA_SwitchAbsolute)||(XkbSAScreen(act)<0)) + sprintf(tbuf,"screen=%d",XkbSAScreen(act)); + else sprintf(tbuf,"screen=+%d",XkbSAScreen(act)); + TryCopyStr(buf,tbuf,sz); + if (act->flags&XkbSA_SwitchApplication) + TryCopyStr(buf,",!same",sz); + else TryCopyStr(buf,",same",sz); + return True; +} + +/*ARGSUSED*/ +static Bool +CopySetLockControlsArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action, + char *buf,int *sz) +{ +XkbCtrlsAction * act; +unsigned tmp; +char tbuf[32]; + + act= &action->ctrls; + tmp= XkbActionCtrls(act); + TryCopyStr(buf,"controls=",sz); + if (tmp==0) + TryCopyStr(buf,"none",sz); + else if ((tmp&XkbAllBooleanCtrlsMask)==XkbAllBooleanCtrlsMask) + TryCopyStr(buf,"all",sz); + else { + int nOut= 0; + if (tmp&XkbRepeatKeysMask) { + sprintf(tbuf,"%sRepeatKeys",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbSlowKeysMask) { + sprintf(tbuf,"%sSlowKeys",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbBounceKeysMask) { + sprintf(tbuf,"%sBounceKeys",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbStickyKeysMask) { + sprintf(tbuf,"%sStickyKeys",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbMouseKeysMask) { + sprintf(tbuf,"%sMouseKeys",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbMouseKeysAccelMask) { + sprintf(tbuf,"%sMouseKeysAccel",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbAccessXKeysMask) { + sprintf(tbuf,"%sAccessXKeys",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbAccessXTimeoutMask) { + sprintf(tbuf,"%sAccessXTimeout",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbAccessXFeedbackMask) { + sprintf(tbuf,"%sAccessXFeedback",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbAudibleBellMask) { + sprintf(tbuf,"%sAudibleBell",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbOverlay1Mask) { + sprintf(tbuf,"%sOverlay1",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbOverlay2Mask) { + sprintf(tbuf,"%sOverlay2",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + if (tmp&XkbIgnoreGroupLockMask) { + sprintf(tbuf,"%sIgnoreGroupLock",(nOut>0?"+":"")); + TryCopyStr(buf,tbuf,sz); + nOut++; + } + } + return True; +} + +/*ARGSUSED*/ +static Bool +CopyActionMessageArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, + int *sz) +{ +XkbMessageAction * act; +unsigned all; +char tbuf[32]; + + act= &action->msg; + all= XkbSA_MessageOnPress|XkbSA_MessageOnRelease; + TryCopyStr(buf,"report=",sz); + if ((act->flags&all)==0) + TryCopyStr(buf,"none",sz); + else if ((act->flags&all)==all) + TryCopyStr(buf,"all",sz); + else if (act->flags&XkbSA_MessageOnPress) + TryCopyStr(buf,"KeyPress",sz); + else TryCopyStr(buf,"KeyRelease",sz); + sprintf(tbuf,",data[0]=0x%02x",act->message[0]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[1]=0x%02x",act->message[1]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[2]=0x%02x",act->message[2]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[3]=0x%02x",act->message[3]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[4]=0x%02x",act->message[4]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[5]=0x%02x",act->message[5]); TryCopyStr(buf,tbuf,sz); + return True; +} + +static Bool +CopyRedirectKeyArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, + int *sz) +{ +XkbRedirectKeyAction * act; +char tbuf[32],*tmp; +unsigned kc; +unsigned vmods,vmods_mask; + + act= &action->redirect; + kc= act->new_key; + vmods= XkbSARedirectVMods(act); + vmods_mask= XkbSARedirectVModsMask(act); + if (xkb && xkb->names && xkb->names->keys && (kc<=xkb->max_key_code) && + (xkb->names->keys[kc].name[0]!='\0')) { + char *kn; + kn= XkbKeyNameText(xkb->names->keys[kc].name,XkbXKBFile); + sprintf(tbuf,"key=%s",kn); + } + else sprintf(tbuf,"key=%d",kc); + TryCopyStr(buf,tbuf,sz); + if ((act->mods_mask==0)&&(vmods_mask==0)) + return True; + if ((act->mods_mask==XkbAllModifiersMask)&& + (vmods_mask==XkbAllVirtualModsMask)) { + tmp= XkbVModMaskText(dpy,xkb,act->mods,vmods,XkbXKBFile); + TryCopyStr(buf,",mods=",sz); + TryCopyStr(buf,tmp,sz); + } + else { + if ((act->mods_mask&act->mods)||(vmods_mask&vmods)) { + tmp= XkbVModMaskText(dpy,xkb,act->mods_mask&act->mods, + vmods_mask&vmods,XkbXKBFile); + TryCopyStr(buf,",mods= ",sz); + TryCopyStr(buf,tmp,sz); + } + if ((act->mods_mask&(~act->mods))||(vmods_mask&(~vmods))) { + tmp= XkbVModMaskText(dpy,xkb,act->mods_mask&(~act->mods), + vmods_mask&(~vmods),XkbXKBFile); + TryCopyStr(buf,",clearMods= ",sz); + TryCopyStr(buf,tmp,sz); + } + } + return True; +} + +/*ARGSUSED*/ +static Bool +CopyDeviceBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, + int *sz) +{ +XkbDeviceBtnAction * act; +char tbuf[32]; + + act= &action->devbtn; + sprintf(tbuf,"device= %d",act->device); TryCopyStr(buf,tbuf,sz); + TryCopyStr(buf,",button=",sz); + sprintf(tbuf,"%d",act->button); + TryCopyStr(buf,tbuf,sz); + if (act->count>0) { + sprintf(tbuf,",count=%d",act->count); + TryCopyStr(buf,tbuf,sz); + } + if (action->type==XkbSA_LockDeviceBtn) { + switch (act->flags&(XkbSA_LockNoUnlock|XkbSA_LockNoLock)) { + case XkbSA_LockNoLock: + sprintf(tbuf,",affect=unlock"); break; + case XkbSA_LockNoUnlock: + sprintf(tbuf,",affect=lock"); break; + case XkbSA_LockNoUnlock|XkbSA_LockNoLock: + sprintf(tbuf,",affect=neither"); break; + default: + sprintf(tbuf,",affect=both"); break; + } + TryCopyStr(buf,tbuf,sz); + } + return True; +} + +/*ARGSUSED*/ +static Bool +CopyOtherArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +{ +XkbAnyAction * act; +char tbuf[32]; + + act= &action->any; + sprintf(tbuf,"type=0x%02x",act->type); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[0]=0x%02x",act->data[0]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[1]=0x%02x",act->data[1]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[2]=0x%02x",act->data[2]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[3]=0x%02x",act->data[3]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[4]=0x%02x",act->data[4]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[5]=0x%02x",act->data[5]); TryCopyStr(buf,tbuf,sz); + sprintf(tbuf,",data[6]=0x%02x",act->data[6]); TryCopyStr(buf,tbuf,sz); + return True; +} + +typedef Bool (*actionCopy)( + Display * /* dpy */, + XkbDescPtr /* xkb */, + XkbAction * /* action */, + char * /* buf */, + int* /* sz */ +); +static actionCopy copyActionArgs[XkbSA_NumActions] = { + CopyNoActionArgs /* NoAction */, + CopyModActionArgs /* SetMods */, + CopyModActionArgs /* LatchMods */, + CopyModActionArgs /* LockMods */, + CopyGroupActionArgs /* SetGroup */, + CopyGroupActionArgs /* LatchGroup */, + CopyGroupActionArgs /* LockGroup */, + CopyMovePtrArgs /* MovePtr */, + CopyPtrBtnArgs /* PtrBtn */, + CopyPtrBtnArgs /* LockPtrBtn */, + CopySetPtrDfltArgs /* SetPtrDflt */, + CopyISOLockArgs /* ISOLock */, + CopyNoActionArgs /* Terminate */, + CopySwitchScreenArgs /* SwitchScreen */, + CopySetLockControlsArgs /* SetControls */, + CopySetLockControlsArgs /* LockControls */, + CopyActionMessageArgs /* ActionMessage*/, + CopyRedirectKeyArgs /* RedirectKey */, + CopyDeviceBtnArgs /* DeviceBtn */, + CopyDeviceBtnArgs /* LockDeviceBtn*/ +}; + +#define ACTION_SZ 256 + +char * +XkbActionText(Display *dpy,XkbDescPtr xkb,XkbAction *action,unsigned format) +{ +char buf[ACTION_SZ],*tmp; +int sz; + + if (format==XkbCFile) { + sprintf(buf, + "{ %20s, { 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x } }", + XkbActionTypeText(action->type,XkbCFile), + action->any.data[0],action->any.data[1],action->any.data[2], + action->any.data[3],action->any.data[4],action->any.data[5], + action->any.data[6]); + } + else { + sprintf(buf,"%s(",XkbActionTypeText(action->type,XkbXKBFile)); + sz= ACTION_SZ-strlen(buf)+2; /* room for close paren and NULL */ + if (action->type<(unsigned)XkbSA_NumActions) + (*copyActionArgs[action->type])(dpy,xkb,action,buf,&sz); + else CopyOtherArgs(dpy,xkb,action,buf,&sz); + TryCopyStr(buf,")",&sz); + } + tmp= tbGetBuffer(strlen(buf)+1); + if (tmp!=NULL) + strcpy(tmp,buf); + return tmp; +} + +char * +XkbBehaviorText(XkbDescPtr xkb,XkbBehavior *behavior,unsigned format) +{ +char buf[256],*tmp; + + if (format==XkbCFile) { + if (behavior->type==XkbKB_Default) + sprintf(buf,"{ 0, 0 }"); + else sprintf(buf,"{ %3d, 0x%02x }",behavior->type,behavior->data); + } + else { + unsigned type,permanent; + type= behavior->type&XkbKB_OpMask; + permanent=((behavior->type&XkbKB_Permanent)!=0); + + if (type==XkbKB_Lock) { + sprintf(buf,"lock= %s",(permanent?"Permanent":"True")); + } + else if (type==XkbKB_RadioGroup) { + int g; + char *tmp; + g= ((behavior->data)&(~XkbKB_RGAllowNone))+1; + if (XkbKB_RGAllowNone&behavior->data) { + sprintf(buf,"allowNone,"); + tmp= &buf[strlen(buf)]; + } + else tmp= buf; + if (permanent) + sprintf(tmp,"permanentRadioGroup= %d",g); + else sprintf(tmp,"radioGroup= %d",g); + } + else if ((type==XkbKB_Overlay1)||(type==XkbKB_Overlay2)) { + int ndx,kc; + char *kn; + + ndx= ((type==XkbKB_Overlay1)?1:2); + kc= behavior->data; + if ((xkb)&&(xkb->names)&&(xkb->names->keys)) + kn= XkbKeyNameText(xkb->names->keys[kc].name,XkbXKBFile); + else { + static char tbuf[8]; + sprintf(tbuf,"%d",kc); + kn= tbuf; + } + if (permanent) + sprintf(buf,"permanentOverlay%d= %s",ndx,kn); + else sprintf(buf,"overlay%d= %s",ndx,kn); + } + } + tmp= tbGetBuffer(strlen(buf)+1); + if (tmp!=NULL) + strcpy(tmp,buf); + return tmp; +} + +/***====================================================================***/ + +char * +XkbIndentText(unsigned size) +{ +static char buf[32]; +register int i; + + if (size>31) + size= 31; + + for (i=0;i<size;i++) { + buf[i]= ' '; + } + buf[size]= '\0'; + return buf; +} diff --git a/nx-X11/programs/Xserver/xkb/xkmread.c b/nx-X11/programs/Xserver/xkb/xkmread.c index e81835c..4871f3a 100644 --- a/nx-X11/programs/Xserver/xkb/xkmread.c +++ b/nx-X11/programs/Xserver/xkb/xkmread.c @@ -152,89 +152,6 @@ int count,nRead=0; return nRead; } -unsigned -_XkbKSCheckCase(KeySym ks) -{ -unsigned set,rtrn; - - set= (ks & (~0xff)) >> 8; - rtrn= 0; - switch (set) { - case 0: /* latin 1 */ - if (((ks>=XK_A)&&(ks<=XK_Z))|| - ((ks>=XK_Agrave)&&(ks<=XK_THORN)&&(ks!=XK_multiply))) { - rtrn|= _XkbKSUpper; - } - if (((ks>=XK_a)&&(ks<=XK_z))|| - ((ks>=XK_agrave)&&(ks<=XK_ydiaeresis))) { - rtrn|= _XkbKSLower; - } - break; - case 1: /* latin 2 */ - if (((ks>=XK_Aogonek)&&(ks<=XK_Zabovedot)&&(ks!=XK_breve))|| - ((ks>=XK_Racute)&&(ks<=XK_Tcedilla))) { - rtrn|= _XkbKSUpper; - } - if (((ks>=XK_aogonek)&&(ks<=XK_zabovedot)&&(ks!=XK_caron))|| - ((ks>=XK_racute)&&(ks<=XK_tcedilla))) { - rtrn|= _XkbKSLower; - } - break; - case 2: /* latin 3 */ - if (((ks>=XK_Hstroke)&&(ks<=XK_Jcircumflex))|| - ((ks>=XK_Cabovedot)&&(ks<=XK_Scircumflex))) { - rtrn|= _XkbKSUpper; - } - if (((ks>=XK_hstroke)&&(ks<=XK_jcircumflex))|| - ((ks>=XK_cabovedot)&&(ks<=XK_scircumflex))) { - rtrn|= _XkbKSLower; - } - break; - case 3: /* latin 4 */ - if (((ks>=XK_Rcedilla)&&(ks<=XK_Tslash))|| - (ks==XK_ENG)|| - ((ks>=XK_Amacron)&&(ks<=XK_Umacron))) { - rtrn|= _XkbKSUpper; - } - if (((ks>=XK_rcedilla)&&(ks<=XK_tslash))|| - (ks==XK_eng)|| - ((ks>=XK_amacron)&&(ks<=XK_umacron))) { - rtrn|= _XkbKSLower; - } - break; - case 18: /* latin 8 */ - if ((ks==XK_Babovedot)|| - ((ks>=XK_Dabovedot)&&(ks<=XK_Wacute))|| - ((ks>=XK_Ygrave)&&(ks<=XK_Fabovedot))|| - (ks==XK_Mabovedot)|| - (ks==XK_Pabovedot)|| - (ks==XK_Sabovedot)|| - (ks==XK_Wdiaeresis)|| - ((ks>=XK_Wcircumflex)&&(ks<=XK_Ycircumflex))) { - rtrn|= _XkbKSUpper; - } - if ((ks==XK_babovedot)|| - (ks==XK_dabovedot)|| - (ks==XK_fabovedot)|| - (ks==XK_mabovedot)|| - ((ks>=XK_wgrave)&&(ks<=XK_wacute))|| - (ks==XK_ygrave)|| - ((ks>=XK_wdiaeresis)&&(ks<=XK_ycircumflex))) { - rtrn|= _XkbKSLower; - } - break; - case 19: /* latin 9 */ - if ((ks==XK_OE)||(ks==XK_Ydiaeresis)) { - rtrn|= _XkbKSUpper; - } - if (ks==XK_oe) { - rtrn|= _XkbKSLower; - } - break; - } - return rtrn; -} - /***====================================================================***/ static int @@ -1226,10 +1143,14 @@ int nRead; *loaded_rtrn|= XkmGeometryMask; break; default: + _XkbLibError(_XkbErrBadImplementation, + XkbConfigText(tmpTOC.type,XkbMessage),0); nRead= 0; break; } if (nRead!=tmpTOC.size) { + _XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage), + nRead-tmpTOC.size); return 0; } return (nRead>=0); @@ -1264,6 +1185,8 @@ char name[100]; return Xstrdup(name); break; default: + _XkbLibError(_XkbErrBadImplementation, + XkbConfigText(tmpTOC.type,XkbMessage),0); break; } return NULL; @@ -1329,6 +1252,8 @@ unsigned which= need|want; tmp= ReadXkmGeometry(file,result); break; default: + _XkbLibError(_XkbErrBadImplementation, + XkbConfigText(tmpTOC.type,XkbMessage),0); tmp= 0; break; } @@ -1338,7 +1263,8 @@ unsigned which= need|want; result->defined|= (1<<toc[i].type); } if (nRead!=tmpTOC.size) { - return 0; + _XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage), + nRead-tmpTOC.size); } } return which; -- 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 0fc53688698d128ac77a998b87e5b0df3d44c622 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 4 23:16:26 2018 +0200 Keyboard.c: remove unnecessary includes --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 1c6fcaa..647a0a8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -42,15 +42,12 @@ is" without express or implied warranty. #include <string.h> #include <stdlib.h> -#include "X.h" -#include "Xproto.h" #include "keysym.h" #include "screenint.h" #include "inputstr.h" #include "misc.h" #include "scrnintstr.h" #include "servermd.h" -#include "dixstruct.h" #include "extnsionst.h" #include "Agent.h" @@ -67,10 +64,6 @@ is" without express or implied warranty. #ifdef XKB -#include "globals.h" -#include "property.h" -#include "Init.h" - #include <nx-X11/extensions/XKB.h> /* -- 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 bebdf0990dfbc4ea840717e6f4f777637afbf8a4 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 4 23:15:11 2018 +0200 Keyboard.c: Remove (now) unused defines --- 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 c6998e8..1c6fcaa 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -148,12 +148,6 @@ extern Status XkbGetControls( #ifndef XKB_ALTERNATE_BASE_DIRECTORY #define XKB_ALTERNATE_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb" #endif -#ifndef XKB_CONFIG_FILE_NX -#define XKB_CONFIG_FILE_NX "/etc/nxagent/nxagent.keyboard" -#endif -#ifndef XKB_CONFIG_FILE_X2GO -#define XKB_CONFIG_FILE_X2GO "/etc/x2go/x2goagent.keyboard" -#endif #ifndef XKB_DFLT_RULES_FILE #define XKB_DFLT_RULES_FILE "base" #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 eb07ed57bb9afdde7bf0f1e501ce08d5fd3de30e Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jul 5 23:23:11 2018 +0200 Keyboard.c: do not define own RLMVO defaults use the ones from xkb --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 99 ++------------------------- 1 file changed, 5 insertions(+), 94 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index d943ec2..2ffdde1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -135,25 +135,6 @@ extern Status XkbGetControls( #endif ); -#ifndef XKB_DFLT_RULES_FILE -#define XKB_DFLT_RULES_FILE "base" -#endif -#ifndef XKB_ALTS_RULES_FILE -#define XKB_ALTS_RULES_FILE "xorg" -#endif -#ifndef XKB_DFLT_KB_LAYOUT -#define XKB_DFLT_KB_LAYOUT "us" -#endif -#ifndef XKB_DFLT_KB_MODEL -#define XKB_DFLT_KB_MODEL "pc102" -#endif -#ifndef XKB_DFLT_KB_VARIANT -#define XKB_DFLT_KB_VARIANT NULL -#endif -#ifndef XKB_DFLT_KB_OPTIONS -#define XKB_DFLT_KB_OPTIONS NULL -#endif - extern int XkbDfltRepeatDelay; extern int XkbDfltRepeatInterval; @@ -180,8 +161,6 @@ XkbWrapperRec nxagentXkbWrapper; extern char *nxagentKeyboard; -static char *nxagentXkbGetRules(void); - unsigned int nxagentAltMetaMask; unsigned int nxagentAltMask; unsigned int nxagentMetaMask; @@ -481,73 +460,6 @@ static int nxagentRestoreKeyboardDeviceData(DeviceIntPtr devBackup, DeviceIntPtr static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev); -static char *nxagentXkbGetRules() -{ - int ret; - char *path; - struct stat buf; - - #ifdef TEST - fprintf(stderr, "nxagentXkbGetRules: XkbBaseDirectory [%s].\n", - XkbBaseDirectory); - #endif - - if (-1 == asprintf(&path, "%s/rules/%s", XkbBaseDirectory, XKB_DFLT_RULES_FILE)) - { - FatalError("nxagentXkbGetRules: malloc failed."); - } - - #ifdef TEST - fprintf(stderr, "nxagentXkbGetRules: checking rules file [%s]\n", path); - #endif - ret = stat(path, &buf); - - if (ret == 0) - { - free(path); - #ifdef TEST - fprintf(stderr, "nxagentXkbGetRules: returning default rules file [%s]\n", XKB_DFLT_RULES_FILE); - #endif - return XKB_DFLT_RULES_FILE; - } - - #ifdef TEST - fprintf(stderr, "nxagentXkbGetRules: WARNING! Failed to stat file [%s]: %s.\n", path, strerror(ret)); - #endif - - free(path); - path = NULL; - - if (-1 == asprintf(&path, "%s/rules/%s", XkbBaseDirectory, XKB_ALTS_RULES_FILE)) - { - FatalError("nxagentXkbGetRules: malloc failed."); - } - - #ifdef TEST - fprintf(stderr, "nxagentXkbGetRules: checking rules file [%s]\n", path); - #endif - ret = stat(path, &buf); - - if (ret == 0) - { - free(path); - #ifdef TEST - fprintf(stderr, "nxagentXkbGetRules: returning alternative rules file [%s]\n", XKB_ALTS_RULES_FILE); - #endif - return XKB_ALTS_RULES_FILE; - } - - #ifdef WARNING - fprintf(stderr, "nxagentXkbGetRules: WARNING! Failed to stat file [%s]: %s.\n", path, strerror(ret)); - #endif - - free(path); - #ifdef TEST - fprintf(stderr, "nxagentXkbGetRules: returning default rules file [%s]\n", XKB_DFLT_RULES_FILE); - #endif - return XKB_DFLT_RULES_FILE; -} - void nxagentBell(int volume, DeviceIntPtr pDev, void * ctrl, int cls) { XBell(nxagentDisplay, volume); @@ -843,8 +755,7 @@ XkbError: fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL"); #endif - - rules = nxagentXkbGetRules(); + rules = NULL; /* use xkb default */ /* from nxagent changelog: @@ -901,8 +812,8 @@ XkbError: } else { - layout = XKB_DFLT_KB_LAYOUT; - model = XKB_DFLT_KB_MODEL; + layout = NULL; /* use xkb default */ + model = NULL; /* use xkb default */ #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: Using default keyboard: model [%s] layout [%s].\n", @@ -910,8 +821,8 @@ XkbError: #endif } - variants = XKB_DFLT_KB_VARIANT; - options = XKB_DFLT_KB_OPTIONS; + variants = NULL; /* use xkb default */ + options = NULL; /* use xkb default */ #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: Init 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 4ed8145f7be80f162970e25cf960aa7d24b3dafb Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jul 6 23:30:45 2018 +0200 XKB: provide XKB defines via Imakefile --- nx-X11/programs/Xserver/xkb/Imakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/xkb/Imakefile b/nx-X11/programs/Xserver/xkb/Imakefile index 21d631a..93f1854 100644 --- a/nx-X11/programs/Xserver/xkb/Imakefile +++ b/nx-X11/programs/Xserver/xkb/Imakefile @@ -40,7 +40,7 @@ XKB_DDXDEFS = XkbServerDefines LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln DEFINES = $(XKB_DDXDEFS) $(NX_DEFINES) -XKB_DEFINES = -DXKB_BASE_DIRECTORY=\"$(LIBDIR)/xkb\" $(XKB_DISABLE) +XKB_DEFINES = -DXKB_BASE_DIRECTORY=\"/usr/share/X11/xkb\" -DXKB_BIN_DIRECTORY=\"/usr/bin\" -DXKB_DFLT_RULES_FILE=\"base\" -DXKB_DFLT_KB_LAYOUT=\"us\" -DXKB_DFLT_KB_MODEL=\"pc102\" $(XKB_DISABLE) NormalLibraryObjectRule() NormalLibraryTarget(xkb,$(OBJS)) -- 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 3fbef7da756b15640d1bd7828da68b5ddb0ca848 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Jul 7 23:51:27 2018 +0200 Lift xkb to XORG-1.3.0.0 state --- nx-X11/programs/Xserver/xkb/xkbInit.c | 1 + nx-X11/programs/Xserver/xkb/xkbLEDs.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/xkbInit.c b/nx-X11/programs/Xserver/xkb/xkbInit.c index a459065..ab457c7 100644 --- a/nx-X11/programs/Xserver/xkb/xkbInit.c +++ b/nx-X11/programs/Xserver/xkb/xkbInit.c @@ -107,6 +107,7 @@ typedef struct _SrvXkmInfo { char * XkbBaseDirectory= XKB_BASE_DIRECTORY; char * XkbBinDirectory= XKB_BIN_DIRECTORY; + static int XkbWantAccessX= 0; static XkbFileInfo * _XkbInitFileInfo= NULL; diff --git a/nx-X11/programs/Xserver/xkb/xkbLEDs.c b/nx-X11/programs/Xserver/xkb/xkbLEDs.c index 2383bdd..0fccd09 100644 --- a/nx-X11/programs/Xserver/xkb/xkbLEDs.c +++ b/nx-X11/programs/Xserver/xkb/xkbLEDs.c @@ -274,13 +274,13 @@ unsigned oldState; changes->indicators.state_changes|= affected; } - ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXIUnsupported)); + ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXI_KeyboardsMask)); ed->ledClass= sli->class; ed->ledID= sli->id; ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledState= sli->effectiveState; - ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorStateMask; - ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported); + ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorStateMask; + ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask); if (changes!=&my_changes) changes= NULL; if (ed!=&my_ed) ed= NULL; -- 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 11a1f31d70c189bf6c5f4420f196468267755a0d Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jul 5 23:16:30 2018 +0200 no more own XkbBaseDirectory handling Just use the existing xkb code --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 33 --- nx-X11/programs/Xserver/xkb/ddxLoad.c | 329 +------------------------- 2 files changed, 1 insertion(+), 361 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 5abfc70..d943ec2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -481,37 +481,6 @@ static int nxagentRestoreKeyboardDeviceData(DeviceIntPtr devBackup, DeviceIntPtr static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev); -static void nxagentCheckXkbBaseDirectory(void) -{ - - /* - * Set XkbBaseDirectory global - * variable appropriately. - */ - - #ifdef TEST - fprintf(stderr, "nxagentCheckXkbBaseDirectory: " - "Before calling _NXGetXkbBasePath:\n"); - - fprintf(stderr, "nxagentCheckXkbBaseDirectory: " - "XkbBaseDirectory variable [%s].\n", - XkbBaseDirectory); - #endif - - XkbBaseDirectory = _NXGetXkbBasePath(XkbBaseDirectory); - - #ifdef TEST - fprintf(stderr, "nxagentCheckXkbBaseDirectory: " - "After calling _NXGetXkbBasePath:\n"); - - fprintf(stderr, "nxagentCheckXkbBaseDirectory: " - "XkbBaseDirectory variable [%s].\n", - XkbBaseDirectory); - #endif - - return; -} - static char *nxagentXkbGetRules() { int ret; @@ -820,8 +789,6 @@ N/A * variable is checked. */ - nxagentCheckXkbBaseDirectory(); - if (noXkbExtension) { #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: No XKB extension.\n"); diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c index f710af2..fca0cd6 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLoad.c +++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c @@ -178,310 +178,6 @@ Win32System(const char *cmdline) # endif #endif -#ifdef NXAGENT_SERVER - -#define NX_XKB_BASE_DIRECTORY "/usr/lib/X11/xkb" -#define NX_XKB_ALTERNATE_BASE_DIRECTORY "/usr/share/X11/xkb" -#define NX_XKB_RULES_BASE_FILE "rules/base" -#define NX_ALT_XKBCOMP_PATH "/usr/bin" - -static char _NXXkbBasePath[PATH_MAX]; -static char _NXXkbCompPath[PATH_MAX]; - -static int NXVerifyXkbBaseDirectory(const char *dirPath) -{ - int size; - char *rulesBaseFilePath; - struct stat rulesBaseFileStat; - - /* - * If rules/base file - * is not present inside - * the Xkb Base Directory, - * we suppose that the - * path is not valid. - */ - - size = strlen(dirPath) + strlen("/") + - strlen(NX_XKB_RULES_BASE_FILE) + 1; - - if ((rulesBaseFilePath = malloc((size + 1) * sizeof(char))) == NULL) - { - FatalError("NXVerifyXkbBaseDirectory: malloc failed.\n"); - } - - strcpy(rulesBaseFilePath, dirPath); - strcat(rulesBaseFilePath, "/"); - strcat(rulesBaseFilePath, NX_XKB_RULES_BASE_FILE); - - #ifdef TEST - fprintf(stderr, "NXVerifyXkbBaseDirectory: Looking for [%s] file.\n", - rulesBaseFilePath); - #endif - - if (stat(rulesBaseFilePath, &rulesBaseFileStat) != 0) - { - - #ifdef TEST - fprintf(stderr, "NXVerifyXkbBaseDirectory: Xkb Base Directory [%s] is not valid (can't find file [%s]).\n", - dirPath, rulesBaseFilePath); - #endif - - free(rulesBaseFilePath); - - return 0; - } - - #ifdef TEST - fprintf(stderr, "NXVerifyXkbBaseDirectory: Xkb Base Directory [%s] is valid.\n", - dirPath); - #endif - - free(rulesBaseFilePath); - - return 1; -} - -/* - * This function returns the directory - * containing the configuration files. - * This directory is referred by Xkb- - * BaseDirectory variable (generally - * it contains the hardcoded path at - * compile time). If the directory - * does not exist, the function will - * try a set of well known directories. - */ - -char *_NXGetXkbBasePath(const char *path) -{ - /* - * Check the xkb base directory only once. - */ - - if (*_NXXkbBasePath != '\0') - { - return _NXXkbBasePath; - } - - if (NXVerifyXkbBaseDirectory(XkbBaseDirectory) == 1) - { - if (strlen(XkbBaseDirectory) + 1 > PATH_MAX) - { - #ifdef TEST - fprintf(stderr, "_NXGetXkbBasePath: WARNING! Maximum length of xkb base path exceeded.\n"); - #endif - - goto _NXGetXkbBasePathError; - } - - strcpy(_NXXkbBasePath, XkbBaseDirectory); - - #ifdef TEST - fprintf(stderr, "_NXGetXkbBasePath: Using NX xkb base directory path [%s].\n", - _NXXkbBasePath); - #endif - - return _NXXkbBasePath; - } - - if (NXVerifyXkbBaseDirectory(NX_XKB_BASE_DIRECTORY) == 1) - { - if (strlen(NX_XKB_BASE_DIRECTORY) + 1 > PATH_MAX) - { - #ifdef TEST - fprintf(stderr, "_NXGetXkbBasePath: WARNING! Maximum length of xkb base path exceeded.\n"); - #endif - - goto _NXGetXkbBasePathError; - } - - strcpy(_NXXkbBasePath, NX_XKB_BASE_DIRECTORY); - - #ifdef TEST - fprintf(stderr, "_NXGetXkbBasePath: Using NX xkb base directory path [%s].\n", - _NXXkbBasePath); - #endif - - return _NXXkbBasePath; - } - - if (NXVerifyXkbBaseDirectory(NX_XKB_ALTERNATE_BASE_DIRECTORY) == 1) - { - if (strlen(NX_XKB_ALTERNATE_BASE_DIRECTORY) + 1 > PATH_MAX) - { - #ifdef TEST - fprintf(stderr, "_NXGetXkbBasePath: WARNING! Maximum length of xkb base path exceeded.\n"); - #endif - - goto _NXGetXkbBasePathError; - } - - strcpy(_NXXkbBasePath, NX_XKB_ALTERNATE_BASE_DIRECTORY); - - #ifdef TEST - fprintf(stderr, "_NXGetXkbBasePath: Using NX xkb base directory path [%s].\n", - _NXXkbBasePath); - #endif - - return _NXXkbBasePath; - } - -_NXGetXkbBasePathError: - - if (strlen(path) + 1 > PATH_MAX) - { - #ifdef TEST - fprintf(stderr, "_NXGetXkbBasePath: WARNING! Maximum length of xkb base path exceeded.\n"); - #endif - } - - strcpy(_NXXkbBasePath, path); - - #ifdef TEST - fprintf(stderr, "_NXGetXkbBasePath: Using default xkb base path [%s].\n", - _NXXkbBasePath); - #endif - - return _NXXkbBasePath; -} - -static int NXVerifyXkbCompPath(char *path) -{ - char *xkbCompPath; - int xkbCompPathSize; - struct stat xkbCompPathStat; - - if (path == NULL) - { - return 0; - } - - xkbCompPathSize = strlen(path) + strlen("/") + - strlen("xkbcomp") + 1; - - if ((xkbCompPath = malloc((xkbCompPathSize + 1) * sizeof(char))) == NULL) - { - FatalError("NXVerifyXkbCompPath: WARNING! malloc failed.\n"); - - return 0; - } - - strcpy(xkbCompPath, path); - strcat(xkbCompPath, "/"); - strcat(xkbCompPath, "xkbcomp"); - - if (stat(xkbCompPath, &xkbCompPathStat) != 0) - { - #ifdef NX_TRANS_TEST - fprintf(stderr, "NXVerifyXkbCompPath: WARNING! Failed to stat xkbcomp path [%s].\n", - xkbCompPath); - #endif - - free(xkbCompPath); - - return 0; - } - - free(xkbCompPath); - - return 1; -} - -/* - * This function returns the directory - * containing the xkbcomp executable. - * The function will first try to locate - * the executable in the hardcoded path - * (the same path as the "base" xkb one) - * and, if the xkbcomp file couldn't be - * found, the function will not include - * an explicit path and will rely on the - * PATH environment to list the directory. - */ - -char *_NXGetXkbCompPath(const char *path) -{ - - char * xkbCompPath; - - /* - * Check the xkbcomp executable - * directory only once. - */ - - if (*_NXXkbCompPath != '\0') - { - return _NXXkbCompPath; - } - - xkbCompPath = _NXGetXkbBasePath(path); - - if (NXVerifyXkbCompPath(xkbCompPath) == 1) - { - if (strlen(xkbCompPath) + 1 > PATH_MAX) - { - #ifdef TEST - fprintf(stderr, "_NXGetXkbCompPath: WARNING! Maximum length of xkbcomp path exceeded.\n"); - #endif - - goto _NXGetXkbCompPathError; - } - - strcpy(_NXXkbCompPath, xkbCompPath); - - #ifdef TEST - fprintf(stderr, "_NXGetXkbCompPath: Using xkbcomp path [%s].\n", - _NXXkbCompPath); - #endif - - return _NXXkbCompPath; - } - - xkbCompPath = NX_ALT_XKBCOMP_PATH; - - if (NXVerifyXkbCompPath(xkbCompPath) == 1) - { - if (strlen(xkbCompPath) + 1 > PATH_MAX) - { - #ifdef TEST - fprintf(stderr, "_NXGetXkbCompPath: WARNING! Maximum length of xkbcomp path exceeded.\n"); - #endif - - goto _NXGetXkbCompPathError; - } - - strcpy(_NXXkbCompPath, xkbCompPath); - - #ifdef TEST - fprintf(stderr, "_NXGetXkbCompPath: Using NX xkbcomp path [%s].\n", - _NXXkbCompPath); - #endif - - return _NXXkbCompPath; - } - -_NXGetXkbCompPathError: - - if (strlen(path) + 1 > PATH_MAX) - { - #ifdef TEST - fprintf(stderr, "_NXGetXkbCompPath: WARNING! Maximum length of xkbcomp path exceeded.\n"); - #endif - } - - strcpy(_NXXkbCompPath, path); - - #ifdef TEST - fprintf(stderr, "_NXGetXkbCompPath: Using default xkbcomp path [%s].\n", - _NXXkbCompPath); - #endif - - return _NXXkbCompPath; -} - -#endif - static void OutputDirectory( char* outdir, @@ -547,24 +243,11 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; XkbEnsureSafeMapName(outFile); OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir)); -#ifdef NXAGENT_SERVER - - if (_NXGetXkbCompPath(XkbBaseDirectory) != NULL) - { - -#else - if (XkbBaseDirectory!=NULL) { -#endif - -#ifdef NXAGENT_SERVER - char *xkbbasedir = _NXGetXkbBasePath(XkbBaseDirectory); - char *xkbbindir = _NXGetXkbCompPath(XkbBinDirectory); -#else char *xkbbasedir = XkbBaseDirectory; char *xkbbindir = XkbBinDirectory; -#endif + cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", xkbbindir, ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), @@ -642,12 +325,7 @@ char tmpname[PATH_MAX]; (void) mktemp(tmpname); #endif -#ifdef NXAGENT_SERVER - if (_NXGetXkbCompPath(XkbBaseDirectory)!=NULL) { -#else if (XkbBaseDirectory!=NULL) { -#endif - #ifndef WIN32 char *xkmfile = "-"; #else @@ -655,13 +333,8 @@ char tmpname[PATH_MAX]; for xkbcomp. xkbcomp does not read from stdin. */ char *xkmfile = tmpname; #endif -#ifdef NXAGENT_SERVER - char *xkbbasedir = _NXGetXkbBasePath(XkbBaseDirectory); - char *xkbbindir = _NXGetXkbCompPath(XkbBinDirectory); -#else char *xkbbasedir = XkbBaseDirectory; char *xkbbindir = XkbBinDirectory; -#endif buf = Xprintf( "\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm \"%s\" -em1 %s -emp %s -eml %s \"%s%s.xkm\"", -- 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 6186383e70b56ba0782fae3c851779f2f079cbcd Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 16 22:22:10 2018 +0200 Keyboard.c: simplify RLMVO string handling --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 46 ++++++--------------------- 1 file changed, 9 insertions(+), 37 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 103a817..9c0fd02 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -570,7 +570,6 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff) int i, j; XKeyboardState values; char *model = NULL, *layout = NULL; - int free_model = 0, free_layout = 0; XkbDescPtr xkb = NULL; switch (onoff) @@ -726,16 +725,9 @@ XkbError: XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); xkb = NULL; - if (free_model) - { - free_model = 0; - free(model); - } - if (free_layout) - { - free_layout = 0; - free(layout); - } + + free(model); + free(layout); #endif XGetKeyboardControl(nxagentDisplay, &values); @@ -757,7 +749,7 @@ XkbError: #ifdef XKB } else { /* if (noXkbExtension) */ XkbComponentNamesRec names = {0}; - char *rules, *variants, *options; + char *rules = NULL, *variants = NULL, *options = NULL; /* use xkb default */ #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: Using XKB extension.\n"); @@ -767,8 +759,6 @@ XkbError: fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL"); #endif - rules = NULL; /* use xkb default */ - /* from nxagent changelog: 2.0.22: @@ -791,11 +781,8 @@ XkbError: goto XkbError; } - free_model = 1; - model = strndup(nxagentKeyboard, i); - - free_layout = 1; - layout = strdup(&nxagentKeyboard[i + 1]); + model = strndup(nxagentKeyboard, i); + layout = strdup(&nxagentKeyboard[i + 1]); /* * There is no description for pc105 on Solaris. @@ -824,18 +811,12 @@ XkbError: } else { - layout = NULL; /* use xkb default */ - model = NULL; /* use xkb default */ - #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: Using default keyboard: model [%s] layout [%s].\n", model, layout); #endif } - variants = NULL; /* use xkb default */ - options = NULL; /* use xkb default */ - #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: Init XKB extension.\n"); #endif @@ -900,20 +881,11 @@ XkbEnd: NXShadowInitKeymap(&(pDev->key->curKeySyms)); } - if (free_model) - { - free_model = 0; - free(model); - } - - if (free_layout) - { - free_layout = 0; - free(layout); - } - XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); xkb = NULL; + + free(model); + free(layout); } #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 1b05251a02f2fbac09fb267f0c7fcb411c7e0105 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Nov 1 14:46:54 2018 +0100 Keyboard.c: simplify over-specific if --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 9c0fd02..65c4d20 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -869,8 +869,7 @@ XkbError: XkbInitKeyboardDeviceStruct((void *)pDev, &names, &keySyms, modmap, nxagentBell, nxagentChangeKeyboardControl); - if (!nxagentKeyboard || - (nxagentKeyboard && (strcmp(nxagentKeyboard, "query") == 0))) + if (!nxagentKeyboard || strcmp(nxagentKeyboard, "query") == 0) { goto XkbError; } -- 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 b891e5f6859298c3482067752c9e4b2fd19ed617 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 16 22:07:26 2018 +0200 Keyboard.c: always ask for remote XKB --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 2ffdde1..103a817 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -693,6 +693,18 @@ N/A keySyms.mapWidth = mapWidth; keySyms.map = keymap; + if (XkbQueryExtension(nxagentDisplay, + &nxagentXkbInfo.Opcode, + &nxagentXkbInfo.EventBase, + &nxagentXkbInfo.ErrorBase, + &nxagentXkbInfo.MajorVersion, + &nxagentXkbInfo.MinorVersion) == 0) + { + ErrorF("Unable to initialize XKEYBOARD extension.\n"); + goto XkbError; + } + + #ifdef XKB /* @@ -828,18 +840,6 @@ XkbError: fprintf(stderr, "nxagentKeyboardProc: Init XKB extension.\n"); #endif - if (XkbQueryExtension(nxagentDisplay, - &nxagentXkbInfo.Opcode, - &nxagentXkbInfo.EventBase, - &nxagentXkbInfo.ErrorBase, - &nxagentXkbInfo.MajorVersion, - &nxagentXkbInfo.MinorVersion) == 0) - { - ErrorF("Unable to initialize XKEYBOARD extension.\n"); - - goto XkbError; - } - xkb = XkbGetKeyboard(nxagentDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); nxagentKeycodeConversionSetup(); -- 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 d8bbbcf29c3c0e43ce28d76e52e6a8ad9deeb90f Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 16 22:23:05 2018 +0200 Keyboard.c: guard XkbFreeKeyboard calls manpage does not tell us if NULL is valid --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 65c4d20..84121c1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -723,8 +723,11 @@ XkbError: fprintf(stderr, "nxagentKeyboardProc: XKB error.\n"); #endif - XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); - xkb = NULL; + if (xkb) + { + XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); + xkb = NULL; + } free(model); free(layout); @@ -874,14 +877,16 @@ XkbError: goto XkbError; } -XkbEnd: if (nxagentOption(Shadow) == 1 && pDev && pDev->key) { NXShadowInitKeymap(&(pDev->key->curKeySyms)); } - XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); - xkb = NULL; + if (xkb) + { + XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); + xkb = NULL; + } free(model); free(layout); -- 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 05e03b965855e13557745d25eabe63698cb61bc1 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 16 22:23:56 2018 +0200 Keyboard.c: greatly simplify the code in nxagentKeyboardProc most of the code was existing twice --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 44 ++++++++------------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 84121c1..ff23ba2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -828,39 +828,16 @@ XkbError: nxagentKeycodeConversionSetup(); - if (xkb == NULL || xkb->geom == NULL) + if (xkb && xkb->geom) { - #ifdef TEST - fprintf(stderr, "nxagentKeyboardProc: No current keyboard.\n"); - if (xkb == NULL) - { - fprintf(stderr, "nxagentKeyboardProc: xkb is null.\n"); - } - else - { - fprintf(stderr, "nxagentKeyboardProc: xkb->geom is null.\n"); - } - fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device.\n"); - #endif - #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); - #endif - - XkbSetRulesDflts(rules, model, layout, variants, options); - XkbInitKeyboardDeviceStruct((void *)pDev, &names, &keySyms, modmap, - nxagentBell, nxagentChangeKeyboardControl); - - if (!nxagentKeyboard || strcmp(nxagentKeyboard, "query") == 0) - { - goto XkbError; - } - - goto XkbEnd; + XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb); } - - XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb); +#ifdef TEST + else + { + fprintf(stderr, "nxagentKeyboardProc: No current keyboard.\n"); + } +#endif #ifdef DEBUG fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device: " @@ -877,6 +854,11 @@ XkbError: goto XkbError; } + if (xkb && xkb->geom) + { + XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls); + } + if (nxagentOption(Shadow) == 1 && pDev && pDev->key) { NXShadowInitKeymap(&(pDev->key->curKeySyms)); -- 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 b8ae794e47cf2e23f7391856865d4e06c7a61fd1 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 18 19:14:40 2018 +0200 Keyboard.c: fix keyboard=query logic an empty nxagentKeyboard variable is no reason to fall back to no-XKB mode --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index ff23ba2..eea09a4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -849,7 +849,7 @@ XkbError: XkbInitKeyboardDeviceStruct((void *)pDev, &names, &keySyms, modmap, nxagentBell, nxagentChangeKeyboardControl); - if (!nxagentKeyboard || strcmp(nxagentKeyboard, "query") == 0) + if (nxagentKeyboard && strcmp(nxagentKeyboard, "query") == 0) { goto XkbError; } -- 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 018b2d0c63505960ba82b4ca1fac7852ee3d5115 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 18 23:09:32 2018 +0200 XkbSendNames: fix use of uninitialised bytes valgrind error. Backported-to-nx-by: Ulrich Sibiller <uli42@gmx.de> commit 8a34d7a8532c7ca013e67307f3baf200167abb92 Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Date: Tue Feb 8 11:10:11 2011 +0200 XkbSendNames: fix use of uninitialised bytes valgrind error. ==537== Syscall param writev(vector[...]) points to uninitialised byte(s) ==537== at 0x4AB7154: writev (writev.c:51) ==537== by 0x8935B: _XSERVTransWritev (Xtrans.c:912) ==537== by 0x6C55F: FlushClient (io.c:924) ==537== by 0x6CCF3: WriteToClient (io.c:846) ==537== by 0xD51D3: XkbSendNames (xkb.c:3765) ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) ==537== by 0x27B7B: Dispatch (dispatch.c:432) ==537== by 0x205B7: main (main.c:291) ==537== Address 0x55899f2 is 154 bytes inside a block of size 1,896 alloc'd ==537== at 0x4834C48: malloc (vg_replace_malloc.c:236) ==537== by 0xD47AF: XkbSendNames (xkb.c:3642) ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) ==537== by 0x27B7B: Dispatch (dispatch.c:432) ==537== by 0x205B7: main (main.c:291) ==537== Uninitialised value was created by a heap allocation ==537== at 0x4834C48: malloc (vg_replace_malloc.c:236) ==537== by 0xD47AF: XkbSendNames (xkb.c:3642) ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) ==537== by 0x27B7B: Dispatch (dispatch.c:432) ==537== by 0x205B7: main (main.c:291) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> --- nx-X11/programs/Xserver/xkb/xkb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index 3de41c0..f601f04 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -3203,7 +3203,7 @@ char * desc; swapl(&rep->indicators); } - start = desc = (char *)malloc(length); + start = desc = (char *)calloc(1, length); if ( !start ) return BadAlloc; if (xkb->names) { -- 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 59524cd062f87874f11d566a32836a97e8426382 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 18 22:16:48 2018 +0200 Keyboard.c: simplify even more: free stuff at one place --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index eea09a4..c2c36ad 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -723,14 +723,6 @@ XkbError: fprintf(stderr, "nxagentKeyboardProc: XKB error.\n"); #endif - if (xkb) - { - XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); - xkb = NULL; - } - - free(model); - free(layout); #endif XGetKeyboardControl(nxagentDisplay, &values); @@ -863,16 +855,16 @@ XkbError: { NXShadowInitKeymap(&(pDev->key->curKeySyms)); } + } - if (xkb) - { - XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); - xkb = NULL; - } - - free(model); - free(layout); + if (xkb) + { + XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); + xkb = NULL; } + + free(model); + free(layout); #endif #ifdef WATCH -- 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 7487d7fa2dbc69fe39f81dd5b3e9a1a32ee7a2e0 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 18 23:50:28 2018 +0200 XKB: Fix logic error commit 6aef4e96affcc26b9415c6bc9c9bebb5af05a1a7 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 17 13:42:46 2009 +0200 XKB: Fix logic error Use logical or instead of bitwise or. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-nx-by: Ulrich Sibiller <uli42@gmx.de> --- nx-X11/programs/Xserver/xkb/xkbAccessX.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/xkb/xkbAccessX.c b/nx-X11/programs/Xserver/xkb/xkbAccessX.c index cfd4233..dd07713 100644 --- a/nx-X11/programs/Xserver/xkb/xkbAccessX.c +++ b/nx-X11/programs/Xserver/xkb/xkbAccessX.c @@ -607,7 +607,7 @@ Bool ignoreKeyEvent = FALSE; ev.keycode= key; ev.slowKeysDelay= ctrls->slow_keys_delay; ev.debounceDelay= ctrls->debounce_delay; - if (BitIsOn(keybd->key->down,key) | (xkbi->mouseKey == key)) { + if (BitIsOn(keybd->key->down,key) || (xkbi->mouseKey == key)) { ev.detail= XkbAXN_SKRelease; beep_type= _BEEP_SLOW_RELEASE; } -- 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 6625e78c1292f2dc03329e55bbc33537cc8ee569 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 18 23:26:10 2018 +0200 XKB: Fix garbage initialization commit 8311cd5f89ca6781842bb24671b8122cdf8be148 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Mar 23 10:37:36 2010 -0700 XKB: Fix garbage initialization XkbEnableDisableControls set extra garbage bits on the xkbControlsNotify changedControls mask because it was uninitialized on the stack. Found by clang Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-nx-by: Ulrich Sibiller <uli42@gmx.de> --- nx-X11/programs/Xserver/xkb/xkbUtils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c index c97a54b..028f324 100644 --- a/nx-X11/programs/Xserver/xkb/xkbUtils.c +++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c @@ -763,7 +763,7 @@ XkbSrvLedInfoPtr sli; if (cause!=NULL) { xkbControlsNotify cn; cn.numGroups= ctrls->num_groups; - cn.changedControls|= XkbControlsEnabledMask; + cn.changedControls= XkbControlsEnabledMask; cn.enabledControls= ctrls->enabled_ctrls; cn.enabledControlChanges= (ctrls->enabled_ctrls^old); cn.keycode= cause->kc; -- 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 69475953b37d23c77f977833f12cc696c955cd5f Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 18 23:15:07 2018 +0200 ProcXkbGetKbdByName: fix use of uninitialised bytes valgrind error. We have fixed that (independendly) before, but missed one line. Backported-to-nx-by: Ulrich Sibiller <uli42@gmx.de> commit 85f9017393c9bb19553e9afcf554673a44a09993 Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Date: Tue Feb 8 11:10:10 2011 +0200 ProcXkbGetXkbByName: fix use of uninitialised bytes valgrind error. ==9999== Syscall param writev(vector[...]) points to uninitialised byte(s) ==9999== at 0x4AB5154: writev (writev.c:51) ==9999== by 0x7C7C3: _XSERVTransWritev (Xtrans.c:912) ==9999== by 0x61C8B: FlushClient (io.c:924) ==9999== by 0x62423: WriteToClient (io.c:846) ==9999== by 0xCE39B: XkbSendMap (xkb.c:1408) ==9999== by 0xD247B: ProcXkbGetKbdByName (xkb.c:5814) ==9999== by 0x4AB53: Dispatch (dispatch.c:432) ==9999== by 0x205BF: main (main.c:291) ==9999== Address 0x557eb68 is 40 bytes inside a block of size 4,096 alloc'd ==9999== at 0x48334A4: calloc (vg_replace_malloc.c:467) ==9999== by 0x62567: WriteToClient (io.c:1065) ==9999== by 0x452EB: ProcEstablishConnection (dispatch.c:3685) ==9999== by 0x4AB53: Dispatch (dispatch.c:432) ==9999== by 0x205BF: main (main.c:291) ==9999== Uninitialised value was created by a stack allocation ==9999== at 0xD1910: ProcXkbGetKbdByName (xkb.c:5559) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> --- nx-X11/programs/Xserver/xkb/xkb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index f601f04..e11d7e2 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -5018,7 +5018,7 @@ ProcXkbGetKbdByName(ClientPtr client) xkbGetIndicatorMapReply irep = {0}; xkbGetNamesReply nrep = {0}; xkbGetGeometryReply grep = {0}; - XkbComponentNamesRec names; + XkbComponentNamesRec names = {0}; XkbDescPtr xkb; unsigned char * str; char mapFile[PATH_MAX]; -- 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 824b629732ed90e6040790eb07fe8271d5fb8fb3 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 25 22:39:17 2018 +0200 XKB: Fix size_syms calculation bug Backported from Xorg: commit f292de2ef13dc994a38029cee9e2642576893332 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 21 02:04:12 2007 +0200 XKB: Fix size_syms calculation bug Apparently it needed to be nSyms*15/10, not *12/10; make it match the other allocation code. Backported-to-nx-by: Ulrich Sibiller <uli42@gmx.de> --- nx-X11/programs/Xserver/xkb/XKBMAlloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/xkb/XKBMAlloc.c b/nx-X11/programs/Xserver/xkb/XKBMAlloc.c index 100e827..178d415 100644 --- a/nx-X11/programs/Xserver/xkb/XKBMAlloc.c +++ b/nx-X11/programs/Xserver/xkb/XKBMAlloc.c @@ -396,7 +396,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; } if (nResize>0) { int nextMatch; - xkb->map->size_syms= (nTotal*12)/10; + xkb->map->size_syms= (nTotal*15)/10; newSyms = _XkbTypedCalloc(xkb->map->size_syms,KeySym); if (newSyms==NULL) return BadAlloc; -- 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 3c1b1efad2ca42154789f09e2519630c5471ed41 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 18 23:54:46 2018 +0200 XKB: Remove unused DDX functions commit 7c4c00649cae855e141ec9a3667bfe399e3156d0 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jan 1 05:25:52 2009 +1100 XKB: Remove unused DDX functions They were complete no-ops anyway. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-nx-by: Ulrich Sibiller <uli42@gmx.de> --- nx-X11/programs/Xserver/xkb/Imakefile | 8 ++--- nx-X11/programs/Xserver/xkb/ddxInit.c | 45 ---------------------------- nx-X11/programs/Xserver/xkb/ddxKeyClick.c | 49 ------------------------------- nx-X11/programs/Xserver/xkb/xkbAccessX.c | 4 +-- nx-X11/programs/Xserver/xkb/xkbInit.c | 2 -- 5 files changed, 5 insertions(+), 103 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/Imakefile b/nx-X11/programs/Xserver/xkb/Imakefile index 93f1854..c73e4ef 100644 --- a/nx-X11/programs/Xserver/xkb/Imakefile +++ b/nx-X11/programs/Xserver/xkb/Imakefile @@ -18,11 +18,11 @@ XKB_DDXDEFS = XkbServerDefines NX_DEFINES = -DNXAGENT_SERVER #endif - DDX_SRCS = ddxBeep.c ddxCtrls.c ddxFakeBtn.c ddxFakeMtn.c ddxInit.c \ - ddxKeyClick.c ddxKillSrv.c ddxLEDs.c ddxVT.c ddxLoad.c \ + DDX_SRCS = ddxBeep.c ddxCtrls.c ddxFakeBtn.c ddxFakeMtn.c \ + ddxKillSrv.c ddxLEDs.c ddxVT.c ddxLoad.c \ ddxList.c ddxDevBtn.c ddxPrivate.c - DDX_OBJS = ddxBeep.o ddxCtrls.o ddxFakeBtn.o ddxFakeMtn.o ddxInit.o \ - ddxKeyClick.o ddxKillSrv.o ddxLEDs.o ddxVT.o ddxLoad.o \ + DDX_OBJS = ddxBeep.o ddxCtrls.o ddxFakeBtn.o ddxFakeMtn.o \ + ddxKillSrv.o ddxLEDs.o ddxVT.o ddxLoad.o \ ddxList.o ddxDevBtn.o ddxPrivate.o SRCS = xkb.c xkbUtils.c xkbEvents.c xkbAccessX.c xkbSwap.c \ xkbLEDs.c xkbInit.c xkbActions.c xkbPrKeyEv.c \ diff --git a/nx-X11/programs/Xserver/xkb/ddxInit.c b/nx-X11/programs/Xserver/xkb/ddxInit.c deleted file mode 100644 index 18e5e6a..0000000 --- a/nx-X11/programs/Xserver/xkb/ddxInit.c +++ /dev/null @@ -1,45 +0,0 @@ -/************************************************************ -Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting -documentation, and that the name of Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. - -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#include <stdio.h> -#include <nx-X11/X.h> -#include <nx-X11/Xproto.h> -#include <nx-X11/keysym.h> -#include "inputstr.h" -#include "scrnintstr.h" -#include "windowstr.h" -#include <xkbsrv.h> -#include <nx-X11/extensions/XI.h> - -int -XkbDDXInitDevice(DeviceIntPtr dev) -{ - return 1; -} diff --git a/nx-X11/programs/Xserver/xkb/ddxKeyClick.c b/nx-X11/programs/Xserver/xkb/ddxKeyClick.c deleted file mode 100644 index ddc34b0..0000000 --- a/nx-X11/programs/Xserver/xkb/ddxKeyClick.c +++ /dev/null @@ -1,49 +0,0 @@ -/************************************************************ -Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting -documentation, and that the name of Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. - -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#include <stdio.h> -#include <nx-X11/X.h> -#include <nx-X11/Xproto.h> -#include <nx-X11/keysym.h> -#include "inputstr.h" -#include "scrnintstr.h" -#include "windowstr.h" -#include <xkbsrv.h> -#include <nx-X11/extensions/XI.h> - -void -XkbDDXKeyClick(DeviceIntPtr pXDev,int keycode,int synthetic) -{ -#ifdef DEBUG - if (xkbDebugFlags) - ErrorF("Click.\n"); -#endif - return; -} diff --git a/nx-X11/programs/Xserver/xkb/xkbAccessX.c b/nx-X11/programs/Xserver/xkb/xkbAccessX.c index dd07713..5d9917d 100644 --- a/nx-X11/programs/Xserver/xkb/xkbAccessX.c +++ b/nx-X11/programs/Xserver/xkb/xkbAccessX.c @@ -132,9 +132,7 @@ xEvent xE; } #endif - if (_XkbIsPressEvent(type)) - XkbDDXKeyClick(keybd,keyCode,TRUE); - else if (isRepeat) + if (!_XkbIsPressEvent(type) && isRepeat) XkbLastRepeatEvent= (void *)&xE; XkbProcessKeyboardEvent(&xE,keybd,1L); XkbLastRepeatEvent= NULL; diff --git a/nx-X11/programs/Xserver/xkb/xkbInit.c b/nx-X11/programs/Xserver/xkb/xkbInit.c index ab457c7..2f7fa47 100644 --- a/nx-X11/programs/Xserver/xkb/xkbInit.c +++ b/nx-X11/programs/Xserver/xkb/xkbInit.c @@ -543,8 +543,6 @@ XkbEventCauseRec cause; XkbInitIndicatorMap(xkbi,&file); - XkbDDXInitDevice(pXDev); - if (!(file.xkbinfo.defined&XkmSymbolsMask)) { XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb), &changes); -- 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 1ca0aee93d5ab4f4e95f78a1935c7763931f0182 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jul 25 22:27:47 2018 +0200 Event.c: improve DEBUG output --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 4c85145..5281b4b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2891,9 +2891,21 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X) XFixesSelectionEvent *xfixesEvent = (XFixesSelectionEvent *) X; - if (nxagentXFixesInfo.Initialized == 0 || - xfixesEvent -> type != (nxagentXFixesInfo.EventBase + XFixesSelectionNotify)) - return 0; + if (nxagentXFixesInfo.Initialized == 0) + { + #ifdef DEBUG + fprintf(stderr, "nxagentHandleXFixesSelectionNotify: XFixes not initialized - doing nothing.\n"); + #endif + return 0; + } + + if (xfixesEvent -> type != (nxagentXFixesInfo.EventBase + XFixesSelectionNotify)) + { + #ifdef DEBUG + fprintf(stderr, "nxagentHandleXFixesSelectionNotify: event type is [%d] - doing nothing.\n", xfixesEvent->type); + #endif + return 0; + } #ifdef TEST fprintf(stderr, "nxagentHandleXFixesSelectionNotify: Handling event.\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 f23189e7392254c9458bf76504920cb868360e40 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Oct 25 00:46:12 2018 +0200 Make: Automatically determine xkb dir --- Makefile | 17 +++++++++++++---- debian/control | 1 + nx-X11/config/cf/Imake.tmpl | 8 ++++++++ nx-X11/programs/Xserver/xkb/Imakefile | 2 +- nx-libs.spec | 2 ++ 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 38a13c8..fc094f7 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,15 @@ IMAKE_FONT_DEFINES ?= $(shell pkg-config --modversion xfont2 1>/dev/null 2>/dev/ # Support older libXext versions. XEXT_EXTRA_DEFINES ?= $(shell pkg-config --exists 'xextproto < 7.1.0' 1>/dev/null 2>/dev/null && echo "-DLEGACY_XEXT_PROTO") +# check if the xkbcomp devel pkg is available - we need it for the next step +ifneq ($(shell pkg-config --exists xkbcomp && echo yes), yes) + $(error required xkbcomp devel package missing) +endif + +# the system's directory with the xkb data files (this needs to be +# independent of Imake's ProjectRoot or the configure prefix.) +XKB_SYS_DEFINES ?= -DSystemXkbConfigDir=$(shell pkg-config xkbcomp --variable=xkbconfigdir) -DSystemXkbBinDir=$(shell pkg-config xkbcomp --variable=prefix)/bin + IMAKE_DEFINES ?= NX_VERSION_MAJOR=$(shell ./version.sh 1) @@ -100,7 +109,7 @@ version: build-env: version # prepare Makefiles and the nx-X11 symlinking magic - ${MAKE} -j1 -C nx-X11 BuildIncludes FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES)" + ${MAKE} -j1 -C nx-X11 BuildIncludes FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES) $(XKB_SYS_DEFINES)" # set up environment for libNX_X11 build (X11 header files) mkdir -p nx-X11/exports/include/nx-X11/ @@ -125,7 +134,7 @@ clean-env: version [ -d exports/include/nx-X11/Xtrans ] && $(RM_DIR) exports/include/nx-X11/Xtrans/ || : [ -d exports/include/nx-X11/ ] && $(RM_DIR) exports/include/nx-X11/ || : - ${MAKE} -j1 -C nx-X11 clean FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES)" + ${MAKE} -j1 -C nx-X11 clean FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES) $(XKB_SYS_DEFINES)" build-lite: cd nxcomp && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE} @@ -149,8 +158,8 @@ build-full: build-env # build nxagent fourth ./mesa-quilt push -a - ${MAKE} -j1 -C nx-X11 BuildDependsOnly FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES)" - ${MAKE} -C nx-X11 World USRLIBDIR="$(USRLIBDIR)" SHLIBDIR="$(SHLIBDIR)" FONT_DEFINES="$(FONT_DEFINES)" XFONTLIB="$(XFONTLIB)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES)" + ${MAKE} -j1 -C nx-X11 BuildDependsOnly FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES) $(XKB_SYS_DEFINES)" + ${MAKE} -C nx-X11 World USRLIBDIR="$(USRLIBDIR)" SHLIBDIR="$(SHLIBDIR)" FONT_DEFINES="$(FONT_DEFINES)" XFONTLIB="$(XFONTLIB)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES) $(XKB_SYS_DEFINES)" # build nxproxy fifth cd nxproxy && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE} diff --git a/debian/control b/debian/control index aa41ba9..6d36078 100644 --- a/debian/control +++ b/debian/control @@ -27,6 +27,7 @@ Build-Depends: libxtst-dev, pkg-config, quilt (>= 0.46-7~), + x11-xkb-utils, x11proto-core-dev, xutils-dev, zlib1g-dev, diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl index e202dab..ddd587e 100644 --- a/nx-X11/config/cf/Imake.tmpl +++ b/nx-X11/config/cf/Imake.tmpl @@ -784,6 +784,12 @@ TCLIBDIR = TclLibDir #ifndef SystemUsrIncDir #define SystemUsrIncDir /usr/include #endif +#ifndef SystemXkbConfigDir +#define SystemXkbConfigDir /usr/share/X11/xkb +#endif +#ifndef SystemXkbBinDir +#define SystemXkbBinDir /usr/bin +#endif #ifndef ShLibDir #define ShLibDir UsrLibDir @@ -1660,6 +1666,8 @@ TCLIBDIR = TclLibDir VARLIBDIR = VarLibDir /* xdm runtime files */ SYSTEMUSRLIBDIR = SystemUsrLibDir /* system's "/usr/lib" */ SYSTEMUSRINCDIR = SystemUsrIncDir /* system's "/usr/include" */ + SYSTEMXKBCONFDIR = SystemXkbConfigDir /* system's "/usr/share/xkb" */ + SYSTEMXKBBINDIR = SystemXkbBinDir /* system's "/usr/bin" */ SHLIBDIR = ShLibDir /* shared libraries */ LINTLIBDIR = LintlibDir /* lint libraries */ MANPATH = ManPath /* top of manual page tree */ diff --git a/nx-X11/programs/Xserver/xkb/Imakefile b/nx-X11/programs/Xserver/xkb/Imakefile index c73e4ef..3725b25 100644 --- a/nx-X11/programs/Xserver/xkb/Imakefile +++ b/nx-X11/programs/Xserver/xkb/Imakefile @@ -40,7 +40,7 @@ XKB_DDXDEFS = XkbServerDefines LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln DEFINES = $(XKB_DDXDEFS) $(NX_DEFINES) -XKB_DEFINES = -DXKB_BASE_DIRECTORY=\"/usr/share/X11/xkb\" -DXKB_BIN_DIRECTORY=\"/usr/bin\" -DXKB_DFLT_RULES_FILE=\"base\" -DXKB_DFLT_KB_LAYOUT=\"us\" -DXKB_DFLT_KB_MODEL=\"pc102\" $(XKB_DISABLE) +XKB_DEFINES = -DXKB_BASE_DIRECTORY=\"$(SYSTEMXKBCONFDIR)\" -DXKB_BIN_DIRECTORY=\"$(SYSTEMXKBBINDIR)\" -DXKB_DFLT_RULES_FILE=\"base\" -DXKB_DFLT_KB_LAYOUT=\"us\" -DXKB_DFLT_KB_MODEL=\"pc102\" $(XKB_DISABLE) NormalLibraryObjectRule() NormalLibraryTarget(xkb,$(OBJS)) diff --git a/nx-libs.spec b/nx-libs.spec index b268f12..396ff23 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -32,6 +32,8 @@ BuildRequires: pkgconfig %if 0%{?suse_version} && 0%{?suse_version} < 1210 BuildRequires: xorg-x11-util-devel %else +# we need xkbcomp.pc +BuildRequires: xorg-x11-xkb-utils-devel BuildRequires: imake %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 b01e29efffafe9f426eb88ba400e2fa24de548aa Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Oct 29 23:39:03 2018 +0100 xkb: Don't check for NULL before calling free Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jul 22 11:34:54 2010 +0300 xkb: Don't check for NULL before calling free Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de> --- nx-X11/programs/Xserver/xkb/ddxList.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c index e751b6b..5466cff 100644 --- a/nx-X11/programs/Xserver/xkb/ddxList.c +++ b/nx-X11/programs/Xserver/xkb/ddxList.c @@ -209,8 +209,7 @@ char tmpname[PATH_MAX]; } if (!in) { - if (buf != NULL) - free (buf); + free (buf); #ifdef WIN32 unlink(tmpname); #endif @@ -276,8 +275,7 @@ char tmpname[PATH_MAX]; fclose(in); unlink(tmpname); #endif - if (buf != NULL) - free (buf); + free (buf); return status; } -- 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 90b83a79e6aed4e54ac29d022adf16be6869f054 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Oct 29 23:34:10 2018 +0100 xkb: Fix memory leak if opening file fails Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jul 22 11:33:33 2010 +0300 xkb: Fix memory leak if opening file fails If fopen fails pointer in buf would be overwriten with a new pointer. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de> --- nx-X11/programs/Xserver/xkb/ddxList.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c index e48e28d..e751b6b 100644 --- a/nx-X11/programs/Xserver/xkb/ddxList.c +++ b/nx-X11/programs/Xserver/xkb/ddxList.c @@ -167,6 +167,7 @@ char tmpname[PATH_MAX]; } if (!in) { haveDir= False; + free(buf); buf = Xprintf( "'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg, XkbBinDirectory,XkbBaseDirectory,componentDirs[what],(long) @@ -182,6 +183,7 @@ char tmpname[PATH_MAX]; } if (!in) { haveDir= False; + free(buf); buf = Xprintf( "xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg, componentDirs[what],(long) -- 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 b09a72b08c7effeac42652f087f0b8f16bc74763 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Oct 30 00:00:45 2018 +0100 Convert existing Xprintf style calls to asprintf style This commit + some more adaption in ddxLoad.c which where no longer present when Alan did the patch. However, our code still has them: Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 20:09:04 2010 -0800 Convert existing Xprintf style calls to asprintf style Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de> --- nx-X11/programs/Xserver/xkb/ddxList.c | 36 +++++++++++++++++++++++------------ nx-X11/programs/Xserver/xkb/ddxLoad.c | 22 ++++++++++++--------- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c index 5466cff..cc95c86 100644 --- a/nx-X11/programs/Xserver/xkb/ddxList.c +++ b/nx-X11/programs/Xserver/xkb/ddxList.c @@ -162,34 +162,46 @@ char tmpname[PATH_MAX]; #endif if (XkbBaseDirectory!=NULL) { if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) { - buf = Xprintf("%s/%s.dir",XkbBaseDirectory,componentDirs[what]); - in= fopen(buf,"r"); + if (asprintf(&buf, "%s/%s.dir", XkbBaseDirectory, + componentDirs[what]) == -1) + buf = NULL; + else + in = fopen(buf,"r"); } if (!in) { haveDir= False; free(buf); - buf = Xprintf( + if (asprintf + (&buf, "'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg, - XkbBinDirectory,XkbBaseDirectory,componentDirs[what],(long) - ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:xkbDebugFlags)), + XkbBinDirectory, XkbBaseDirectory, componentDirs[what], + (long) ((xkbDebugFlags < 2) ? 1 : + ((xkbDebugFlags > 10) ? 10 : xkbDebugFlags)), file W32_tmpfile - ); + ) == -1) + buf = NULL; } } else { if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) { - buf = Xprintf("%s.dir",componentDirs[what]); - in= fopen(buf,"r"); + if (asprintf(&buf, "%s.dir", componentDirs[what]) == -1) + buf = NULL; + else + in = fopen(buf,"r"); + buf = NULL; } if (!in) { haveDir= False; free(buf); - buf = Xprintf( + if (asprintf + (&buf, "xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg, - componentDirs[what],(long) - ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:xkbDebugFlags)), + componentDirs[what], + (long) ((xkbDebugFlags < 2) ? 1 : + ((xkbDebugFlags > 10) ? 10 : xkbDebugFlags)), file W32_tmpfile - ); + ) == -1) + buf = NULL; } } status= Success; diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c index fca0cd6..d635128 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLoad.c +++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c @@ -248,19 +248,21 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; char *xkbbasedir = XkbBaseDirectory; char *xkbbindir = XkbBinDirectory; - cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", + if (asprintf(&cmd,"\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", xkbbindir, ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), xkbbasedir,(map?"-m ":""),(map?map:""), PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file, - xkm_output_dir,outFile); + xkm_output_dir,outFile) == -1) + cmd = NULL; } else { - cmd = Xprintf("xkbcomp -w %d -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", + if (asprintf(&cmd, "xkbcomp -w %d -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), (map?"-m ":""),(map?map:""), PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file, - xkm_output_dir,outFile); + xkm_output_dir,outFile) == -1) + cmd = NULL; } #ifdef DEBUG if (xkbDebugFlags) { @@ -336,13 +338,14 @@ char tmpname[PATH_MAX]; char *xkbbasedir = XkbBaseDirectory; char *xkbbindir = XkbBinDirectory; - buf = Xprintf( - "\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm \"%s\" -em1 %s -emp %s -eml %s \"%s%s.xkm\"", + if (asprintf(&buf, + "\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm \"%s\" -em1 %s -emp %s -eml %s \"%s%s.xkm\"", xkbbindir, ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), xkbbasedir, xkmfile, PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1, - xkm_output_dir,keymap); + xkm_output_dir,keymap) == -1) + buf = NULL; } else { #ifndef WIN32 @@ -350,12 +353,13 @@ char tmpname[PATH_MAX]; #else char *xkmfile = tmpname; #endif - buf = Xprintf( + if (asprintf(&buf, "xkbcomp -w %d -xkm \"%s\" -em1 %s -emp %s -eml %s \"%s%s.xkm\"", ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), xkmfile, PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1, - xkm_output_dir,keymap); + xkm_output_dir,keymap) == -1) + buf = NULL; } #ifdef TEST -- 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 fccef5fc5794c3aab5c28dbe354c3dc3a86cc07b Merge: 122db3f 3965f24 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Nov 9 15:33:02 2018 +0100 Merge branch 'uli42-pr/xkb_1.3.0.0' into 3.6.x Attributes GH PR #717: https://github.com/ArcticaProject/nx-libs/pull/717 Makefile | 17 +- debian/control | 1 + nx-X11/config/cf/Imake.tmpl | 8 + nx-X11/programs/Xserver/code-versions.txt | 2 +- nx-X11/programs/Xserver/hw/nxagent/Events.c | 26 +- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 263 +---- nx-X11/programs/Xserver/include/xkbfile.h | 32 +- nx-X11/programs/Xserver/include/xkbsrv.h | 3 +- nx-X11/programs/Xserver/xkb/Imakefile | 18 +- nx-X11/programs/Xserver/xkb/XKBMAlloc.c | 2 +- nx-X11/programs/Xserver/xkb/XKBMisc.c | 7 +- nx-X11/programs/Xserver/xkb/ddxBeep.c | 1 + nx-X11/programs/Xserver/xkb/ddxInit.c | 45 - nx-X11/programs/Xserver/xkb/ddxKeyClick.c | 49 - nx-X11/programs/Xserver/xkb/ddxKillSrv.c | 5 - nx-X11/programs/Xserver/xkb/ddxList.c | 55 +- nx-X11/programs/Xserver/xkb/ddxLoad.c | 350 +------ nx-X11/programs/Xserver/xkb/ddxPrivate.c | 5 - nx-X11/programs/Xserver/xkb/ddxVT.c | 5 - nx-X11/programs/Xserver/xkb/maprules.c | 16 +- nx-X11/programs/Xserver/xkb/xkb.c | 298 +++--- nx-X11/programs/Xserver/xkb/xkbAccessX.c | 6 +- nx-X11/programs/Xserver/xkb/xkbActions.c | 4 - nx-X11/programs/Xserver/xkb/xkbEvents.c | 4 + nx-X11/programs/Xserver/xkb/xkbInit.c | 11 +- nx-X11/programs/Xserver/xkb/xkbLEDs.c | 24 +- nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c | 4 - nx-X11/programs/Xserver/xkb/xkbUtils.c | 6 +- nx-X11/programs/Xserver/xkb/xkbfmisc.c | 456 ++++++++- nx-X11/programs/Xserver/xkb/xkbout.c | 1047 +++++++++++++++++++ nx-X11/programs/Xserver/xkb/xkbtext.c | 1325 +++++++++++++++++++++++++ nx-X11/programs/Xserver/xkb/xkmread.c | 94 +- nx-libs.spec | 2 + 33 files changed, 3116 insertions(+), 1075 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 3965f24befb21f469b887d4c69b9defc861831fb Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Nov 1 13:29:16 2018 +0100 adapt code-versions.txt --- nx-X11/programs/Xserver/code-versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/code-versions.txt b/nx-X11/programs/Xserver/code-versions.txt index 5a09d89..fe89388 100644 --- a/nx-X11/programs/Xserver/code-versions.txt +++ b/nx-X11/programs/Xserver/code-versions.txt @@ -19,4 +19,4 @@ render 6.9/7.0 Xext 7.1/1.1 xfixes 1.4.2 Xi 1.3.0.0 -xkb 7.1/1.1 +xkb 1.3.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 49607e93f53c7d15c8d18b36763e855ecb42a496 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Nov 5 22:16:25 2018 +0100 Lift Xext to xorg 1.4.2 --- nx-X11/programs/Xserver/Xext/dpms.c | 7 +- nx-X11/programs/Xserver/Xext/panoramiX.c | 46 +----- nx-X11/programs/Xserver/Xext/panoramiX.h | 13 -- nx-X11/programs/Xserver/Xext/panoramiXSwap.c | 4 + nx-X11/programs/Xserver/Xext/panoramiXh.h | 5 +- nx-X11/programs/Xserver/Xext/panoramiXprocs.c | 8 +- nx-X11/programs/Xserver/Xext/saver.c | 15 +- nx-X11/programs/Xserver/Xext/shm.c | 20 +-- nx-X11/programs/Xserver/Xext/shmint.h | 2 - nx-X11/programs/Xserver/Xext/sleepuntil.c | 1 - nx-X11/programs/Xserver/Xext/sync.c | 24 ++-- nx-X11/programs/Xserver/Xext/xf86bigfont.c | 1 + nx-X11/programs/Xserver/Xext/xres.c | 64 ++++++++- nx-X11/programs/Xserver/Xext/xtest.c | 6 +- nx-X11/programs/Xserver/Xext/xvdisp.c | 24 ++-- nx-X11/programs/Xserver/Xext/xvmain.c | 4 +- nx-X11/programs/Xserver/Xext/xvmc.c | 2 +- nx-X11/programs/Xserver/code-versions.txt | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXshm.c | 165 +++++++++++++++------- nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c | 195 +++++++++++++------------- nx-X11/programs/Xserver/include/inputstr.h | 5 + 21 files changed, 349 insertions(+), 264 deletions(-) diff --git a/nx-X11/programs/Xserver/Xext/dpms.c b/nx-X11/programs/Xserver/Xext/dpms.c index 81bbd51..3342f77 100644 --- a/nx-X11/programs/Xserver/Xext/dpms.c +++ b/nx-X11/programs/Xserver/Xext/dpms.c @@ -196,12 +196,15 @@ static int ProcDPMSEnable(client) register ClientPtr client; { - /* REQUEST(xDPMSEnableReq); */ + Bool was_enabled = DPMSEnabled; REQUEST_SIZE_MATCH(xDPMSEnableReq); - if (DPMSCapableFlag) + if (DPMSCapableFlag) { DPMSEnabled = TRUE; + if (!was_enabled) + SetScreenSaverTimer(); + } return(client->noClientException); } diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c index e36d04d..6eab7f3 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.c +++ b/nx-X11/programs/Xserver/Xext/panoramiX.c @@ -55,8 +55,10 @@ Equipment Corporation. #ifdef RENDER #include "picturestr.h" #endif + #include "protocol-versions.h" + #ifdef GLXPROXY extern VisualPtr glxMatchVisual(ScreenPtr pScreen, VisualPtr pVisual, @@ -107,7 +109,6 @@ static void PanoramiXResetProc(ExtensionEntry*); #include "panoramiXh.h" int (* SavedProcVector[256]) (ClientPtr client) = { NULL, }; -ScreenInfo *GlobalScrInfo = NULL; static int PanoramiXGCIndex = -1; static int PanoramiXScreenIndex = -1; @@ -133,7 +134,7 @@ static void XineramaChangeClip(GCPtr, int, void *, int); static void XineramaDestroyClip(GCPtr); static void XineramaCopyClip(GCPtr, GCPtr); -GCFuncs XineramaGCFuncs = { +static GCFuncs XineramaGCFuncs = { XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC, XineramaChangeClip, XineramaDestroyClip, XineramaCopyClip }; @@ -166,7 +167,7 @@ XineramaCloseScreen (ScreenPtr pScreen) return (*pScreen->CloseScreen) (pScreen); } -Bool +static Bool XineramaCreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; @@ -337,32 +338,11 @@ XineramaDeleteResource(void * data, XID id) return 1; } - -static Bool -XineramaFindIDOnAnyScreen(void * resource, XID id, void * privdata) -{ - PanoramiXRes *res = (PanoramiXRes*)resource; - int j; - - FOR_NSCREENS(j) - if(res->info[j].id == *((XID*)privdata)) return TRUE; - - return FALSE; -} - -PanoramiXRes * -PanoramiXFindIDOnAnyScreen(RESTYPE type, XID id) -{ - return LookupClientResourceComplex(clients[CLIENT_ID(id)], type, - XineramaFindIDOnAnyScreen, &id); -} - typedef struct { int screen; int id; } PanoramiXSearchData; - static Bool XineramaFindIDByScrnum(void * resource, XID id, void * privdata) { @@ -387,23 +367,6 @@ PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen) XineramaFindIDByScrnum, &data); } -WindowPtr -PanoramiXChangeWindow(int ScrnNum, WindowPtr pWin) -{ - int num = pWin->drawable.pScreen->myNum; - - if(num != ScrnNum) { - PanoramiXRes *win; - - win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, num); - - if (win) - pWin = (WindowPtr) LookupIDByType(win->info[ScrnNum].id, RT_WINDOW); - } - - return pWin; -} - typedef struct _connect_callback_list { void (*func)(void); struct _connect_callback_list *next; @@ -494,7 +457,6 @@ void PanoramiXExtensionInit(int argc, char *argv[]) if (noPanoramiXExtension) return; - GlobalScrInfo = &screenInfo; /* For debug visibility */ PanoramiXNumScreens = screenInfo.numScreens; if (PanoramiXNumScreens == 1) { /* Only 1 screen */ noPanoramiXExtension = TRUE; diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.h b/nx-X11/programs/Xserver/Xext/panoramiX.h index 210ba27..22b93ea 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.h +++ b/nx-X11/programs/Xserver/Xext/panoramiX.h @@ -1,4 +1,3 @@ -/* $TOG: panoramiX.h /main/4 1998/03/17 06:51:02 kaleb $ */ /***************************************************************** Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. @@ -94,18 +93,6 @@ typedef struct { (a).root = screenInfo.screens[0]->root->drawable.id; \ } -#define FORCE_WIN(a) { \ - if ((win = PanoramiXFindIDOnAnyScreen(XRT_WINDOW, a))) { \ - (a) = win->info[0].id; /* Real ID */ \ - } \ -} - -#define FORCE_CMAP(a) { \ - if ((win = PanoramiXFindIDOnAnyScreen(XRT_COLORMAP, a))) { \ - (a) = win->info[0].id; /* Real ID */ \ - } \ -} - #define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared) #define SKIP_FAKE_WINDOW(a) if(!LookupIDByType(a, XRT_WINDOW)) return diff --git a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c index c597da3..4a8dcbd 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c @@ -68,6 +68,7 @@ SProcPanoramiXGetState(ClientPtr client) swaps (&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + swapl (&stuff->window); return ProcPanoramiXGetState(client); } @@ -78,6 +79,7 @@ SProcPanoramiXGetScreenCount(ClientPtr client) swaps (&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + swapl (&stuff->window); return ProcPanoramiXGetScreenCount(client); } @@ -88,6 +90,8 @@ SProcPanoramiXGetScreenSize(ClientPtr client) swaps (&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + swapl (&stuff->window); + swapl (&stuff->screen); return ProcPanoramiXGetScreenSize(client); } diff --git a/nx-X11/programs/Xserver/Xext/panoramiXh.h b/nx-X11/programs/Xserver/Xext/panoramiXh.h index 6cee650..1a76a45 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXh.h +++ b/nx-X11/programs/Xserver/Xext/panoramiXh.h @@ -19,10 +19,10 @@ extern int PanoramiXGetGeometry(ClientPtr client); extern int PanoramiXTranslateCoords(ClientPtr client); extern int PanoramiXCreatePixmap(ClientPtr client); extern int PanoramiXFreePixmap(ClientPtr client); -extern int PanoramiXCreateGC(ClientPtr client); extern int PanoramiXChangeGC(ClientPtr client); extern int PanoramiXCopyGC(ClientPtr client); extern int PanoramiXCopyColormapAndFree(ClientPtr client); +extern int PanoramiXCreateGC(ClientPtr client); extern int PanoramiXSetDashes(ClientPtr client); extern int PanoramiXSetClipRectangles(ClientPtr client); extern int PanoramiXFreeGC(ClientPtr client); @@ -64,7 +64,6 @@ PROC_EXTERN(ProcPanoramiXGetScreenSize); PROC_EXTERN(ProcXineramaQueryScreens); PROC_EXTERN(ProcXineramaIsActive); -extern Bool XineramaCreateGC(GCPtr pGC); extern int SProcPanoramiXDispatch(ClientPtr client); @@ -72,6 +71,4 @@ extern char *ConnectionInfo; extern int connBlockScreenStart; extern xConnSetupPrefix connSetupPrefix; -extern ScreenInfo *GlobalScrInfo; extern int (* SavedProcVector[256]) (ClientPtr client); - diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c index 0532135..ce12bd9 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c @@ -572,7 +572,7 @@ int PanoramiXTranslateCoords(ClientPtr client) INT16 x, y; REQUEST(xTranslateCoordsReq); - register WindowPtr pWin, pDst; + WindowPtr pWin, pDst; xTranslateCoordsReply rep; REQUEST_SIZE_MATCH(xTranslateCoordsReq); @@ -1080,8 +1080,8 @@ int PanoramiXCopyArea(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, pGC, client); if (stuff->dstDrawable != stuff->srcDrawable) { SECURITY_VERIFY_DRAWABLE(pSrc, stuff->srcDrawable, client, - DixReadAccess); - if ((pDst->pScreen != pSrc->pScreen) || + DixReadAccess); + if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth)) { client->errorValue = stuff->dstDrawable; return (BadMatch); @@ -1186,7 +1186,7 @@ int PanoramiXCopyPlane(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, pGC, client); if (stuff->dstDrawable != stuff->srcDrawable) { SECURITY_VERIFY_DRAWABLE(psrcDraw, stuff->srcDrawable, client, - DixReadAccess); + DixReadAccess); if (pdstDraw->pScreen != psrcDraw->pScreen) { client->errorValue = stuff->dstDrawable; return (BadMatch); diff --git a/nx-X11/programs/Xserver/Xext/saver.c b/nx-X11/programs/Xserver/Xext/saver.c index 89eebd7..65c43f6 100644 --- a/nx-X11/programs/Xserver/Xext/saver.c +++ b/nx-X11/programs/Xserver/Xext/saver.c @@ -1,5 +1,4 @@ /* - * $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $ * Copyright (c) 1992 X Consortium @@ -65,7 +64,7 @@ static unsigned char ScreenSaverReqCode = 0; #endif static int ScreenSaverEventBase = 0; -extern DISPATCH_PROC(ProcScreenSaverQueryInfo); +static DISPATCH_PROC(ProcScreenSaverQueryInfo); static DISPATCH_PROC(ProcScreenSaverDispatch); static DISPATCH_PROC(ProcScreenSaverQueryVersion); static DISPATCH_PROC(ProcScreenSaverSelectInput); @@ -137,7 +136,7 @@ typedef struct _ScreenSaverSuspension } ScreenSaverSuspensionRec; static int ScreenSaverFreeSuspend( - pointer /*value */, + void * /*value */, XID /* id */ ); @@ -461,7 +460,7 @@ ScreenSaverFreeAttr (value, id) } static int -ScreenSaverFreeSuspend (pointer value, XID id) +ScreenSaverFreeSuspend (void * value, XID id) { ScreenSaverSuspensionPtr data = (ScreenSaverSuspensionPtr) value; ScreenSaverSuspensionPtr *prev, this; @@ -767,7 +766,7 @@ ProcScreenSaverQueryVersion (client) return (client->noClientException); } -int +static int ProcScreenSaverQueryInfo (client) register ClientPtr client; { @@ -863,9 +862,7 @@ ScreenSaverSetAttributes (ClientPtr client) ScreenPtr pScreen; ScreenSaverScreenPrivatePtr pPriv = 0; ScreenSaverAttrPtr pAttr = 0; - int ret; - int len; - int class, bw, depth; + int ret, len, class, bw, depth; unsigned long visual; int idepth, ivisual; Bool fOK; @@ -1404,7 +1401,7 @@ ProcScreenSaverSuspend (ClientPtr client) this->count = 1; this->clientResource = FakeClientID (client->index); - if (!AddResource (this->clientResource, SuspendType, (pointer) this)) + if (!AddResource (this->clientResource, SuspendType, (void *) this)) { free (this); return BadAlloc; diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index ca1ff9a..8e99b10 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -758,10 +758,10 @@ CreatePmap: if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { if (size < width * height) return BadAlloc; - /* thankfully, offset is unsigned */ - if (stuff->offset + size < size) - return BadAlloc; } + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); @@ -820,8 +820,8 @@ static int ProcShmPutImage(client) register ClientPtr client; { - register GCPtr pGC; - register DrawablePtr pDraw; + GCPtr pGC; + DrawablePtr pDraw; long length; ShmDescPtr shmdesc; REQUEST(xShmPutImageReq); @@ -933,7 +933,7 @@ static int ProcShmGetImage(client) register ClientPtr client; { - register DrawablePtr pDraw; + DrawablePtr pDraw; long lenPer = 0, length; Mask plane = 0; xShmGetImageReply xgi; @@ -1070,7 +1070,7 @@ ProcShmCreatePixmap(client) register ClientPtr client; { PixmapPtr pMap; - register DrawablePtr pDraw; + DrawablePtr pDraw; DepthPtr pDepth; register int i; ShmDescPtr shmdesc; @@ -1112,9 +1112,9 @@ CreatePmap: if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { if (size < width * height) return BadAlloc; - /* thankfully, offset is unsigned */ - if (stuff->offset + size < size) - return BadAlloc; + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; } VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); diff --git a/nx-X11/programs/Xserver/Xext/shmint.h b/nx-X11/programs/Xserver/Xext/shmint.h index 5135d17..fc056bc 100644 --- a/nx-X11/programs/Xserver/Xext/shmint.h +++ b/nx-X11/programs/Xserver/Xext/shmint.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/nx-X11/programs/Xserver/Xext/sleepuntil.c b/nx-X11/programs/Xserver/Xext/sleepuntil.c index cc43815..8d59588 100644 --- a/nx-X11/programs/Xserver/Xext/sleepuntil.c +++ b/nx-X11/programs/Xserver/Xext/sleepuntil.c @@ -1,5 +1,4 @@ /* - * $Xorg: sleepuntil.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ * Copyright 1992, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c index a0711b7..bc7cb40 100644 --- a/nx-X11/programs/Xserver/Xext/sync.c +++ b/nx-X11/programs/Xserver/Xext/sync.c @@ -71,9 +71,8 @@ PERFORMANCE OF THIS SOFTWARE. #include "protocol-versions.h" #include <stdio.h> -#if !defined(WIN32) #include <sys/time.h> -#endif + /* * Local Global Variables @@ -572,7 +571,7 @@ SyncSendAlarmNotifyEvents(pAlarm) /* send to other interested clients */ for (pcl = pAlarm->pEventClients; pcl; pcl = pcl->next) - WriteEventsToClient(pcl->client, 1, (xEvent *) &ane); + WriteEventsToClient(pcl->client, 1, (xEvent *) &ane); } @@ -1112,7 +1111,7 @@ SyncComputeBracketValues(pCounter, startOver) { SyncTriggerList *pCur; SyncTrigger *pTrigger; - SysCounterInfo *psci = pCounter->pSysCounterInfo; + SysCounterInfo *psci; CARD64 *pnewgtval = NULL; CARD64 *pnewltval = NULL; SyncCounterType ct; @@ -1120,6 +1119,7 @@ SyncComputeBracketValues(pCounter, startOver) if (!pCounter) return; + psci = pCounter->pSysCounterInfo; ct = pCounter->pSysCounterInfo->counterType; if (ct == XSyncCounterNeverChanges) return; @@ -2460,7 +2460,7 @@ ServertimeQueryValue(pCounter, pValue_return) static void ServertimeBracketValues(pCounter, pbracket_less, pbracket_greater) - void * pCounter; + void *pCounter; CARD64 *pbracket_less; CARD64 *pbracket_greater; { @@ -2480,7 +2480,7 @@ ServertimeBracketValues(pCounter, pbracket_less, pbracket_greater) } static void -SyncInitServerTime() +SyncInitServerTime(void) { CARD64 resolution; @@ -2502,14 +2502,14 @@ static XSyncValue *pIdleTimeValueLess; static XSyncValue *pIdleTimeValueGreater; static void -IdleTimeQueryValue (pointer pCounter, CARD64 *pValue_return) +IdleTimeQueryValue (void *pCounter, CARD64 *pValue_return) { CARD32 idle = GetTimeInMillis() - lastDeviceEventTime.milliseconds; XSyncIntsToValue (pValue_return, idle, 0); } static void -IdleTimeBlockHandler (pointer env, struct timeval **wt, pointer LastSelectMask) +IdleTimeBlockHandler (void *env, struct timeval **wt, void *LastSelectMask) { XSyncValue idle, old_idle; SyncTriggerList *list = IdleTimeCounter->pTriglist; @@ -2584,9 +2584,9 @@ IdleTimeBlockHandler (pointer env, struct timeval **wt, pointer LastSelectMask) } static void -IdleTimeWakeupHandler (pointer env, +IdleTimeWakeupHandler (void * env, int rc, - pointer LastSelectMask) + void * LastSelectMask) { XSyncValue idle; @@ -2598,14 +2598,14 @@ IdleTimeWakeupHandler (pointer env, if ((pIdleTimeValueGreater && XSyncValueGreaterOrEqual (idle, *pIdleTimeValueGreater)) || (pIdleTimeValueLess && - XSyncValueLessOrEqual (idle, *pIdleTimeValueLess))) + XSyncValueLessOrEqual (idle, *pIdleTimeValueLess))) { SyncChangeCounter (IdleTimeCounter, idle); } } static void -IdleTimeBracketValues (pointer pCounter, +IdleTimeBracketValues (void *pCounter, CARD64 *pbracket_less, CARD64 *pbracket_greater) { diff --git a/nx-X11/programs/Xserver/Xext/xf86bigfont.c b/nx-X11/programs/Xserver/Xext/xf86bigfont.c index d8cae74..08ce9e5 100644 --- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c +++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c @@ -66,6 +66,7 @@ #include <nx-X11/X.h> #include <nx-X11/Xproto.h> #include "misc.h" +#include "os.h" #include "dixstruct.h" #include "gcstruct.h" #include "dixfontstr.h" diff --git a/nx-X11/programs/Xserver/Xext/xres.c b/nx-X11/programs/Xserver/Xext/xres.c index 03597ad..977ea4c 100644 --- a/nx-X11/programs/Xserver/Xext/xres.c +++ b/nx-X11/programs/Xserver/Xext/xres.c @@ -17,6 +17,9 @@ #include "swaprep.h" #include <nx-X11/extensions/XResproto.h> #include "pixmapstr.h" +#include "windowstr.h" +#include "gcstruct.h" + #include "protocol-versions.h" static int @@ -171,13 +174,54 @@ ProcXResQueryClientResources (ClientPtr client) return (client->noClientException); } +static unsigned long +ResGetApproxPixmapBytes (PixmapPtr pix) +{ + unsigned long nPixels; + int bytesPerPixel; + + bytesPerPixel = pix->drawable.bitsPerPixel>>3; + nPixels = pix->drawable.width * pix->drawable.height; + + /* Divide by refcnt as pixmap could be shared between clients, + * so total pixmap mem is shared between these. + */ + return ( nPixels * bytesPerPixel ) / pix->refcnt; +} + static void ResFindPixmaps (void * value, XID id, void * cdata) { unsigned long *bytes = (unsigned long *)cdata; PixmapPtr pix = (PixmapPtr)value; - *bytes += (pix->devKind * pix->drawable.height); + *bytes += ResGetApproxPixmapBytes(pix); +} + +static void +ResFindWindowPixmaps (void * value, XID id, void * cdata) +{ + unsigned long *bytes = (unsigned long *)cdata; + WindowPtr pWin = (WindowPtr)value; + + if (pWin->backgroundState == BackgroundPixmap) + *bytes += ResGetApproxPixmapBytes(pWin->background.pixmap); + + if (pWin->border.pixmap != NULL && !pWin->borderIsPixel) + *bytes += ResGetApproxPixmapBytes(pWin->border.pixmap); +} + +static void +ResFindGCPixmaps (void * value, XID id, void * cdata) +{ + unsigned long *bytes = (unsigned long *)cdata; + GCPtr pGC = (GCPtr)value; + + if (pGC->stipple != NULL) + *bytes += ResGetApproxPixmapBytes(pGC->stipple); + + if (pGC->tile.pixmap != NULL && !pGC->tileIsPixel) + *bytes += ResGetApproxPixmapBytes(pGC->tile.pixmap); } static int @@ -204,6 +248,24 @@ ProcXResQueryClientPixmapBytes (ClientPtr client) FindClientResourcesByType(clients[clientID], RT_PIXMAP, ResFindPixmaps, (void *)(&bytes)); + /* + * Make sure win background pixmaps also held to account. + */ + FindClientResourcesByType(clients[clientID], RT_WINDOW, + ResFindWindowPixmaps, + (void *)(&bytes)); + + /* + * GC Tile & Stipple pixmaps too. + */ + FindClientResourcesByType(clients[clientID], RT_GC, + ResFindGCPixmaps, + (void *)(&bytes)); + +#ifdef COMPOSITE + /* FIXME: include composite pixmaps too */ +#endif + rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; diff --git a/nx-X11/programs/Xserver/Xext/xtest.c b/nx-X11/programs/Xserver/Xext/xtest.c index a392599..b05d31b 100644 --- a/nx-X11/programs/Xserver/Xext/xtest.c +++ b/nx-X11/programs/Xserver/Xext/xtest.c @@ -168,12 +168,10 @@ ProcXTestFakeInput(client) register ClientPtr client; { REQUEST(xXTestFakeInputReq); - int nev; - int n; + int nev, n, type; xEvent *ev; DeviceIntPtr dev = NULL; WindowPtr root; - int type; #ifdef XINPUT Bool extension = FALSE; deviceValuator *dv = NULL; @@ -437,6 +435,8 @@ ProcXTestFakeInput(client) (root->drawable.pScreen, ev->u.keyButtonPointer.rootX, ev->u.keyButtonPointer.rootY, FALSE); + dev->valuator->lastx = ev->u.keyButtonPointer.rootX; + dev->valuator->lasty = ev->u.keyButtonPointer.rootY; break; case ButtonPress: case ButtonRelease: diff --git a/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c index 5f65c3f..54ab4ac 100644 --- a/nx-X11/programs/Xserver/Xext/xvdisp.c +++ b/nx-X11/programs/Xserver/Xext/xvdisp.c @@ -381,10 +381,8 @@ ProcXvQueryAdaptors(ClientPtr client) xvFormat format; xvAdaptorInfo ainfo; xvQueryAdaptorsReply rep; - int totalSize; - int na; + int totalSize, na, nf; XvAdaptorPtr pa; - int nf; XvFormatPtr pf; WindowPtr pWin; ScreenPtr pScreen; @@ -539,9 +537,9 @@ ProcXvQueryEncodings(ClientPtr client) static int ProcXvPutVideo(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvPutVideoReq); @@ -585,9 +583,9 @@ ProcXvPutVideo(ClientPtr client) static int ProcXvPutStill(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvPutStillReq); @@ -632,9 +630,9 @@ ProcXvPutStill(ClientPtr client) static int ProcXvGetVideo(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvGetVideoReq); @@ -679,9 +677,9 @@ ProcXvGetVideo(ClientPtr client) static int ProcXvGetStill(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvGetStillReq); @@ -725,7 +723,7 @@ ProcXvGetStill(ClientPtr client) static int ProcXvSelectVideoNotify(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; REQUEST(xvSelectVideoNotifyReq); REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); @@ -831,7 +829,7 @@ static int ProcXvStopVideo(ClientPtr client) { int status; - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; REQUEST(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq); diff --git a/nx-X11/programs/Xserver/Xext/xvmain.c b/nx-X11/programs/Xserver/Xext/xvmain.c index c1492fd..02e3b0e 100644 --- a/nx-X11/programs/Xserver/Xext/xvmain.c +++ b/nx-X11/programs/Xserver/Xext/xvmain.c @@ -153,7 +153,7 @@ static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int); */ void -XvExtensionInit() +XvExtensionInit(void) { ExtensionEntry *extEntry; @@ -205,7 +205,7 @@ XvExtensionInit() } static Bool -CreateResourceTypes() +CreateResourceTypes(void) { diff --git a/nx-X11/programs/Xserver/Xext/xvmc.c b/nx-X11/programs/Xserver/Xext/xvmc.c index fcd170e..b24a3c2 100644 --- a/nx-X11/programs/Xserver/Xext/xvmc.c +++ b/nx-X11/programs/Xserver/Xext/xvmc.c @@ -668,7 +668,7 @@ SProcXvMCDispatch (ClientPtr client) } void -XvMCExtensionInit() +XvMCExtensionInit(void) { ExtensionEntry *extEntry; diff --git a/nx-X11/programs/Xserver/code-versions.txt b/nx-X11/programs/Xserver/code-versions.txt index fe89388..37a5f9d 100644 --- a/nx-X11/programs/Xserver/code-versions.txt +++ b/nx-X11/programs/Xserver/code-versions.txt @@ -16,7 +16,7 @@ os 7.1/1.1 randr 1.18.0 record 1.4.2 render 6.9/7.0 -Xext 7.1/1.1 +Xext 1.4.2 xfixes 1.4.2 Xi 1.3.0.0 xkb 1.3.0.0 diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c index 5e8e8ed..246d393 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c @@ -95,15 +95,21 @@ ShmExtensionInit(void) } #endif +#ifdef NXAGENT_SERVER if (nxagentOption(SharedMemory) == False) { return; } +#endif sharedPixmaps = xFalse; pixmapFormat = 0; { +#ifdef NXAGENT_SERVER sharedPixmaps = nxagentOption(SharedPixmaps); +#else + sharedPixmaps = xTrue; +#endif pixmapFormat = shmPixFormat[0]; for (i = 0; i < screenInfo.numScreens; i++) { @@ -156,7 +162,7 @@ ShmExtensionInit(void) } static void -miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) +nxagent_miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) DrawablePtr dst; GCPtr pGC; int depth, w, h, sx, sy, sw, sh, dx, dy; @@ -166,18 +172,15 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) PixmapPtr pmap; GCPtr putGC; - nxagentShmTrap = 0; putGC = GetScratchGC(depth, dst->pScreen); if (!putGC) { - nxagentShmTrap = 1; return; } pmap = (*dst->pScreen->CreatePixmap)(dst->pScreen, sw, sh, depth, CREATE_PIXMAP_USAGE_SCRATCH); if (!pmap) { - nxagentShmTrap = 1; FreeScratchGC(putGC); return; } @@ -192,9 +195,28 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) (void)(*pGC->ops->CopyArea)((DrawablePtr)pmap, dst, pGC, 0, 0, sw, sh, dx, dy); (*pmap->drawable.pScreen->DestroyPixmap)(pmap); +} + +static void +miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) + DrawablePtr dst; + GCPtr pGC; + int depth, w, h, sx, sy, sw, sh, dx, dy; + unsigned int format; + char *data; +{ + /* Careful! This wrapper DEACTIVATES the trap! */ + + nxagentShmTrap = 0; + + nxagent_miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data); + nxagentShmTrap = 1; + + return; } + static void fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) DrawablePtr dst; @@ -203,6 +225,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) unsigned int format; char *data; { +#ifdef NXAGENT_SERVER int length; char *newdata; extern int nxagentImageLength(int, int, int, int, int); @@ -211,6 +234,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) fprintf(stderr, "fbShmPutImage: Called with drawable at [%p] GC at [%p] data at [%p].\n", (void *) dst, (void *) pGC, (void *) data); #endif +#endif if ((format == ZPixmap) || (depth == 1)) { @@ -227,6 +251,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) (void)(*pGC->ops->CopyArea)((DrawablePtr)pPixmap, dst, pGC, sx, sy, sw, sh, dx, dy); +#ifdef NXAGENT_SERVER /* * We updated the internal framebuffer, * now we want to go on the real X. @@ -255,6 +280,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) #endif } +#endif /* NXAGENT_SERVER */ FreeScratchPixmapHeader(pPixmap); } else @@ -345,17 +371,46 @@ ProcShmPutImage(client) stuff->srcY, stuff->totalWidth, stuff->totalHeight); #endif - #ifdef TEST - fprintf(stderr, "ProcShmPutImage: Calling (*shmFuncs[pDraw->pScreen->myNum]->PutImage)().\n"); - #endif - - (*shmFuncs[pDraw->pScreen->myNum]->PutImage)( - pDraw, pGC, stuff->depth, stuff->format, - stuff->totalWidth, stuff->totalHeight, - stuff->srcX, stuff->srcY, - stuff->srcWidth, stuff->srcHeight, +#ifndef NXAGENT_SERVER + /* + It seems like this code was removed for a good reason. Including + it leads to very strange issues when coupled with libXcomp and using + connection speed settings lower than LAN (and even on LAN some icons + are not showing up correctly, e.g., when using MATE). + + Further investigation on why this happens pending and might happen at a + later time. + + See also ArcticaProject/nx-libs#656 + */ + if ((((stuff->format == ZPixmap) && (stuff->srcX == 0)) || + ((stuff->format != ZPixmap) && + (stuff->srcX < screenInfo.bitmapScanlinePad) && + ((stuff->format == XYBitmap) || + - ((stuff->srcY == 0) && + - (stuff->srcHeight == stuff->totalHeight))))) && + ((stuff->srcX + stuff->srcWidth) == stuff->totalWidth)) + (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, stuff->dstX, stuff->dstY, - shmdesc->addr + stuff->offset); + stuff->totalWidth, stuff->srcHeight, + stuff->srcX, stuff->format, + shmdesc->addr + stuff->offset + + (stuff->srcY * length)); +- else +#endif + { + #ifdef TEST + fprintf(stderr, "ProcShmPutImage: Calling (*shmFuncs[pDraw->pScreen->myNum]->PutImage)().\n"); + #endif + + (*shmFuncs[pDraw->pScreen->myNum]->PutImage)( + pDraw, pGC, stuff->depth, stuff->format, + stuff->totalWidth, stuff->totalHeight, + stuff->srcX, stuff->srcY, + stuff->srcWidth, stuff->srcHeight, + stuff->dstX, stuff->dstY, + shmdesc->addr + stuff->offset); + } if (stuff->sendEvent) { @@ -376,7 +431,7 @@ ProcShmPutImage(client) static PixmapPtr -fbShmCreatePixmap (pScreen, width, height, depth, addr) +nxagent_fbShmCreatePixmap (pScreen, width, height, depth, addr) ScreenPtr pScreen; int width; int height; @@ -385,47 +440,59 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr) { register PixmapPtr pPixmap; - nxagentShmPixmapTrap = 1; - pPixmap = (*pScreen->CreatePixmap)(pScreen, width, height, depth, 0); if (!pPixmap) { - nxagentShmPixmapTrap = 0; - return NullPixmap; } - #ifdef TEST + #if defined(NXAGENT_SERVER) && defined(TEST) fprintf(stderr,"fbShmCreatePixmap: Width [%d] Height [%d] Depth [%d] Hint[%d]\n", width, height, depth, 0); #endif if (!(*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth, BitsPerPixel(depth), PixmapBytePad(width, depth), (void *)addr)) { - #ifdef WARNING + #if defined(NXAGENT_SERVER) && defined(WARNING) fprintf(stderr,"fbShmCreatePixmap: Return Null Pixmap.\n"); #endif (*pScreen->DestroyPixmap)(pPixmap); - nxagentShmPixmapTrap = 0; - return NullPixmap; } + return pPixmap; +} + +static PixmapPtr +fbShmCreatePixmap (pScreen, width, height, depth, addr) + ScreenPtr pScreen; + int width; + int height; + int depth; + char *addr; +{ + PixmapPtr result; + + nxagentShmPixmapTrap = 1; + + result = nxagent_fbShmCreatePixmap(pScreen, width, height, depth, addr); + nxagentShmPixmapTrap = 0; - return pPixmap; + return result; } static int -ProcShmDispatch (client) +nxagent_ProcShmDispatch (client) register ClientPtr client; { REQUEST(xReq); +#ifdef NXAGENT_SERVER #ifdef TEST fprintf(stderr, "ProcShmDispatch: Going to execute operation [%d] for client [%d].\n", stuff -> data, client -> index); @@ -436,6 +503,7 @@ ProcShmDispatch (client) nxagentShmRequestLiteral[stuff->data], stuff->data); } #endif +#endif switch (stuff->data) { @@ -447,36 +515,18 @@ ProcShmDispatch (client) return ProcShmDetach(client); case X_ShmPutImage: { - int result; - +#ifdef NXAGENT_SERVER #ifdef TEST fprintf(stderr, "ProcShmDispatch: Going to execute ProcShmPutImage() for client [%d].\n", client -> index); #endif - - nxagentShmTrap = 1; +#endif #ifdef PANORAMIX if ( !noPanoramiXExtension ) - { - result = ProcPanoramiXShmPutImage(client); - - nxagentShmTrap = 0; - - return result; - } + return ProcPanoramiXShmPutImage(client); #endif - - result = ProcShmPutImage(client); - - nxagentShmTrap = 0; - - #ifdef TEST - fprintf(stderr, "ProcShmDispatch: Returning from ProcShmPutImage() for client [%d].\n", - client -> index); - #endif - - return result; + return ProcShmPutImage(client); } case X_ShmGetImage: #ifdef PANORAMIX @@ -495,6 +545,23 @@ ProcShmDispatch (client) } } +/* A wrapper that handles the trap. This construct is used + to keep the derived code closer to the original +*/ +static int +ProcShmDispatch (register ClientPtr client) +{ + int result; + + nxagentShmTrap = 1; + + result = nxagent_ProcShmDispatch(client); + + nxagentShmTrap = 0; + + return result; +} + static int SProcShmDispatch (client) register ClientPtr client; @@ -523,11 +590,15 @@ SProcShmDispatch (client) client -> index); #endif +#ifdef NXAGENT_SERVER nxagentShmTrap = 1; +#endif result = SProcShmPutImage(client); +#ifdef NXAGENT_SERVER nxagentShmTrap = 0; +#endif #ifdef TEST fprintf(stderr, "SProcShmDispatch: Returning from SProcShmPutImage() for client [%d].\n", diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c index ea617aa..336ec10 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c @@ -64,194 +64,195 @@ SOFTWARE. */ int -ProcXvDispatch(ClientPtr client) +nxagent_ProcXvDispatch(ClientPtr client) { - int result; - REQUEST(xReq); UpdateCurrentTime(); - /* - * Report upstream that we are - * dispatching a XVideo operation. - */ - - nxagentXvTrap = 1; - - #ifdef TEST - fprintf(stderr, "ProcXvDispatch: Going to dispatch XVideo operation [%d] for client [%d].\n", - stuff->data, client -> index); - #endif - switch (stuff->data) { - case xv_QueryExtension: result = (ProcXvQueryExtension(client)); break; - case xv_QueryAdaptors: result = (ProcXvQueryAdaptors(client)); break; - case xv_QueryEncodings: result = (ProcXvQueryEncodings(client)); break; + case xv_QueryExtension: return(ProcXvQueryExtension(client)); + case xv_QueryAdaptors: return(ProcXvQueryAdaptors(client)); + case xv_QueryEncodings: return(ProcXvQueryEncodings(client)); case xv_PutVideo: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvPutVideo(client)); + return(XineramaXvPutVideo(client)); else #endif - { - result = (ProcXvPutVideo(client)); - } - break; + return(ProcXvPutVideo(client)); case xv_PutStill: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvPutStill(client)); + return(XineramaXvPutStill(client)); else #endif { - result = (ProcXvPutStill(client)); + return(ProcXvPutStill(client)); } - break; - case xv_GetVideo: result = (ProcXvGetVideo(client)); break; - case xv_GetStill: result = (ProcXvGetStill(client)); break; - case xv_GrabPort: result = (ProcXvGrabPort(client)); break; - case xv_UngrabPort: result = (ProcXvUngrabPort(client)); break; - case xv_SelectVideoNotify: result = (ProcXvSelectVideoNotify(client)); break; - case xv_SelectPortNotify: result = (ProcXvSelectPortNotify(client)); break; + case xv_GetVideo: return(ProcXvGetVideo(client)); + case xv_GetStill: return(ProcXvGetStill(client)); + case xv_GrabPort: return(ProcXvGrabPort(client)); + case xv_UngrabPort: return(ProcXvUngrabPort(client)); + case xv_SelectVideoNotify: return(ProcXvSelectVideoNotify(client)); + case xv_SelectPortNotify: return(ProcXvSelectPortNotify(client)); case xv_StopVideo: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvStopVideo(client)); + return(XineramaXvStopVideo(client)); else #endif - { - result = (ProcXvStopVideo(client)); - } - break; + return(ProcXvStopVideo(client)); case xv_SetPortAttribute: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvSetPortAttribute(client)); + return(XineramaXvSetPortAttribute(client)); else #endif - { - result = (ProcXvSetPortAttribute(client)); - } - break; - case xv_GetPortAttribute: result = (ProcXvGetPortAttribute(client)); break; - case xv_QueryBestSize: result = (ProcXvQueryBestSize(client)); break; - case xv_QueryPortAttributes: result = (ProcXvQueryPortAttributes(client)); break; + return(ProcXvSetPortAttribute(client)); + case xv_GetPortAttribute: return(ProcXvGetPortAttribute(client)); + case xv_QueryBestSize: return(ProcXvQueryBestSize(client)); + case xv_QueryPortAttributes: return(ProcXvQueryPortAttributes(client)); case xv_PutImage: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvPutImage(client)); + return(XineramaXvPutImage(client)); else #endif - { - result = (ProcXvPutImage(client)); - } - break; + return(ProcXvPutImage(client)); #ifdef MITSHM case xv_ShmPutImage: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvShmPutImage(client)); + return(XineramaXvShmPutImage(client)); else #endif - { - result = (ProcXvShmPutImage(client)); - } - break; + return(ProcXvShmPutImage(client)); #endif - case xv_QueryImageAttributes: result = (ProcXvQueryImageAttributes(client)); break; - case xv_ListImageFormats: result = (ProcXvListImageFormats(client)); break; + case xv_QueryImageAttributes: return(ProcXvQueryImageAttributes(client)); + case xv_ListImageFormats: return(ProcXvListImageFormats(client)); default: if (stuff->data < xvNumRequests) { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadImplementation); - result = (BadImplementation); break; + return(BadImplementation); } else { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); - result = (BadRequest); break; + return(BadRequest); } } - - nxagentXvTrap = 0; - - #ifdef TEST - fprintf(stderr, "ProcXvDispatch: Dispatched XVideo operation [%d] for client [%d].\n", - stuff->data, client -> index); - #endif - - return result; } int -SProcXvDispatch(ClientPtr client) +ProcXvDispatch(ClientPtr client) { int result; - REQUEST(xReq); - - UpdateCurrentTime(); - /* * Report upstream that we are * dispatching a XVideo operation. */ + #ifdef TEST + fprintf(stderr, "ProcXvDispatch: Going to dispatch XVideo operation [%d] for client [%d].\n", + stuff->data, client -> index); + #endif + nxagentXvTrap = 1; + result = nxagent_ProcXvDispatch(client); + + nxagentXvTrap = 0; + #ifdef TEST - fprintf(stderr, "SProcXvDispatch: Going to dispatch XVideo operation [%d] for client [%d].\n", + fprintf(stderr, "ProcXvDispatch: Dispatched XVideo operation [%d] for client [%d].\n", stuff->data, client -> index); #endif + return result; +} + + +int +nxagent_SProcXvDispatch(ClientPtr client) +{ + REQUEST(xReq); + + UpdateCurrentTime(); + switch (stuff->data) { - case xv_QueryExtension: result = (SProcXvQueryExtension(client)); break; - case xv_QueryAdaptors: result = (SProcXvQueryAdaptors(client)); break; - case xv_QueryEncodings: result = (SProcXvQueryEncodings(client)); break; - case xv_PutVideo: result = (SProcXvPutVideo(client)); break; - case xv_PutStill: result = (SProcXvPutStill(client)); break; - case xv_GetVideo: result = (SProcXvGetVideo(client)); break; - case xv_GetStill: result = (SProcXvGetStill(client)); break; - case xv_GrabPort: result = (SProcXvGrabPort(client)); break; - case xv_UngrabPort: result = (SProcXvUngrabPort(client)); break; - case xv_SelectVideoNotify: result = (SProcXvSelectVideoNotify(client)); break; - case xv_SelectPortNotify: result = (SProcXvSelectPortNotify(client)); break; - case xv_StopVideo: result = (SProcXvStopVideo(client)); break; - case xv_SetPortAttribute: result = (SProcXvSetPortAttribute(client)); break; - case xv_GetPortAttribute: result = (SProcXvGetPortAttribute(client)); break; - case xv_QueryBestSize: result = (SProcXvQueryBestSize(client)); break; - case xv_QueryPortAttributes: result = (SProcXvQueryPortAttributes(client)); break; - case xv_PutImage: result = (SProcXvPutImage(client)); break; + case xv_QueryExtension: return(SProcXvQueryExtension(client)); + case xv_QueryAdaptors: return(SProcXvQueryAdaptors(client)); + case xv_QueryEncodings: return(SProcXvQueryEncodings(client)); + case xv_PutVideo: return(SProcXvPutVideo(client)); + case xv_PutStill: return(SProcXvPutStill(client)); + case xv_GetVideo: return(SProcXvGetVideo(client)); + case xv_GetStill: return(SProcXvGetStill(client)); + case xv_GrabPort: return(SProcXvGrabPort(client)); + case xv_UngrabPort: return(SProcXvUngrabPort(client)); + case xv_SelectVideoNotify: return(SProcXvSelectVideoNotify(client)); + case xv_SelectPortNotify: return(SProcXvSelectPortNotify(client)); + case xv_StopVideo: return(SProcXvStopVideo(client)); + case xv_SetPortAttribute: return(SProcXvSetPortAttribute(client)); + case xv_GetPortAttribute: return(SProcXvGetPortAttribute(client)); + case xv_QueryBestSize: return(SProcXvQueryBestSize(client)); + case xv_QueryPortAttributes: return(SProcXvQueryPortAttributes(client)); + case xv_PutImage: return(SProcXvPutImage(client)); #ifdef MITSHM - case xv_ShmPutImage: result = (SProcXvShmPutImage(client)); break; + case xv_ShmPutImage: return(SProcXvShmPutImage(client)); #endif - case xv_QueryImageAttributes: result = (SProcXvQueryImageAttributes(client)); break; - case xv_ListImageFormats: result = (SProcXvListImageFormats(client)); break; + case xv_QueryImageAttributes: return(SProcXvQueryImageAttributes(client)); + case xv_ListImageFormats: return(SProcXvListImageFormats(client)); default: if (stuff->data < xvNumRequests) { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadImplementation); - result = (BadImplementation); break; + return(BadImplementation); } else { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); - result = (BadRequest); break; + return(BadRequest); } } +} + + +int +SProcXvDispatch(ClientPtr client) +{ + int result; + + /* + * Report upstream that we are + * dispatching a XVideo operation. + */ + + #ifdef TEST + fprintf(stderr, "SProcXvDispatch: Going to dispatch XVideo operation [%d] for client [%d].\n", + stuff->data, client -> index); + #endif + + nxagentXvTrap = 1; + + result = nxagent_SProcXvDispatch(client); nxagentXvTrap = 0; #ifdef TEST - fprintf(stderr, "ProcXvDispatch: Dispatched XVideo operation [%d] for client [%d].\n", + fprintf(stderr, "SProcXvDispatch: Dispatched XVideo operation [%d] for client [%d].\n", stuff->data, client -> index); #endif return result; } + + + #endif /* !defined(__sun) && !defined(__CYGWIN__) */ diff --git a/nx-X11/programs/Xserver/include/inputstr.h b/nx-X11/programs/Xserver/include/inputstr.h index 5e2e269..5bc7be2 100644 --- a/nx-X11/programs/Xserver/include/inputstr.h +++ b/nx-X11/programs/Xserver/include/inputstr.h @@ -147,6 +147,11 @@ typedef struct _ValuatorClassRec { AxisInfoPtr axes; unsigned short numAxes; int *axisVal; + /* the next two are only written by xtest and never read currently. They exist + to satisfy the compiler. Once Xi is updated, too, they will be a regular member + anyway */ + int lastx, lasty; /* last event recorded, not posted to + * client; see dix/devices.c */ CARD8 mode; } ValuatorClassRec, *ValuatorClassPtr; -- 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 d2dae84b3d8daf98062680a31663690718d9e867 Merge: fccef5f 49607e9 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Nov 9 15:53:42 2018 +0100 Merge branch 'uli42-pr/Xext-1.4.2' into 3.6.x Attributes GH PR #735: https://github.com/ArcticaProject/nx-libs/pull/735 nx-X11/programs/Xserver/Xext/dpms.c | 7 +- nx-X11/programs/Xserver/Xext/panoramiX.c | 46 +----- nx-X11/programs/Xserver/Xext/panoramiX.h | 13 -- nx-X11/programs/Xserver/Xext/panoramiXSwap.c | 4 + nx-X11/programs/Xserver/Xext/panoramiXh.h | 5 +- nx-X11/programs/Xserver/Xext/panoramiXprocs.c | 8 +- nx-X11/programs/Xserver/Xext/saver.c | 15 +- nx-X11/programs/Xserver/Xext/shm.c | 20 +-- nx-X11/programs/Xserver/Xext/shmint.h | 2 - nx-X11/programs/Xserver/Xext/sleepuntil.c | 1 - nx-X11/programs/Xserver/Xext/sync.c | 24 ++-- nx-X11/programs/Xserver/Xext/xf86bigfont.c | 1 + nx-X11/programs/Xserver/Xext/xres.c | 64 ++++++++- nx-X11/programs/Xserver/Xext/xtest.c | 6 +- nx-X11/programs/Xserver/Xext/xvdisp.c | 24 ++-- nx-X11/programs/Xserver/Xext/xvmain.c | 4 +- nx-X11/programs/Xserver/Xext/xvmc.c | 2 +- nx-X11/programs/Xserver/code-versions.txt | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXshm.c | 165 +++++++++++++++------- nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c | 195 +++++++++++++------------- nx-X11/programs/Xserver/include/inputstr.h | 5 + 21 files changed, 349 insertions(+), 264 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git