Most (but not all) of these were found by using
codespell --builtin clear,rare,usage,informal,code,names
but not everything reported by that was fixed.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
All helper client code now uses xcb, so calling XSetAuthorization() is
no longer needed.
This is the last reference to libX11 from helper clients, so linking
with x11-xcb and libX11 is no longer required.
Also drop (unneeded?) linking with libXau.
Also drop installing these prerequistes on AppvVeyor.
Also move prototypes for functions in winauth.c from win.h into a new
header, winauth.h, and include that where needed.
Convert clipboard integration code from libX11 to xcb
This drops support for COMPOUND_TEXT. Presumably some ancient
(pre-2000) clients exist which support that, but not UTF8_STRING, but we
don't have an example to test with. (Given the nature of the thing, the
users of those clients probably work in CJK languages)
Supporting COMPOUND_TEXT would also involve writing (or extracting from
Xlib) support for the ISO 2022 encoding.
v2:
Fix the length of text property set by a SelectionRequest
The length of the text property is not neccessarily the same as the
length of the clipboard text before it is d2u converted (specifically,
if that contains any '\r\n' sequences, it will be shorter as they are
now just '\n')
Always use CF_UNICODETEXT clipboard format. Windows will automatically
down-convert to CF_TEXT for clients which request that.
This is subtly different in one way: if CF_TEXT is requested, we now
post CF_UNICODETEXT and it is converted to CF_TEXT *in the locale of the
requesting process*. Previously, we would convert to CF_TEXT *in our
locale* and post that.
It looks like the code in the !X_HAVE_UTF8_STRING case didn't actually
work correctly, but fortunately that has never been true...
The original Win32 clipboard API is widely regarded as terrible, since
it relies on clients co-operatively managing the clipboard viewer chain,
and a single buggy client can break it for all other clients.
The last Windows version only supporting that API was Windows XP (5.1),
EOLed in 2014.
(This requires MinGW-w64 w32api 6.0.0 or later for
Add/RemoveClipboardListener correctly exported by the x86_64 user32
implib)
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
GetShift(int mask) can be called with mask==0, causing
it to go into an infinite loop.
Note: GetShift(mask) will return 0 for a mask of
both 0 and -1. The assumption is that if mask == 0,
then the corresponding bits for which we're calculating
the shift, are also 0.
Add an -icon option to set 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.
Note: LoadImageComma would be simpler if we just stated that XWinrc
paths are Cygwin paths on Cygwin, Windows paths on MinGW, but that could
break existing .XWinrc files
Note: Given that we can specify paths in an icon-specifier, I'm not sure
what IconDirectory wins us.
v2:
Fix formatting problems in man page additions
v3:
Fix some more s/_/@/g in man pages
"bool" conflicts with C++ (meh) and stdbool.h (ngh alright fine). This
is a driver-visible change and will likely break the build for mach64,
but it can be fixed by simply using xf86ReturnOptValBool like every
other driver.
Signed-off-by: Adam Jackson <ajax@redhat.com>
mate-terminal apparently requires these to be present to work
We just set them to describe one desktop, for the moment.
It seems we can safely ignore the _NET_WM_DESKTOP property on child
windows, and any _NET_WM_DESKTOP messages, as we only support one
desktop for windows to be on.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
WM_WM_MAP was removed in 52e05b92
Rename WM_WM_MAP2 as WM_WM_MAP_UNMANAGED (meaning an override-redirect
window, which manages it's own activation)
Rename WM_WM_MAP3 as WM_WM_MAP_MANAGED (meaning a normal window, which
is activated when clicked)
Set a linear gamma ramp. This avoids the xrandr command always warning
'Failed to get size of gamma for output default'
(perhaps we should be using GDI GetDeviceGammaRamp(), if possible?)
Make CRTC report non-zero physical dimensions initially
The rrGetInfo hook is not called for all RANDR requests (e.g.
RRGetOutputInfo), so we must always keep the fake mode information up to
date, rather than doing it lazily in the rrGetInfo hook)
Because we are so bad, most GTK+3 versions treat the output name 'default'
specially, and don't try to use RANDR with it. But versions 3.21.6 to
3.22.24, don't do this, and get badly confused by a CRTC with size 0x0.
See:
https://bugzilla.gnome.org/show_bug.cgi?id=771033https://bugzilla.gnome.org/show_bug.cgi?id=780101
Future work: Rather than reporting a single fake CRTC with a mode matching
the entire virtual display, the fake CRTCs we report should match our
'pseudo-xinerama' monitors
Make QueryMonitor() slightly less insane, making it return TRUE if the
specified monitor exists, rather than always returning TRUE (which we
are uselessly checking, and then also checking if the specified monitor
exists)
(Note that EnumDisplayMonitors() doesn't seem to have meaningful way to
return errors, see 5940580f)
Also: Spamming the long UseMsg() after "Invalid monitor number" isn't very
helpful.
Also: If we are exiting in ddxProcessArgument() due to an error in
options, use a non-zero exit status.
Add an option to turn on the use of the X window's alpha channel in
multiwindow mode, i.e. this uses the X window's alpha channel for
compositing into the native desktop.
This works on W7/Vista (using DwmEnableBlurBehindWindow()), and Windows
10 (using the undocumented SetWindowCompositionAttribute()), but not on
Windows 8/8.1
-compositewm must be enabled for this to be useful, as we only have a
pixmap with an alpha channel for the X window in that case. The
framebuffer/root window doesn't have one (unless perhaps you are using
the rootless extension, maybe...).
v2:
Update meson.build
Future work:
A window property to control use of alpha?
Option to turn off blur on W7/Vista
Implement _NET_WM_WINDOW_OPACITY
I think that a major cost in the current implementation is doing a
CreateDIBSection()/DestroyObject() on every refresh. So provide our own
CreatePixmap() instead, which does the CreateDIBSection(), once.
Testcase: glxgears or foobillard with direct swrast
Testcase: scrolling in a full-screen xterm
v2:
Fix handling of RENDER Scratch Pixmaps
(A problem easily shown with gitk or emacs)
v3:
Note that we don't own screen pixmap to release in DestroyPixmap
Log if unimplemented slow-path ever gets hit
Rather than drawing the window contents from the shadow framebuffer, use
Composite extension redirection to cause the server to maintain a bitmap
image of each top-level X window, and draw the window contents from
that, so that window contents which are occluded in the framebuffer show
correctly in the task bar and task switcher previews.
v2:
Fix incorrect use of memset() found by gcc5
hw/xwin/winshadgdi.c: In function ‘winBltExposedWindowRegionShadowGDI’:
hw/xwin/winshadgdi.c:861:9: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
v3:
Turn on -compositewm by default
v4:
Ignore -swcursor if -compositewm
-swcursor is not compatible with -compositewm (because the window
contents are drawn from an off-screen pixmap, not from the screen
pixmap, where the software cursor will be drawn).
v5:
Update meson.build also
Add -compositewm option to help output
Update CI to install prerequisites
Push the multiwindow wndproc WM_PAINT handling down into the drawing
engine. Only the GDI engine is supported in multiwindow mode currently,
so we only need to do this in the GDI engine.
Make winBltExposedRegionsShadowGDI() do the same stuff that
winTopLevelWindowProc()'s WM_PAINT handler does.
Note that winBltExposedRegionsShadowGDI() is currently used 1) in
windowed mode when the GDI engine is selected, and 2) in multiwindow
mode when "Hide Root Window" is off.
Promote the generated file containing the date & time build was
configured to top-level.
Rename it from xf86Build.h to buildDateTIme.h.
Use it as well in XQuartz, stringize BUILD_DATE when needed.
This has always been described as 'experimental'
We don't think this has any users: This mode has been disabled in Cygwin
packages since March 2016. We've never provided the xwinwm WM for x86_64
Cygwin. No one has even asked where the option has gone.
This leaves XQuartz as the only user of the rootless extension.
Remove --enable-windowswm configure option
Remove multiwindowextwm stuff from Makefiles
Remove -mwextwm option
Remove -mwextwm from man-page and help
Un-ifdef XWIN_MULTIWINDOWEXTWM
v2:
Remove rootless include paths
Remove windowswmproto from meson.build
This hasn't done anything besides return TRUE in a long long time.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
These are so close to identical that most DDXes implement one in terms
of the other. All the relevant cases can be distinguished by the error
code, so merge the functions together to make things simpler.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
v2:
Fix a bogus warning about a missing pixelformat attribute issued for every
pixelformat when WGL_ARB_framebuffer_sRGB isn't available
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Future work: To properly support GLX_ARB_create_context in indirect mode, we
need to use wglCreateContextAttribsARB() rather than wglCreateContext(),
when attribs are provided, rather than just dropping attribs on the floor,
as we currently do.
That probably entails removing the deferred context creation and instead
using a temporary window, as direct WGL does.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
In glxWinSetPixelFormat() handle the case where wglChoosePixelFormatARB()
fails and fallback to ChoosePixelFormat()
It seems for some drivers, wglChoosePixelFormatARB() can fail when the
provided DC doesn't belong to the driver (e.g. it's a compatible DC for a
bitmap, so allow a fallback to ChoosePixelFormat() if it fails.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Exposing these pixelFormats is problematic: they are provided by the 'GDI
Generic' renderer, which doesn't support the same set of extensions as the
IGD providing the more capable pixelFormats.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Add internal.h to SOURCES, omitted from 126c1cfa
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>