2008-04-20 17:35:42 +02:00
|
|
|
bin_PROGRAMS = XWin
|
|
|
|
|
|
|
|
SRCS_CLIPBOARD = \
|
|
|
|
winclipboardinit.c \
|
2013-06-17 01:38:47 +02:00
|
|
|
winclipboardwrappers.c
|
|
|
|
CLIPBOARD_LIBS = $(top_builddir)/hw/xwin/winclipboard/libXWinclipboard.la
|
2008-04-20 17:35:42 +02:00
|
|
|
|
|
|
|
if XWIN_GLX_WINDOWS
|
Add Windows-DRI extension
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>
2014-07-24 13:29:41 +02:00
|
|
|
GLX_DIR =
|
|
|
|
DEFS_GLX_WINDOWS =
|
|
|
|
XWIN_GLX_LIBS =
|
|
|
|
if XWIN_WINDOWS_DRI
|
|
|
|
GLX_DIR += dri
|
|
|
|
DEFS_GLX_WINDOWS += -DXWIN_WINDOWS_DRI
|
|
|
|
XWIN_GLX_LIBS += $(top_builddir)/hw/xwin/dri/libWindowsDRI.la
|
|
|
|
endif
|
|
|
|
GLX_DIR += glx
|
|
|
|
DEFS_GLX_WINDOWS += -DXWIN_GLX_WINDOWS
|
|
|
|
XWIN_GLX_LIBS += $(top_builddir)/hw/xwin/glx/libXwinGLX.la
|
2014-01-01 21:34:36 +01:00
|
|
|
XWIN_GLX_SYS_LIBS = -lopengl32
|
2008-04-20 17:35:42 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
SRCS_MULTIWINDOW = \
|
|
|
|
winmultiwindowshape.c \
|
|
|
|
winmultiwindowwindow.c \
|
|
|
|
winmultiwindowwm.c \
|
2011-07-18 15:48:23 +02:00
|
|
|
winmultiwindowwndproc.c \
|
|
|
|
propertystore.h \
|
|
|
|
winSetAppUserModelID.c
|
2017-01-05 14:17:59 +01:00
|
|
|
MULTIWINDOW_SYS_LIBS = -lshlwapi -lole32 -ldwmapi
|
2008-04-20 17:35:42 +02:00
|
|
|
|
|
|
|
SRCS_RANDR = \
|
|
|
|
winrandr.c
|
|
|
|
|
|
|
|
SRCS = InitInput.c \
|
|
|
|
InitOutput.c \
|
|
|
|
winallpriv.c \
|
|
|
|
winauth.c \
|
|
|
|
winblock.c \
|
|
|
|
wincmap.c \
|
|
|
|
winconfig.c \
|
|
|
|
wincreatewnd.c \
|
|
|
|
wincursor.c \
|
|
|
|
windialogs.c \
|
|
|
|
winengine.c \
|
|
|
|
winerror.c \
|
|
|
|
winglobals.c \
|
|
|
|
winkeybd.c \
|
|
|
|
winkeyhook.c \
|
|
|
|
winmisc.c \
|
2010-02-23 16:44:36 +01:00
|
|
|
winmonitors.c \
|
2008-04-20 17:35:42 +02:00
|
|
|
winmouse.c \
|
|
|
|
winmsg.c \
|
hw/xwin: Improve WM_ENDSESSION handling using separate messaging window thread
Currently, WM_ENDSESSION just calls GiveUp() to set the DE_TERMINATE flag. But
for the X server to exit cleanly, we also need the X server dispatch loop to be
unblocked so it can notice that DE_TERMINATE has been set and exit, removing
it's lock file and any unix domain socket.
It appears that the system will terminate the process when the last UI thread in
that process returns from processing WM_ENDSESSION for the last top-level
window.
Since WM_ENDSESSION appears to sent by the system via SendMessage()
(synchronously) and the wndproc is called to process it in the message thread
for that window (the X server thread), we can't easily terminate the X server
dispatch loop from inside the WM_ENDSESSION message processing.
So, create a messaging window, a hidden, top-level window, with a separate
thread to catch this message, and process it by calling GiveUp() and then
blocking on a mutex until the X server dispatch loop exits.
Also, notice when this is a shutdown cancel WM_ENDSESSION message and take no
action.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2011-08-31 22:35:14 +02:00
|
|
|
winmsgwindow.c \
|
2008-04-20 17:35:42 +02:00
|
|
|
winmultiwindowclass.c \
|
|
|
|
winmultiwindowicons.c \
|
2014-11-07 14:38:20 +01:00
|
|
|
winos.c \
|
2008-04-20 17:35:42 +02:00
|
|
|
winprefs.c \
|
|
|
|
winprefsyacc.y \
|
|
|
|
winprefslex.l \
|
|
|
|
winprocarg.c \
|
|
|
|
winscrinit.c \
|
|
|
|
winshadddnl.c \
|
|
|
|
winshadgdi.c \
|
2012-02-05 18:57:04 +01:00
|
|
|
wintaskbar.c \
|
2008-04-20 17:35:42 +02:00
|
|
|
wintrayicon.c \
|
|
|
|
winvalargs.c \
|
|
|
|
winwakeup.c \
|
|
|
|
winwindow.c \
|
|
|
|
winwndproc.c \
|
|
|
|
ddraw.h \
|
|
|
|
winconfig.h \
|
|
|
|
win.h \
|
2012-09-07 15:58:06 +02:00
|
|
|
winglobals.h \
|
2008-04-20 17:35:42 +02:00
|
|
|
winkeybd.h \
|
|
|
|
winkeynames.h \
|
|
|
|
winlayouts.h \
|
|
|
|
winmessages.h \
|
2012-09-07 15:58:06 +02:00
|
|
|
winmonitors.h \
|
2008-04-20 17:35:42 +02:00
|
|
|
winmsg.h \
|
|
|
|
winms.h \
|
|
|
|
winmultiwindowclass.h \
|
2012-09-07 15:58:06 +02:00
|
|
|
winmultiwindowicons.h \
|
2008-04-20 17:35:42 +02:00
|
|
|
winprefs.h \
|
|
|
|
winresource.h \
|
|
|
|
winwindow.h \
|
2010-02-19 06:36:27 +01:00
|
|
|
windisplay.c \
|
|
|
|
windisplay.h \
|
2008-11-02 19:27:09 +01:00
|
|
|
XWin.rc \
|
2008-04-20 17:35:42 +02:00
|
|
|
$(top_srcdir)/mi/miinitext.c \
|
|
|
|
$(SRCS_CLIPBOARD) \
|
|
|
|
$(SRCS_MULTIWINDOW) \
|
2017-05-09 13:59:19 +02:00
|
|
|
$(SRCS_RANDR)
|
2008-04-20 17:35:42 +02:00
|
|
|
|
2017-08-22 12:48:28 +02:00
|
|
|
DEFS = \
|
2008-04-20 17:35:42 +02:00
|
|
|
$(DEFS_GLX_WINDOWS) \
|
2017-08-22 12:48:31 +02:00
|
|
|
$(DEFS_MULTIWINDOWEXTWM)
|
2008-04-20 17:35:42 +02:00
|
|
|
|
|
|
|
XWin_SOURCES = $(SRCS)
|
|
|
|
|
2012-09-04 18:28:16 +02:00
|
|
|
XWIN_SYS_LIBS += -ldxguid
|
2014-01-01 21:34:36 +01:00
|
|
|
|
|
|
|
XWIN_LIBS += \
|
|
|
|
$(top_builddir)/pseudoramiX/libPseudoramiX.la \
|
|
|
|
$(top_builddir)/Xi/libXistubs.la
|
|
|
|
|
|
|
|
XWin_DEPENDENCIES = \
|
|
|
|
$(XWIN_GLX_LIBS) \
|
|
|
|
$(XWIN_LIBS) \
|
2013-06-17 01:38:47 +02:00
|
|
|
$(CLIPBOARD_LIBS) \
|
2014-01-01 21:34:36 +01:00
|
|
|
$(XSERVER_LIBS)
|
|
|
|
|
2013-06-17 01:38:47 +02:00
|
|
|
|
2014-01-01 21:34:36 +01:00
|
|
|
XWin_LDADD = \
|
|
|
|
$(XWIN_GLX_LIBS) \
|
|
|
|
$(XWIN_LIBS) \
|
2013-06-17 01:38:47 +02:00
|
|
|
$(CLIPBOARD_LIBS) \
|
2014-01-01 21:34:36 +01:00
|
|
|
$(XSERVER_LIBS) \
|
|
|
|
$(XWIN_GLX_SYS_LIBS) \
|
|
|
|
$(XSERVER_SYS_LIBS) \
|
|
|
|
$(XWIN_SYS_LIBS) \
|
|
|
|
$(MULTIWINDOW_SYS_LIBS)
|
|
|
|
|
2014-04-06 11:47:15 +02:00
|
|
|
XWin_LDFLAGS = -mwindows -Wl,--disable-stdcall-fixup $(LD_EXPORT_SYMBOLS_FLAG)
|
2008-11-02 19:27:09 +01:00
|
|
|
|
2011-09-07 13:50:20 +02:00
|
|
|
|
2008-11-02 19:27:09 +01:00
|
|
|
.rc.o:
|
2010-02-21 09:08:08 +01:00
|
|
|
$(AM_V_GEN)$(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -I $(top_builddir)/include
|
2008-04-20 17:35:42 +02:00
|
|
|
|
2013-03-30 20:44:14 +01:00
|
|
|
XWin.o: XWin.rc XWin.exe.manifest X.ico
|
|
|
|
|
2008-04-20 17:35:42 +02:00
|
|
|
winprefsyacc.h: winprefsyacc.c
|
|
|
|
winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h
|
|
|
|
|
|
|
|
BUILT_SOURCES = winprefsyacc.h winprefsyacc.c winprefslex.c
|
2011-01-10 02:27:50 +01:00
|
|
|
CLEANFILES = $(BUILT_SOURCES)
|
2008-04-20 17:35:42 +02:00
|
|
|
|
|
|
|
AM_YFLAGS = -d
|
|
|
|
AM_LFLAGS = -i
|
|
|
|
AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
|
2008-11-02 19:27:09 +01:00
|
|
|
$(XWINMODULES_CFLAGS) \
|
2010-10-15 15:12:22 +02:00
|
|
|
-I$(top_srcdir) \
|
|
|
|
-Wno-bad-function-cast
|
2008-05-21 18:34:07 +02:00
|
|
|
|
2010-02-01 18:11:54 +01:00
|
|
|
xwinconfigdir = $(sysconfdir)/X11
|
|
|
|
xwinconfig_DATA = system.XWinrc
|
|
|
|
|
2010-03-19 05:19:20 +01:00
|
|
|
install-exec-hook:
|
|
|
|
(cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) XWin$(EXEEXT) X)
|
|
|
|
|
2008-04-20 17:35:42 +02:00
|
|
|
EXTRA_DIST = \
|
2010-02-19 07:05:28 +01:00
|
|
|
$(xwinconfig_DATA) \
|
2008-04-20 17:35:42 +02:00
|
|
|
X.ico \
|
2011-11-04 20:29:01 +01:00
|
|
|
XWin.rc \
|
|
|
|
XWin.exe.manifest
|
2008-04-20 17:35:42 +02:00
|
|
|
|
|
|
|
relink:
|
2010-03-17 20:56:24 +01:00
|
|
|
$(AM_V_at)rm -f XWin$(EXEEXT) && $(MAKE) XWin$(EXEEXT)
|
2009-11-07 20:28:18 +01:00
|
|
|
|
2013-06-17 01:38:47 +02:00
|
|
|
SUBDIRS = man $(GLX_DIR) winclipboard .
|
2016-09-16 19:54:37 +02:00
|
|
|
DIST_SUBDIRS = man dri glx winclipboard .
|