Left over from the following commits:
8465ee788f xwin: Remove native GDI engine (v2)
c79f824bf6 xwin: Remove primary DirectDraw engine
v2: drop leading - in the makefile
Cc: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk> (v1)
The function itself does not depend on the macro. Move it outside
of the ifdef guard and remove the identical copy in XWIN.
This is step 1 towards removing the duplication in winauth.c and moving
the OS specifics to os/
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
All the relevant code already uses the ::base::glx_enable_bits one.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
Those are xlib spellings, we say TRUE/FALSE pretty consistently
elsewhere in the server.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
This needs a meson with PRs #1784, #1792 and #1794
Future work: remove conditionals which are always on, and simplify redundant
CYGDEBUG conditionals
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Don't unconditionally include rootless.h, and so we don't need to add
rootless to the include path unless building MWEXTWM.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
../hw/xwin/winmultiwindowwm.c:188:1: warning: ‘MessageName’ defined but not used [-Wunused-function]
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
../hw/xwin/winshadgdi.c: In function ‘winCloseScreenShadowGDI’:
../hw/xwin/winshadgdi.c:632:12: warning: ‘fReturn’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../hw/xwin/winshadgdi.c:579:10: note: ‘fReturn’ was declared here
../hw/xwin/winshadddnl.c: In function ‘winCloseScreenShadowDDNL’:
../hw/xwin/winshadddnl.c:711:12: warning: ‘fReturn’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../hw/xwin/winshadddnl.c:661:10: note: ‘fReturn’ was declared here
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
This is possibly an actual bug in failing to check we successfully retrieved
the monitor size before using it to set the X screen size.
../hw/xwin/winwndproc.c: In function ‘winWindowProc’:
../hw/xwin/winwndproc.c:283:55: warning: ‘dwHeight’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../hw/xwin/winwndproc.c:240:32: note: ‘dwHeight’ was declared here
../hw/xwin/winwndproc.c:281:54: warning: ‘dwWidth’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../hw/xwin/winwndproc.c:240:23: note: ‘dwWidth’ was declared here
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Following on from the previous change, this adds a DPMS hook to the
ScreenRec and uses that to infer DPMS support. As a result we can drop
the dpms stub code from Xext.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
shadowDamage is just obfuscation. The other two macros won't work
outside shadow.c since the private key is in fact static there (meaning
the extern decl is a lie).
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
If windowsdriproto headers are available, build a Windows-DRI extension,
which supports requests to enable local clients to directly render GL to a
Windows drawable:
- a query to check if WGL is being used on a screen
- a query to map a fbconfigID to a native pixelformatindex
- a query to map a drawable to a native handle
Windows-DRI can only be useful if we are using WGL, so make an note if WGL
is active on a screen.
Make validGlxDrawable() public
Adjust glxWinSetPixelFormat() so it doesn't require a context, just a
screen and config.
That enables factoring out the deferred drawable creation code as
glxWinDeferredCreateDrawable()
Enhance glxWinDeferredCreateDrawable(), so that pixmaps are placed into a
file mapping, so they exist in memory which can be shared with the direct
rendering process.
Currently, this file mapping is accessed by a name generated from the XID.
This will not be unique across multiple server instances. It would perhaps
be better, although more complicated, to use an anonymous file mapping, and
then duplicate the handle for the direct rendering process.
Use glxWinDeferredCreateDrawable() to ensure the native handle exists for
the Windows-DRI query to map a drawable to native handle.
v2:
Various printf format warning fixes
v3:
Fix format warnings on x86
Move some uninteresting windows-dri output to debug log level
v4:
check for windowsdriproto when --enable-windowsdri
use windowsdriproto_CFLAGS
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
>From the GLX spec:
"GLX_X_RENDERABLE is a boolean indicating whether X can be used to
render into a drawable created with the GLXFBConfig. This attribute
is True if the GLXFBConfig supports GLX windows and/or pixmaps."
Every backend was setting this to true unconditionally, and then the
core ignored that value and sent true unconditionally on its own. This
is broken for ARB_fbconfig_float and EXT_fbconfig_packed_float, which
only apply to pbuffers, which are not renderable from non-GLX APIs.
Instead compute GLX_X_RENDERABLE from the supported drawable types. The
dri backends were getting _that_ wrong too, so fix that as well.
This is not a functional change, as there are no mesa drivers that claim
to support __DRI_ATTRIB_{UNSIGNED_,}FLOAT_BIT yet.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Update for removal of fdset from Block/Wakeup handler API in 9d15912a
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Keith Packard <keithp@keithp.com>
Update for removal of AddEnabledDevice in be5a513f. Use SetNotifyFd instead.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Keith Packard <keithp@keithp.com>
With no users of the interface needing the readmask anymore, we can
remove it from the argument passed to these functions.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Commit 7a22912e "Remove Shadow DirectDraw engine" contained a typo, changing
the fullscreen && DirectDraw check in WM_DISPLAYCHANGE to fullscreen ||
DirectDraw
This causes disruptive depth changes to be improperly handled
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
ReloadEnumWindowsProc() accesses 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
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
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.
Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
Firefox 38 has a WM_NORMAL_HINTS with a maximum size of 32767x32767.
Don't remove the maximize control from the window frame if the maximum size
is bigger than the virtual desktop size, as maximizing the window will not
exceed the maximium size.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Detect invalid options in combination with -nodecoration
These are particularly problematic as -nodecoration implies a default of
-nomultimonitors, for some reason, which will gives rendering issues with
-multiwindow.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Currently, just using -fullscreen fails in winValidateArgs(), as the default
-resize=randr is incompatible with -fullscreen.
Set the default resize mode to -noresize if -fullscreen is used.
Also, rename enum value notAllowed -> resizeNotAllowed for clarity.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Future work: Do we really need to call LogInit() in so many different
places?
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Downgrade from error to debug some uninformative, always-emitted log output
about thread synchronization during initialization
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
When -hostintitle is enabled, only use the hostname, not a FQDN from
WM_CLIENT_MACHINE, when checking if the window title already contains it
Also restructure GetWindowName() to fix a potential memory leak.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Use _NET_WM_NAME in preference to WM_NAME for window title
Update window title when _NET_WM_NAME property changes
We should always have been doing this, but some qt5 examples only set
_NET_WM_NAME, so now it's become more important...
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
In multiwindow mode, remove decorations from _NET_WM_WINDOW_TYPE_SPLASH type
windows.
Some programs use _NET_WM_WINDOW_TYPE_SPLASH_SCREEN in error, so also accept
that as equivalent.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Use the Bool type from X11/Xdefs.h for winShowWindowOnTaskbar().
This is the boolean type we should be using inside the X server, rather than
BOOL, which evaluates to either the Win32 API type, or the Xlib API type,
depending on the context...
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Convert the code for the multiwindow mode internal window manager to xcb
xcb conversion avoids xlib/xserver namespace collision and _XSERVER64 type
sizing issues
v2: Various fixes
v3: Don't include X11/extensions/windowswmstr.h, which uses the Display type
and thus depends on Xlib.h, just for _WINDOWSWM_NATIVE_HWND
v4: Fix indentation, add some error handling.
Fix a bug with ConfigureNotify handling
v5: Fix a bug which prevented WM_NORMAL_HINTS from being checked
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Remove winMinimizeWindow(), implement as UpdateState() in the WM instead,
which uses getHwnd() to map a Window XID to a HWND (like everything else in
the WM), rather than peering into the servers internal data structures.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Convert the code for converting an X11 icon to Win32 icon from Xlib to xcb.
v2: some warning fixes in winXIconToHICON()
v3: declaration-after-statement warning fixes
v4: printf format fixes
v5: convert in place rather than in a library
This also avoids the xlib/xserver namespace collision issues, so
winmultiwindowicons.h can be included everywhere it should be, which fixes
compilation with -Werror=implicit-function-declaration
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Now that the enable bits are in the screen base class we can compute
this in one place, rather than making every backend do it.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This doesn't seem very useful, and we're about to implement 1.4 across
the board, so some WGL extensions will become required.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
On xquartz this enables SGI_make_current_read, which is a mostly
harmless lie as CGL doesn't implement it, as well as SGIX_pbuffer, which
is fine because no pbuffer-enabled configs are created.
On xwin this enables SGIX_pbuffer and ARB_multisample in all cases.
Again this is harmless if the backend doesn't support the features,
since no fbconfigs will be created to expose them.
It also adds SGIX_visual_select_group to both xquartz and xwin.
Amusingly, both were filling in the appropriate field in the fbconfig
already.
v2: Warn about missing WGL extensions (Emil)
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This seems to be fairly universal these days, and if it doesn't exist
the only thing you break is separate drawable and readable, which is a
rare feature to use. So pretend it's always there and just throw an
error on MakeCurrent if it isn't, and don't consider it when computing
the GLX version number.
v2: Fix type-o for glxWinScreen (Jon Turney)
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This extension is direct-only and has no GLX protocol. We don't even
track an enable bit for it, trying to turn it on is pointless.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This existed only to be strdup'd and then immediately freed.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
- winVMsg() has no uses, so remove
- winMsgVerb() has only one use, with default verbosity, so remove
- winMsg() is identical to LogMessage()
- Put winDrvMsg() and winDrvMsgVerb() under XWIN_XF86CONFIG
- Include what you use Xfuncproto.h for _X_ATTRIBUTE_PRINTF
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Unused since native GDI engine removal in commit 8465ee78
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>