summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-02-26Fix a crash in reloading multiwindow mode icons when not in multiwindow mode.unmap-minimized-windowsJon Turney4-16/+26
ReloadEnumWindowsProc() acesses window privates, which are only valid in multiwindow mode, but is called in all modes. Fix this potential crash by not doing this unless in multiwindow mode. Reproduction steps: 1/ XWin -mwextwm 2/ Run a client which creates an X window e.g. xterm 3/ Right click on notification area icon, and choose 'Reload .XWinrc' from the menu
2016-02-26Fix a crash which occurs if focus returns to XWin after xkbcomp has failedColin Harrison1-1/+1
If WM_FOCUS is received while the "core devices failed" fatal error due to xkbcomp failing is displayed, winRestoreModeKeyState() attempts to dereference a NULL InputInfo.keyboard->key pointer.
2016-02-24Unmap minimized windows in rootless modesJon Turney3-10/+37
At the moment, when a window is minimized, it is moved to (0,0) on the shadow framebuffer. This can leads to various problems: tooltips and menus can 'punch through' from an apparently minimized window if the mouse pointer is positioned over the native frame of another X window which covers the sensitive regions of the apparently minimized window. I think may also be leading to some repainting glitches when uncovering areas covered by native window frames. So, don't move minimized windows to (0,0), simply unmap them. This has the disadvantage that the contents of windows which are minimized are no longer stored in the shadow frame buffer, so must be redrawn when restored, but I assume they were being re-exposed when restored, anyhow... Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-02-24Try to improve iconify/deiconify of windowsJon Turney1-33/+101
XXX: XMapWindow() doesn't cause a MapNotify unless the window is unmapped, so this isn't helpful unless we unmap iconified windows. XXX: it's might be a bit late to check initial state here, have we already shown the window? testcases: xterm iconify/deiconify script, xtestcase iconized
2016-02-24Remove unused WM_WM_MAPJon Turney2-9/+0
2016-02-20Add -icon option to override screen window icon in windowed modeJon Turney9-58/+129
Add an -icon option to override the screen window icon in windowed mode Allow cygwin paths in an icon-specification Update man pages and system.XWinrc appropriately Also, log an error if the icon specified for TRAYICON cannot be loaded Also, fix a bug in appending a '\' to IconDirectory only if it doesn't already end with one, which was fortunately benign. Also, if we are exiting in ddxProcessAgrument() due to an error in options, use a non-zero exit status. XXX: LoadImageComma would be simpler if we just said that XWinrc paths are Cygwin paths on Cygwin, Windows paths on MinGW, but that could break existing .XWinrc files XXX: Given that we can specify paths, I'm not sure what IconDirectory wins us.
2016-02-18Merge branch 'cygwin-patches-for-1.18' into cygwin-release-1.18xserver-cygwin-1.18.1-1Jon Turney7-227/+314
2016-02-18Merge tag 'xorg-server-1.18.1' into cygwin-release-1.18Jon Turney56-1078/+2636
xorg-server-1.18.1
2016-02-18Raise limit on X display size from 4Kx4K to 32Kx32KJon Turney1-3/+3
2016-02-18Ensure WIN32 check triggers on MinGW only and not Cygwin.Jon Turney1-3/+3
Since the current Cygwin w32api headers define WIN32, make sure we only use WIN32 guarded code when not compiling for Cygwin. fd_mask doesn't get defined as a type which conflicts with select.h's definition of it. XXX: should do a full audit of uses of WIN32 and make sure they are correct. XXX: perhaps test should be in a positive form, e.g. __MINGW__ || _MSC_VER rather than WIN32 && !__CYGWIN__ Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-02-16Warn about too large Windows -> X clipboard pastesJon Turney1-0/+18
XChangeProperty() requests larger than the ~16MB permitted even with BigReq will fail BadLength
2016-02-16Implement INCR protocol for X clipboard -> Windows clipboardJon Turney5-221/+290
Also, relax the timeout mechanism so it allows 1 second between events, rather than 1 second for the entire transfer, as transfers of large pastes can take more than 1 second. Also, prefer UTF8_STRING encoding to COMPOUND_TEXT encoding
2016-02-08xserver 1.18.1xorg-server-1.18.1Adam Jackson1-3/+3
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-01-27dri2: Sync i915_pci_ids.h and i965_pci_ids.h from mesaTimo Aaltonen2-6/+54
Adds Skylake, Kabylake and Broxton allowing them to use modesetting + glamor with dri2. Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com> Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com> (cherry picked from commit 50ca286d79f6304b972ea74487308e7794a170fb)
2016-01-27modesetting: Require sufficiently new libdrmAdam Jackson1-2/+1
Bugzilla: https://bugs.freedesktop.org/93883 Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Julien Cristau <jcristau@debian.org> (cherry picked from commit bf23db42a4e5943129501223a47b48884cdeb62f)
2016-01-27glamor: don't do copy if we have 0 boxes to copy.Dave Airlie1-0/+3
This happens if you run twm + mplayer + xclock and drag the clock over the mplayer. If we don't catch it, we cause an illegal draw elements command to be passed to GL. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit 1fd82c764d5b24107e60f2173e30e5d24a2f2667)
2016-01-27glamor: Fix copy-like Render operations between 15 and 16 depth.Eric Anholt1-0/+8
Reading and writing to 16-depth pixmaps using PICT_x1r5g5b5 ends up failing, unless you're doing a straight copy at the same bpp where the misinterpretation matches on both sides. Fixes rendercheck/blend/over and renderhceck/blend/src in piglit. Please cherry-pick this to active stable branches. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 510c8605641803f1f5b5d2de6d3bb422b148e0e7)
2016-01-27glx: Fix GLX_EXT_create_context_es2_profile supportAdam Jackson5-26/+13
As of v4 of this extension, any GLES version number may be requested (to enable GLES3 and later). To comply with this, simply remove the API version checks and leave it to the DRI driver to validate. This happens to also enable using GLES1 in direct contexts, so if that's the dire situation you find yourself in, your client driver at least stands a chance of working. v4 also specifies that both extension strings should be advertised for compatibility with clients written against v1 of the extension spec, so add the es_profile bit to the extension list and enable it whenever we would enable es2_profile. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit bc415fb1e0031ad23bda6e9c3f4664532876a0e5)
2016-01-27present: Handle wraparound when comparing MSC valuesMichel Dänzer1-5/+27
When a window moves from one CRTC to another, present_window_to_crtc_msc updates window_priv->msc_offset according to the delta between the current MSC values of the old and new CRTC: window_priv->msc_offset += new_msc - old_msc; window_priv->msc_offset is initially 0, so if new_msc < old_msc, window_priv->msc_offset wraps around and becomes a large number. If the window_msc parameter passed in is small (in particular if it's 0, such as is the case when the client just wants to know the current window MSC value), the returned CRTC MSC value may still be a large number. In that case, the existing MSC comparisons in pixmap_present weren't working as intended, resulting in scheduling a wait far into the future when the target MSC had actually already passed. This would result in the client (e.g. the Chromium browser) hanging when moving its window between CRTCs. In order to fix this, introduce msc_is_(equal_or_)after helper functions which take the wraparound into account for comparing two MSC values. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 25eca80265654cfbf8768024e027426fedeb0918)
2016-01-27glamor: Disable debugging messages other than GL API errorsMichel Dänzer1-0/+3
According to Nicolai Hähnle, the relevant specification says "All messages are initially enabled unless their assigned severity is DEBUG_SEVERITY_LOW", so we need to explicitly disable the messages we don't want to get. Failing that, we were accidentally logging e.g. shader stats intended for shader-db. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93659 Tested-by: Laurent Carlier <lordheavym@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit 1db6de7b6a6ee240eb50a13fe1fa1e135d7cb93b)
2016-01-27glamor: store old fonts in double width textures.Dave Airlie3-8/+29
There is a problem with some fonts that the height necessary to store the font is greater than the max texture size, which causes a fallback to occur. We can avoid this by storing two macro columns side-by-side in the texture and adjusting the calculations to suit. This fixes xfd -fn -*-*-*-*-*-*-*-*-*-*-*-*-*-* falling back here, when it picks -arabic-newspaper-medium-r-normal--32-246-100-100-p-137-iso10646-1 Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 8116fd8a760b5935645def1b2c3b155c05927850)
2016-01-27glamor: fallback if font is too large for FBO size.Dave Airlie1-0/+5
running xfontsel on haswell here, with a max texture size of 8kx8k, one font wants 9711 height. This fallsback to sw in this case. A proper solution probably involves using an array texture. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 64081d0eacf3e53a029b8e8b63096cc153e98549)
2016-01-27os: Failure to remove a non-existent log file is not an errorAdam Jackson1-1/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 6dcb73375e0ce389315d55587623eb84e9d13543)
2016-01-27Fix build when XSERVER_PLATFORM_BUS is not defined.Thomas Klausner1-0/+4
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Thomas Klausner <wiz@NetBSD.org> (cherry picked from commit 862cbf4c870c9ed913206c6ef4988bdb470e1c39)
2016-01-27Fix uninitialized variable warnings reported by clangThomas Klausner1-3/+5
v2: Move initializing pos into the first clause of the for statement. We have to keep this macro equivalent to a plain for statement from the user's perspective, otherwise callers need to {} things to keep control flow correct. [ajax] Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Acked-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 63f83d1b7f496d05b409352749cdb6674d71cf80)
2016-01-27Use unique logfile names when starting server with -displayfdAlan Coopersmith3-28/+101
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93212 Previously all X servers started with -displayfd would overwrite Xorg.0.log - now a temporary name of Xorg.pid-<pid>.log is used until after -displayfd finds an open display - then it is renamed to the traditional Xorg.<display>.log name. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit edcb6426f20c3be5dd5f50b76a686754aef2f64e)
2016-01-27modesetting should not reference gbm when it's not definedAlan Coopersmith1-0/+6
Fixes build errors of: present.c: In function 'ms_do_pageflip': present.c:410:17: error: 'drmmode_bo' has no member named 'gbm' new_front_bo.gbm = glamor_gbm_bo_from_pixmap(screen, new_front); ^ present.c:412:22: error: 'drmmode_bo' has no member named 'gbm' if (!new_front_bo.gbm) { ^ present.c: In function 'ms_present_check_flip': present.c:536:36: error: 'drmmode_bo' has no member named 'gbm' if (drmmode_crtc->rotate_bo.gbm) ^ Introduced by commit 13c7d53d Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit fe8562f5316d8c74ca074ad145295c65ddff5fc2)
2016-01-12Merge branch 'cygwin-patches-for-1.18' into cygwin-release-1.18xserver-cygwin-1.18.0-2Jon Turney4-114/+109
2016-01-12Fix a problem with initially maximized windowsJon Turney2-30/+46
Fix a problem which occurs when a window is initially maxmimized: It's shown unmaximized, then maximized. The initial unmaximized show causes a WM_WM_CHANGE_STATE to unmaximized to be sent, while a SW_MAXIMIZE is in flight. These overlapping in-flight messages can cause the window to get stuck flipping between maximized and unmaximized states. It seems that maximizing a Windows window is not a state, but an action which can only be applied to a visible window. So, this can't be fixed by maximizing the window before it is made visible. Instead, explicitly sequence things so the window is always initially shown unmaximized, then start tracking the state, and then maximize it.
2016-01-12Re-order window creation processJon Turney4-41/+61
Be a bit more careful to do things in the right order and set the style flags and window state before we show the window. This is probably the right thing to do in any case as it means we can avoid the messy appearance of the window changing style just after it is first shown This is achieved by having WM_CREATE send a WM_WM_CREATE message to our window manager thread, which then does all the work of discovering the windows style. Note that this subtly changes the semantics of winCreateWindowsWindow(): previously the window was visible and drawn before that function returned, now that happens asychronously; I'm not sure if that could cause problems or not...
2016-01-12Remove a duplicate SW_SHOWNORMAL in winUpdateWindowsWindow()Jon Turney1-5/+0
2016-01-12Improvements to WM debugJon Turney1-4/+6
2016-01-12Remove unhelpful debug about WM message queue sizeJon Turney1-38/+0
2015-12-09vfb: add randr support (v2)Siim Põder1-0/+123
The motivation for getting this is chrome remote desktop that runs under Xvfb and wants to use RANDR to adjust screen size according to the remote desktop client screen size. Apparently there are other use cases as well, the bug mentions gnome-settings-daemon testing. [ajax: massaged commit message] Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=26391 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Lambros Lambrou <lambroslambrou@google.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Michal Srb <msrb@suse.com> Signed-off-by: Siim Põder <siim@p6drad-teel.net> (cherry picked from commit 3d68d1f26709ecb5ce22a9baa0d3d8162574ed6a)
2015-12-09glxproxy: Silence shadowed-variable warningsAdam Jackson1-2/+3
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit b5f04a79df8b5aab8b558461261d14721f0b3e41)
2015-12-09glxproxy: Silence set-but-unused-variable warningsAdam Jackson2-31/+6
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 18729a211a5fdd4f733e44eded754a0e6210b687)
2015-12-09dmx: Run 'doxygen -u' to upgrade the doxygen config fileAdam Jackson1-794/+1635
Also change the dot font setting back to the default of Helvetica as doxygen no longer ships FreeSans. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit bc996fa4e3c06f65eafe0a88ef491dbf01f31422)
2015-12-09dmx: Silence unused variable warning in dmxcompatAdam Jackson1-2/+0
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit a55e0bc56fd8f9da8f066dc344af19535dd092ca)
2015-12-09dmx: Silence lex/yacc-related config parser warningsAdam Jackson6-5/+8
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 2730ccb803c55af74dbdd1bfd982fc23e643554d)
2015-12-09systemd-logind.c: don't parse VT settings for non-seat0 X serversLaércio de Sousa1-1/+2
Since non-seat0 X servers no longer touch VTs, I believe these settings are unnecessary. Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br> Reviewed-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit 718223d27452862eedcf1bee6278eae6040d45ea)
2015-12-09xserver: Fix configure.ac check for libsystemd/-daemonBob Ham1-11/+14
The configure script looks for the libsystemd-daemon pkg-config module. If the configure script finds it, the script will add libsystemd-daemon to a list of modules which are used to consolidate CFLAGS and LIBS. The check for libsystemd-daemon was altered to fallback to libsystemd if libsystemd-daemon was not found (libsystemd-daemon was brought into libsystemd). Unfortunately, the configure script still adds "libsystemd-daemon" to the list of modules to consolidate, instead of "libsystemd". With this patch, we set a variable depending on which pkg-config module is found and add that to the module list instead. Changes since v1: - Rearranged logic so that we do a versioned check for libsystemd first, then look for libsystemd-daemon. - Cleaned up the check a bit, only performing the module checks if we don't have --with-systemd-daemon=no, in a similar style to --with-dtrace. - Changed the variable name to LIBSYSTEMD_DAEMON as per feedback. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Bob Ham <bob.ham@collabora.com> (cherry picked from commit 7c0ba32ddd5f1d5c65279365fa307dec3433caf3)
2015-12-09prime: Damage full destination rectangle when we start dirty trackingMichel Dänzer1-0/+21
This makes sure that the destination pixmap contents will be fully initialized. Without this, a PRIME output starts out with garbage. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 530d3e5ca0a02039b04ec6a677bbb4e05b78e5f4)
2015-12-09x86emu: Squash a warningAdam Jackson1-1/+1
Apologies, should have caught this one when applying the previous x86emu patch. Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 2a52c06e235bd79f91851121f53f7c1808fde321)
2015-12-09x86emu: Correctly handle 0x66 prefix for some instructionsJulian Pidancet1-50/+142
(Sorry for double posting) I repost this patch because I havn't got any replies from maintainers since I posted the initial patch back in March. Some instructions are not emulated correctly by x86emu when they are prefixed by the 0x66 opcode. I've identified problems in the emulation of these intructions: ret, enter, leave, iret and some forms of call. Most of the time, the problem is that these instructions should push or pop 32-bit values to/from the stack, instead of 16bit, when they are prefixed by the 0x66 special opcode. The SeaBIOS project aims to produce a complete legacy BIOS implementation as well as a VGA option ROM, entirely written in C and using the GCC compiler. In 16bit code produced by the GCC compiler, the 0x66 prefix is used almost everywhere. This patch is necessary to allow the SeaBIOS VGA option ROM to function with Xorg when using the vesa driver. SeaBIOS currently use postprocessing on the ROM assembly output to replace the affected instruction with alternative unaffected instructions. This is obviously not very elegant, and this fix in x86emu would be more appropriate. v2: - Decrement BP instead of EBP in accordance with the Intel Manual - Assign EIP instead of IP when poping the return address from the stack in 32-bit operand size mode in ret_far_IMM, ret_far, and iret - When poping EFLAGS from the stack in iret in 32-bit operand size mode, apply some mask to preserve Read-only flags. v3: - Rebase Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> (cherry picked from commit 59b618227ebd024e57720aaaea17596953f5b80e)
2015-12-09present: Do not replace Pixmaps on redirected Window on unflipChris Wilson1-9/+19
When unflipping, we may find that our flip window has been redirected. If we replace the redirected Window with the Screen Pixmap we then have mutliple fullscreen Windows believing that their own the Screen Pixmap - multiple fullscreen Windows that are being flipped by Clients, and so continue to flip causing popping between e.g. the compositor and the game. [ajax: Fix up present_execute() hunk to account for changes introduced in fe07ec19e212a68076560d243a2a935c54589068] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 72f0724cdc65dc9abbbf70b9feb6cce7c2b9f8a0)
2015-12-09present: When cancelling a pending synchronous flip, requeue itChris Wilson2-1/+16
The vblank event request for a synchronous flip is scheduled for the vblank before the target flip msc (so that the flip itself appears at the right frame). If we cancel that flip and so wish to schedule a copy instead, that copy needs to be postponed by a frame in order for it be performed at the requested time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 180b09912c0d2c4a43b5a08678bcad4b818924c7)
2015-12-09present: Requery pending flips with the right sync_flip modeChris Wilson2-2/+4
When verifying whether a pending flip is still valid, we need to pass down the orignal sync_flip mode (e.g. if the driver only supports sync flips, verifying a async flip will falsely fail). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit b2d55338f6b8f43ebcb49994abad123a797248cf)
2015-12-09modesetting: create entities for pci and old probe. (v2)Dave Airlie1-23/+26
This moves the code from the platform case into a common function, and calls that from the other two. v2: Emil convinced me we don't need to lookup pEnt here, so let's not bother. Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 548a3d5fd69bb059bbaf26ededdc94c212712cd7)
2015-12-09modesetting: drop platform_dev pointer.Dave Airlie2-10/+1
This isn't used anywhere, so no point storing it until we need it. Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 771016f0705909c908917b4ccaeafc950ba93c05)
2015-12-09Xorg.wrap: activate libdrm based detection for KMS driversArkadiusz Miśkiewicz1-0/+1
Xorg.wrap includes code guarded with WITH_LIBDRM for detecting KMS drivers. Unfortunately it is never activated since code missed to include file which defines WITH_LIBDRM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92894 Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit 19b0249a5e07b9fc008e5d8709d7e489874415de)