summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-17Add '-xserver-keymap-dir' option to print .xkm file directory and exitxkbcomp-cacheKeith Packard2-0/+10
This can be used by xkb file packages to clear any cached files when new xkb configuration files are installed. Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-17Cache xkbcomp outputKeith Packard5-86/+138
Construct a unique filename based on the display name and the RMLVO values. If that file contains valid contents, use it. Otherwise, compile the keymap to that file and don't unlink it so that it will be re-used the next time the server runs. v2: Only cache files that get written to XKM_OUTPUT_DIR. Add --disable-xkb-cache config option to not do any of this Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-17Merge remote-tracking branch 'alanc/master'Keith Packard6-76/+92
2012-07-17Merge remote-tracking branch 'jturney/master'Keith Packard26-447/+267
2012-07-17xwin: Clean up os wrappers for System, Popen and Pclose on WindowsKeith Packard4-84/+80
Popen and Pclose are never used on Windows, so don't bother to even try to define them. System(s) was defined as system(s), but the two users of that function are in xkb, which carefully redefines that as Win32System. Move Win32System and Win32TempDir to os/utils.c, renaming Win32System to be just System, which simplifies the xkb code Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-07-16Use C99 designated initializers in DRI2GetParam repliesAlan Coopersmith1-4/+5
DRI2GetParam was going through review in parallel with main batch of C99 initialization changes - sync up now that both have landed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-16Use C99 designated initializers in RandR 1.4 extension EventsAlan Coopersmith1-23/+24
RandR 1.4 was going through review in parallel with main batch of C99 initialization changes - sync up now that both have landed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-16Use C99 designated initializers in RandR 1.4 extension RepliesAlan Coopersmith3-44/+55
RandR 1.4 was going through review in parallel with main batch of C99 initialization changes - sync up now that both have landed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-16Fix two more C99 initialization mistakes using members of same structAlan Coopersmith2-5/+8
Similar to 34cf559bcf99dad, use temporary variables instead of referencing members of the struct being initialized in the middle of the initialization. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-16xf86: Re-export extension disable flagsAaron Plattner2-20/+20
These flags were unexported by commit a1d41e311c21eb6627caa0d168e070ceaf90806f, which moved the declarations around and lost the _X_EXPORT attributes in the process. Since drivers need these and it's late in the release cycle, just re-export them for now. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-16hw/xwin: Refer to xkeyboard-config man page for XKB configuration option valuesJon TURNEY1-11/+15
Also polish the keyboard configuration text a bit Include man section number in references to setxkbmap Consistently refer to 'manual page' rather using both that and 'man page' Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: Fix command line arguments for multiple monitors.Jörg Mensmann1-1/+3
Moving Xwin to a certain monitor using "-screen 0 @2" would fail, printing "ddxProcessArgument - screen - Querying monitors failed". This happened since commit 3ead1d810b0e157078db39712e02ea6dc85216d8, because EnumDisplayMonitor() returns FALSE if its callback function returns FALSE (which is not clearly documented), and QueryMonitor() would then also return FALSE. Moving back to the old behaviour, where the return value of EnumDisplayMonitors() is ignored. Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: Remove unused WindowExposuresProcPtr storage in screen privateJon TURNEY1-1/+0
We don't wrap the WindowExposures screen function Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: Remove long obsolete README for hw/xwinJon TURNEY1-141/+0
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: Remove a pointless OS version check in winInstallKeyboardHookLL()Jon TURNEY1-18/+0
Checking for OS later than NT4 SP3 (which we didn't do correctly anyhow, just checking for NT) is pointless when other code in hw/xwin assumes at least NT 5.0 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: Remove winClipboardDetectUnicodeSupport()Jon TURNEY7-100/+8
This code for detecting if the Windows clipboard can support unicode is long obsolete. All NT versions of Windows support unicode clipboard, so any version of Windows we can run on must support unicode clipboard. The -nounicodeclipboard flag to disable use of unicode on the clipboard is retained. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: Consolidate duplicated code as getHwnd() functionJon TURNEY1-30/+33
Consolidate code to find the native HWND of an X window, stored in the _WINDOWSWM_NATIVE_HWND property, duplicated in UpdateName() and PreserveWin32Stack() as getHwnd() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: Correct function name in log messageJon TURNEY1-2/+3
Correct function name in log message winInitializeDefaultScreens -> winInitializeScreenDefaults Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: Tidy up some more pointless output which is always emittedJon TURNEY1-4/+4
It's not very useful to log lines like the below when the About.. dialog is used winAboutDlgProc - WM_COMMAND - IDOK or IDCANCEL winAboutDlgProc - WM_CLOSE Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: RANDR resize didn't occur when screen window was maximized or restoredColin Harrison1-0/+7
In windowed mode, with option -resize, RANDR resize was missing when the screen window was maximized or restored. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-07-16hw/xwin: Bug fixes for screen sizing when the screen window is on a ↵Jon TURNEY5-34/+94
non-primary monitor There is a bug that when the -screen option is used to specify a monitor for the screen window to be located on, but no explicit size is specified (and the -multiplemonitors option isn't specified), the screen window size is always constrained to fit the work area of the primary monitor (rather than the work area of the specified monitor) This gives incorrect results if you want a screen the same size as your non-primary monitor (e.g. by using -screen 0 @2) and your non-primary monitor is larger than your primary monitor. (This can be worked around by specifying -multiplemonitors and an explicit screen size the same size as the monitor (e.g. -multiplemonitors -screen 0 1600x1200@2)) Fix to use work area for the monitor specified for the screen, rather than the primary monitor work area (unless -multiplemonitors is used, in which case we continue to use the virtual desktop work area instead) Also fix the adjustment for an autohide taskbar, so that it is only done if the taskbar is on the same monitor as the screen (or -multiplemonitors is used) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: Tidy up some pointless output which is always emittedJon TURNEY7-16/+16
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16hw/xwin: Don't bother reporting XORG_VERSION_CURRENTJon TURNEY2-5/+4
Don't bother reporting XORG_VERSION_CURRENT, when we also report the version number broken down into it's components XORG_VERSION_MAJOR, XORG_VERSION_MINOR, etc. as well. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-12xf86: include xf86platformBus.h in xf86AutoConfig.cDave Airlie1-0/+1
This fixes an implicit declaration, xf86AutoConfig.c:202:5: error: implicit declaration of function 'xf86PlatformMatchDriver' [-Werror=implicit-function-declaration] xf86AutoConfig.c:202:5: warning: nested extern declaration of 'xf86PlatformMatchDriver' [-Wnested-externs] Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-13glx: Fix checking GL versionBartosz Brachaczek1-1/+1
Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
2012-07-13glx/dri2: don't return NULL in a function with no return.Dave Airlie1-1/+1
Reported by gcc. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-13glx/dri2: use correct define from dri attribs.Dave Airlie1-1/+1
Looks like idr renamed this and pushed the wrong one. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-13glx/dri2: fix incorrect == vs =Dave Airlie1-1/+1
glxdri2.c:486: warning: statement with no effect Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-13glx/dri2: fix typo in the notification reset for robustness.Dave Airlie1-1/+1
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-13glx: pass screen into the convert functionDave Airlie1-2/+3
when robustness is enabled, this is required. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-12xtest: add extinit.h for SyncExtensionInitDave Airlie1-0/+1
This adds the decl for SyncExtenionInit. Signed-off-by: Dave Airlie <airlied@redhat.com> Tested-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-12Merge remote-tracking branch 'jturney/xwin-extmod-removal-fixes'Keith Packard3-7/+21
2012-07-12glx: Free DRI2 drawable reference to destroyed GLX drawable.Michel Dänzer1-2/+6
Otherwise the reference can lead to use after free in __glXDRIinvalidateBuffers(). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50019 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-12dri2: Add DRI2CreateDrawable2.Michel Dänzer2-2/+20
Same as DRI2CreateDrawable, except it can return the DRI2 specific XID of the DRI2 drawable reference to the base drawable. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-12Restore GLX extension to XWinJon TURNEY1-3/+20
- Add an XwinExtensionInit(), similar in spirit to QuartzExtensionInit() and xf86ExtensionInit() - Load the GLX extension (I'm guessing XQuartz needs this adding somewhere as well) - Also, since we now have a proper place to install the native GL provider where it will take priority over the the swrast provider, do so Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-12Merge remote-tracking branch 'jeremyhu/master'Keith Packard2-2/+5
2012-07-12sdksyms: Fix build with --disable-xvDaniel Stone1-0/+2
I hate this [redacted] script. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-12Restore extern to the declaration of __glXDRISWRastProviderJon TURNEY1-1/+1
b86aa74 dropped the 'extern' from the declaration of __glXDRISWRastProvider This turns out to be important to me, as without it, the final link only gets the tentative definition of __glXDRISWRastProvider implied by the declaration, and not the proper one from glxdriswrast.c, presumably because nothing else references anything in the object that file generates. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-12Revert bogus GlxPushProvider() in commit a1d41e3Jon TURNEY1-3/+0
a1d41e3 "Move extension initialisation prototypes into extinit.h" also includes a change to GlxExtensionInit to install the swrast GLX provider. Since b86aa74 "GLX: Insert swrast provider from GlxExtensionInit" already does this (correctly, by installing the swrast provider at the end of the chain, rather than at the beginning), and since this would seem to have the effect of making the swrast provider the most preferred provider, I'm guessing this wasn't intended. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-11XQuartz: Re-add prototype for DRIExtensionInitJeremy Huddleston1-0/+3
Regression from: a1d41e311c21eb6627caa0d168e070ceaf90806f Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> CC: Daniel Stone <daniel@fooishbar.org>
2012-07-11XQuartz: Fix build failure due to incorrect PseudoramiXExtensionInit prototypeJeremy Huddleston1-1/+1
pseudoramiX.c:129:1: error: conflicting types for 'PseudoramiXExtensionInit' [Semantic Issue] PseudoramiXExtensionInit(int argc, char *argv[]) ^ ../../include/extinit.h:175:13: note: previous declaration is here extern void PseudoramiXExtensionInit(void); ^ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-07-11XQuartz: Silence an unused-variable warningJeremy Huddleston1-1/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-07-11xfree86: Strip dangling pointers from desiredModeMaarten Lankhorst4-4/+21
Based on the original patch by Chris Wilson, which was a better fix than mine. We stash a copy of the desiredMode on the crtc so that we can restore it after a vt switch. This copy is a simple memcpy and so also stashes a references to the pointers contained within the desiredMode. Those pointers are freed the next time the outputs are probed and mode list rebuilt, resulting in us chasing those dangling pointers on the next mode switch. ==22787== Invalid read of size 1 ==22787== at 0x40293C2: __GI_strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==22787== by 0x668F875: strdup (strdup.c:42) ==22787== by 0x5DBA00: XNFstrdup (utils.c:1124) ==22787== by 0x4D72ED: xf86DuplicateMode (xf86Modes.c:209) ==22787== by 0x4CA848: xf86CrtcSetModeTransform (xf86Crtc.c:276) ==22787== by 0x4D05B4: xf86SetDesiredModes (xf86Crtc.c:2677) ==22787== by 0xA7479D0: sna_create_screen_resources (sna_driver.c:220) ==22787== by 0x4CB914: xf86CrtcCreateScreenResources (xf86Crtc.c:725) ==22787== by 0x425498: main (main.c:216) ==22787== Address 0x72c60e0 is 0 bytes inside a block of size 9 free'd ==22787== at 0x4027AAE: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==22787== by 0x4A547E: xf86DeleteMode (xf86Mode.c:1984) ==22787== by 0x4CD84F: xf86ProbeOutputModes (xf86Crtc.c:1578) ==22787== by 0x4DC405: xf86RandR12GetInfo12 (xf86RandR12.c:1537) ==22787== by 0x518119: RRGetInfo (rrinfo.c:202) ==22787== by 0x51D997: rrGetScreenResources (rrscreen.c:335) ==22787== by 0x51E0D0: ProcRRGetScreenResources (rrscreen.c:475) ==22787== by 0x513852: ProcRRDispatch (randr.c:493) ==22787== by 0x4346DB: Dispatch (dispatch.c:439) ==22787== by 0x4256E4: main (main.c:287) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36108 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10AllocDevicePair: Ensure XKB privates are initialisedDaniel Stone2-2/+2
Since we call directly into XKB and may be doing so before the extension has been initialised, make sure its privates are set up first. XTest had a hack to do this itself, but seems cleaner to just make sure we do it in AllocDevicePair. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10Sync: Always initialise system counter listDaniel Stone1-2/+2
Sync is designed to let you add system counters before the extension has been initialised, which means the system counter list may well be full of bees. Make sure it's initialised before we add to it, to avoid the risk of fatal injury. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10ProcGetPointerMapping uses rep.nElts before it is initializedKeith Packard1-3/+5
In: commit d792ac125a0462a04a930af543cbc732f8cdab7d Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in dix Replies the initializer for the .length element of the xGetPointerMappingReply structure uses the value of rep.nElts, but that won't be set until after this initializer runs, so we get garbage in the length element and clients using it will generally wedge. Easy to verify: $ xmodmap -pp Fixed by creating a local nElts variable and using that. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-10Version 1.12.99.901 (1.13 RC1)Keith Packard1-2/+2
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10Merge branch 'local-fixes'Keith Packard6-2/+33
2012-07-10GE: Remove unused RT_GECLIENTDaniel Stone1-2/+0
Remove remnants of an earlier experiment which had the GE extension handling event delivery directly. Nothing's used the resource since, so purge it. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10XFree86: os-support: Remove unused xf86MakeNewMappingDaniel Stone2-15/+0
No drivers used this, so it got unexported, and now it's so unused it got culled during the link. Take the poor function out behind the shed and put it out of its misery. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>