Replace multiple methods of checking for functions with AC_CHECK_FUNCS
Replace multiple methods of selecting fallback funcs with AC_REPLACE_FUNCS
Replace HAS_* and NEED_* #defines with autogenerated HAVE_*
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
We call xf86penConfigDirFiles twice, so we overwrite the configDirPath
variable, losing the pointer. If we move the pointer management to the
upper layer (the function callers), they will be able to call these
functions as many times as they want, but they'll have to free those
returned values.
v2: don't leak inside XWin
4,097 bytes in 1 blocks are definitely lost in loss record 625 of 632
at 0x4C2779D: malloc (in vgpreload_memcheck-amd64-linux.so)
by 0x4D7899: DoSubstitution (scan.c:615)
by 0x4D87B0: OpenConfigDir (scan.c:845)
by 0x4D8A2D: xf86openConfigDirFiles (scan.c:955)
by 0x49031F: xf86HandleConfigFile (xf86Config.c:2327)
by 0x49A9BF: InitOutput (xf86Init.c:365)
by 0x425A7A: main (main.c:204)
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
This commit wreaks havoc with other programs which manage the clipboard,
such as MS Office Clipboard or Win32 VNC viewers:
http://sourceware.org/bugzilla/show_bug.cgi?id=9910
This reverts commit 70ddd0f39d.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
We already link directly to some functions not available in NT4, so stop
pretending we will work on NT4 and link directly to EnumDisplayMonitors()
and SHGetFolderPath()
Also remove mentions of NT4 & Win95 from error messages
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
TrackMouseEvent has existed in user32 since at least NT4, so
don't bother with jumping through all the ancient compatibility hoops
of finding if _TrackMouseEvent() exists in comctl32 so it can check
if TrackMouseEvent() exists in user32 to see if it needs to emulate
it...
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Make the default DPI match the current Windows DPI setting. If that
setting can't be retrieved, change the fallback DPI value from 75 dpi
to 96 dpi.
Mark the application as dpiAware in the manifest, which prevents
dpi virtualization for high (>96) dpi values on Vista and later.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Spaces or tabs do not affect the text output layout.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
Also, fix whitespace, mainly around
swaps(&rep.sequenceNumber)
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Instead of just closing the log when everything is done, put one more
message in stating that we're actually terminating. Users or scripts that
look at the Xorg.log will then know that a) the server has terminated
properly and b) why the server terminated (to some degree, given that most
real-world errors will be caused by AbortServer()).
Acked-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The GLXversion member of the __GLXscreen struct
is just cruft since commit ad5c0d9efa,
when we started returning the minimum GLX version supported by all
of the screens on the display, rather than the maximum version supported
by the server.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Document the -[no]wgl options in the XWin manpage
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Report Window XIDs in Window create/destroy/reparent debug messages
It's actually quite useful if you are trying to corrolate those events
with what a client is doing...
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Add a suitable cast to the generated code for glWinSetupDispatchTable()
so it doesn't generate screeds of warnings
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Handle failure to get any useful pixel formats for GLX fbconfigs
more gracefully: If we didn't get any useful pixel formats from
wglGetPixelFormatAttribivARB(), fall back to using DescribePixelFormat().
If that doesn't give us any useful pixel formats, fallback to software
rendering.
This works around a problem with Intel 845G drivers, where
wglGetPixelFormatAttribivARB() doesn't seem to work as we expect it to...
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
... instead just log if an attempt is made to call a wrapper for
a function which didn't resolve
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Propagate and report the failure if SetPixelFormat() fails
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Request the message using languageID 0 (best effort), rather than only using language neutral messages
Always report the numeric error code.
Trim any trailing \r from FormatMessage() output
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Some graphics hardware supports hundreds of pixel formats, so adjust
formatting in fbconfig dumper for 3 digit index numbers
Also report the PFD_SUPPORT_DIRECTDRAW, PFD_DIRECT3D_ACCELERATED and
PFD_SUPPORT_COMPOSITION flags introduced with aero
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
mieqFini() already does the right thing, but it needs to be called by the
various DDXs and the XTest Extension.
X.Org Bug 38634 <http://bugs.freedesktop.org/show_bug.cgi?id=38634>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Acked-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Headers don't really need to be mode 0755.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Left-justify website link in About box. This is a cosmetic fix to make
the About box display correctly when Windows is configured with a
non-default DPI value
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
When the style changes, adjust the window size so the client area remains the same.
Otherwise the window size may change when sizing is reflected from Windows to X, and
some windows are drawn expecting them to be exactly the requested size (e.g. the
gmplayer control window)
Use DeferWindowPos to delay the resize to preserve client area on WM_STYLECHANGING
until after the style change has actually happened in WM_STYLECHANGED
As a consquence of this, we need to be more careful to create windows with exactly
the requested placement and client area initially, so the client area matches what
the X client requested
Also synchronize the X windows idea of the placement of a window which Windows is
allowed to place
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Fix XWin compilation after updates for input API changes in commits
e7150db58670c46b and 20fb07f4
Also remove a no longer needed InternalEvent* variable
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The current approach to event posting required the DDX to request the event
list (allocated by the DIX) and then pass that list into QueuePointerEvent
and friends.
Remove this step and use the DIX event list directly. This means that
QueuePointerEvent is not reentrant but it wasn't before anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
EventListPtr is a relic from pre-1.6, when we had protocol events in the
event queue and thus events of varying size.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Don't require every caller to use GPE + mieqEnqueue, provide matching
Queue...Event functions instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
wglext.h should be provided by the w32api package, rather than downloaded.
if it's not, do 'wget -P /usr/include/w32api/GL http://www.opengl.org/registry/api/wglext.h'
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Look for Khronos OpenGL spec files using pkg-config, rather than downloading them
Also add a --with-khronos-spec-dir=PATH configure option so XWin can be directed
where to find these files without using the khronos-spec-files package
XWin with AIGLX requires OpenGL spec files in order to generate wrapper code which:
(1) thunks from the glapi dispatch table which uses the default cdecl calling convention
to native GL functions using the stdcall calling convention.
(2) performs function address lookup for OpenGL 1.2+ functions, which are treated
as extensions and so not directly linkable.
v2: KHRONOS_SPEC_DIR is only valid when XWIN_GLX_WINDOWS is defined. Avoid 'make dist'
seeing invalid dependencies by only including rules using KHRONOS_SPEC_DIR if
XWIN_GLX_WINDOWS is defined
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Handle failure during winScreenInit() a bit more cleanly, rather than crashing
This avoids a crash with 'XWin -fullscreen -screen 0 @2 -screen 1 @1'
Also document that fullscreen may only be applied to one screen.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Make winOverrrideStyle() thread-safe
winOverrideStyle() is called from the internal WM client thread.
Accessing server-internal data structures to get window name and
class is not safe, as there is no lock to ensure we do not collide
with these data structures being updated in the server thread.
Rewrite so the internal client thread uses X client calls to
obtain this data safely
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Report XLocaleNotSupported result from X*TextPropertyToTextList()
Fix formatting for unknown results reported for X*TextPropertyToTextList()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Decorate function pointers retrieved via GetProcAddress which are currently
missing it with WINAPI, to ensure stdcall convention is used when calling them.
This fixes a crash currently seen when compiled -O2 and the -screen option uses
a size and monitor number e.g. -screen 0 1280x1000@2
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Ensure any icon created specially for a window is destroyed when
the window is destroyed
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Java applications using AWT on JRE 1.6.0 break with non-reparenting WMs AWT
doesn't explicitly know about (See sun bug #6434227)
XDecoratedPeer.handleConfigureNotifyEvent() only processes non-synthetic
ConfigureNotify events to update window location if it's identified the
WM as a non-reparenting WM it knows about (compiz or lookingglass)
Rather than tell all sorts of lies to get XWM to recognize us as one of
those, simply send a synthetic ConfigureNotify for every non-synthetic one
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Remove duplicated includes.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
GetKeyboardValuatorEvents handles NULL valuator masks already, so the
GetKeyboardEvents wrapper is not needed. Rename GKVE to GKE.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
All the implementations of makeCurrent and forceCurrent are identical,
so just use makeCurrent everywhere.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
each DDX has its own copy, I've taken the darwin one,
though I'm not sure why it needs the pOldClip piece that nobody
else has and the commit msg is like an "Updates from magic land"
type message.
This removes the main uses of pWin->winSize from the DDXen.
v2: drop old clip like ajax suggests.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
commit 769531b9 "Add mode field to pointer movement hooks" changes the
function signature of miPointerSetPosition() to include the movement mode
which resulted in the pointer position
Update use of miPointerSetPosition() in winEnqueueMotion() appropriately
(See http://tinderbox.freedesktop.org/builds/2011-03-16-0008/logs/xserver/#build)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This reverts commit 1564c82417.
The drivers used the top bits of the usage_hint to store driver
private flags (intel, radeon, nouveau).
With EXA we need to get at this data so if we migrate the pixmap we
can create the correct type of pixmap in the driver, however this
commit truncates the usage_hint into 8-bit class and loses all the
good stuff.
Signed-off-by: Dave Airlie <airlied@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
The class field was unused for pixmaps, and we don't have enough classes
to justify a whole uint32 anyway.
Reviewed-by: Soren Sandmann <ssp@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Tarballs include the downloaded gl spec files, which will end up in
$(srcdir). But, git-based builds will not have them at all and will
need to download them from opengl.org. They'll land in in the build
directory instead of $(srcdir), and so we need to allow them to be in
either place.
This change checks for the files in $(srcdir), linking them to . if
present. Otherwise, it downloads them from opengl.org.
A suggested better solution is to have Mesa install these files somewhere.
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Kristian Høgsberg <krh@bitplanet.net>
Add a keycode mapping for VK_OEM_8 as RCtrl, which is issued by Canadian
Multilingual Standard layout
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Ignore MappingNotify events sent to clipboard integration client,
xmodmap changes aren't of interest to it, but there is no mechanism
to express that disinterest.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Replace useless #if 0/ErrorF/#endif with winDebug
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Fix winShadowUpdateDD(|NL) so we don't try to blit to primary surface if it didn't get allocated
(Intel drivers, in particular, seem to like to issue a WM_DISPLAYCHANGE during a suspend/resume
cycle, but not allow surface to be allocated right then)
Also:
Use winReleasePrimarySurfaceShadowDD(|NL) in winFreeFBShadowDD(|NL) rather than open coding it
Don't mess about recreating surface if we're going to resize it anyhow
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Make ShadowGDI drawing engine only change the size of the screen
pixmap/shadow framebuffer on an RANDR change, not the bpp/depth
as well.
The server requires the screen pixmap's depth to be invariant.
Other drawing engines aren't quite as affected by this issue as
they won't draw to the display, if it has changed colour depth,
but probably still need some attention.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
This is only relevant to pre-NT versions of Windows, which are all EOL.
Also, it's in the wrong place now as framebuffer can get resized.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Fortunately, these swapped constants are benign as they have the same
value, 0
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Don't turn off -multiplemonitors when all monitors don't have the
same pixel format and when using shadow GDI engine, just warn that
performance may be degraded
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
When RANDR resizing is enabled, generate an internal RANDR change when
WM_DISPLAYCHANGE occurs in rootless modes for screens which occupy an
entire monitor or the virtual desktop.
Store the monitor number and use that to handle WM_DISPLAYCHANGE for a
screen specified with '-screen @monitor'
In rooted mode, WM_DISPLAYCHANGE isn't relevant (except where display
depth changes may cause problems). (A maximized screen window will get
WM_SIZE to adjust it to the new monitor size)
In rooted fullscreen mode, WM_DISPLAYCHANGE shouldn't be seen, as we
have the resolution we have selected for the fullscreen session)
(Could client randr requests be handled in fullscreen to cause a change
of the fullscreen resolution? )
Don't bother do a RANDR resize if the dimensions aren't actually changing
when WM_DISPLAYCHANGE is sent (should handle WM_DISPLAYCHANGE to size 0x0
that the intel driver seems to like to send)
Various debug output improvements
Also, remove the note that XWin can't handle display mode changes from
the man page
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
To avoid recursion, WM_SIZE requests shouldn't generate XRANDR requests
when no change is neeeded.
We do the actual resize on WM_EXITSIZEMOVE, as resizing occurs in
a modal loop, to avoid a backlog of resize events building up as
the X server doesn't get a change to process anything until the resize
is completed.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Implement framebuffer resizing in RANDR extension:
Resize the frame buffer, the screen's root window and the native window
containing the root window image.
Correctly allow for decorations in new native window size when resizing native window
to fit the new framebuffer size with AdjustWindowRectEx()
Update physical size info for a screen when it is changed by RANDR
Forbid client-requested RANDR changes in fullscreen and rootless modes
Only resize window on an external RandR request, to avoid recursing on
a WM_SIZE requested resize.
Also, add prototypes for winRandRInit() and winDoRandRScreenSetSize() to header file
Also, update the author list and copyright for winrandr.c
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Add -resize command line option to configure how native window sizing frame
is used.
In additions to the existing fixed and scrollbars modes, add a new mode to
allow framebuffer to be resized using native window frame
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Move QueryMonitor() out of windprocarg.c into a new file, winmonitors.c,
as we use to use it from other places as well
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Remove an attempt at the rather difficult optimization of detecting
if WM_DISPLAYCHANGE affects any of the monitors which intersect the
native window for the X screen.
We'll always act as if it does, which it probably usually the case.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
(This stored calculation was wrong if -dpi came after -screen on the command
line, anyhow)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Refactor the drawing engines so we can explicitly allocate and release the framebuffer for a screen
Move the setting of dwPaddedWidth into the DDNL engine, so it is updated when the framebuffer changes size
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Some trivial build fixes required
Also fill out all function pointers for primaryfb engine
Also tidy up the man page section describing drawing engines.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Never implemented in any open source driver. The implementation
assumed explicit DDX driver knowledge of how the client-side driver
worked, since at the time the server's GL renderer was not a DRI driver.
But now, it is, so any implementation of these should be done with
additional DRI driver API, like the swap control extension.
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Fix compilation after commit 675f4a8525
converts winmouse.c to the new ValuatorMask input API, but doesn't
include the required header inpututil.h
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This patch has been generated by the following Coccinelle semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- free(E);
- }
+ free(E);
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This patch has been generated by the following Coccinelle semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- free(E);
(
- E = NULL;
|
- E = 0;
)
- }
+ free(E);
+ E = NULL;
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit introduces an abstraction API for handling masked valuators. The
intent is that drivers just allocate a mask, set the data and pass the mask
to the server. The actual storage type of the mask is hidden from the
drivers.
The new calls for drivers are:
valuator_mask_new() /* to allocate a valuator mask */
valuator_mask_zero() /* to reset a mask to zero */
valuator_mask_set() /* to set a valuator value */
The new interface to the server is
xf86PostMotionEventM()
xf86PostButtonEventM()
xf86PostKeyboardEventM()
xf86PostProximityEventM()
all taking a mask instead of the valuator array.
The ValuatorMask is currently defined for MAX_VALUATORS fixed size due to
memory allocation restrictions in SIGIO handlers.
For easier review, a lot of the code still uses separate valuator arrays.
This will be fixed in a later patch.
This patch was initially written by Chase Douglas.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
For the global variables defined in winglobals.c, remove duplicate extern
declarations from the beginning of various .c files, and move most of them
into a new header file, winglobals.h
Leave some clipboard related variables alone for the moment, they need treating
more carefully, to avoid mixing client and server type definitions.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Make g_hmodCommonControls static, it's only used in InitOutput.c
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Add winReleaseDDProcAddresses() for releasing the direct draw module
handle, so g_hmodDirectDraw can be made static
Remove unneeded duplicate extern definitions of g_fpDirectDrawCreate
and g_fpDirectDrawCreateClipper, and move the definition from
winglobals.c to winengine.c
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Make g_hhookKeyboardLL static, it's only used in winkeyhook.c
Also remove unused externs
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
I'm pretty sure the compiler has a better idea how to optimize this
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
winkeybd.c: In function ‘winSendKeyEvent’:
winkeybd.c:489: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type
winmouse.c: In function ‘winMouseButtonsSendEvent’:
winmouse.c:247: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type
winmouse.c: In function ‘winEnqueueMotion’:
winmouse.c:380: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
return statement with an expression in a function whose return-type is void
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Also remove the out-of-date listing of keyboard layout IDs and which ones
have known mappings
XXX: layout zh_TW doesn't exist anymore
This patch brought to you by C-u M-x align-regexp
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
winmultiwindowwm.c: In function ‘winApplyHints’:
winmultiwindowwm.c:1587: warning: ISO C90 forbids mixed declarations and code
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
winwindowswm.c: In function ‘ProcWindowsWMFrameSetTitle’:
winwindowswm.c:516: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness
winwindowswm.c:516: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness
winwindowswm.c:528: warning: pointer targets in passing argument 2 of ‘SetWindowTextA’ differ in signedness
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
windialogs.c: In function ‘winDisplayExitDialog’:
windialogs.c:327: warning: passing argument 3 of ‘PostMessageA’ makes integer from pointer without a cast
windialogs.c: In function ‘winDisplayAboutDialog’:
windialogs.c:597: warning: passing argument 3 of ‘PostMessageA’ makes integer from pointer without a cast
windialogs.c: In function ‘winAboutDlgProc’:
windialogs.c:697: warning: comparison between pointer and integer
windialogs.c:701: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘HINSTANCE’
windialogs.c:716: warning: assignment makes integer from pointer without a cast
windialogs.c:736: warning: assignment makes integer from pointer without a cast
windialogs.c:756: warning: assignment makes integer from pointer without a cast
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
winconfig.c: In function ‘winNameCompare’:
winconfig.c:715: warning: array subscript has type ‘char’
winconfig.c:715: warning: array subscript has type ‘char’
winconfig.c:716: warning: array subscript has type ‘char’
winconfig.c:716: warning: array subscript has type ‘char’
winconfig.c:730: warning: array subscript has type ‘char’
winconfig.c:730: warning: array subscript has type ‘char’
winconfig.c:731: warning: array subscript has type ‘char’
winconfig.c:731: warning: array subscript has type ‘char’
winconfig.c: In function ‘winNormalizeName’:
winconfig.c:1092: warning: array subscript has type ‘char’
winconfig.c:1093: warning: array subscript has type ‘char’
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
winclipboardxevents.c: In function ‘winClipboardFlushXEvents’:
winclipboardxevents.c:225: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘DWORD’
winclipboardxevents.c:266: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘DWORD’
winclipboardxevents.c:619: warning: pointer targets in passing argument 1 of ‘strcat’ differ in signedness
winclipboardxevents.c:659: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
winclipboardxevents.c:669: warning: pointer targets in passing argument 3 of ‘MultiByteToWideChar’ differ in signedness
winclipboardxevents.c:690: warning: pointer targets in passing argument 3 of ‘MultiByteToWideChar’ differ in signedness
winclipboardxevents.c:698: warning: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
winclipboardthread.c: In function ‘winClipboardErrorHandler’:
winclipboardthread.c:444: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Turn off the bad-function-cast warning for the XWin code, it's near impossible
to write code which uses Win32 API calls that doesn't trigger this warning
For example, SendMessage(WM_SETICON) returns an LRESULT, but we are supposed to
know this is safe to cast this result to a HICON, which gcc considers a non-matching
type.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Remove execute permission from source files
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Remove XFree86Server define, which was always on anyhow, and the
code which was guarded by !XFree86Server
This completes the process of removal started in 2006 :-)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Use U+0027 APOSTROPHE in XWin DDX help text, rather than
U+2019 RIGHT SINGLE QUOTATION MARK
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Cleanup some VENDOR_STRING/VENDOR_CONTACT cruft
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
mi will throw away rendering to input-only windows.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
Drop DRAWABLE_BUFFER and related checks, mbuf was the only thing that
used them and it was killed in 0ba82562.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
commit cbd4d5dbb7
removes the static declarations of ProcWindowsWMDispatch and
SProcWindowsWMDispatch which precede their first use in
winWindowsWMExtensionInit()
Move winWindowsWMExtensionInit() to after the definition of those
two functions to fix compilation.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Some functions had to be moved around due some missing static definitions.
Another minor clean up like inexistent function declarations and etc were made
also.
Part of this patch was cooked using:
sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files`
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Jeremy deleted rootlessAccelInit's implementation in 2008 in commit
587c010a1c. Delete its prototype and the
remaining commented-out call to it.
It still makes sense for the rootless GC ops to relax the planemask, but
that's independent of the size of the operation, so quit checking the
thresholds there.
FillBytes and CompositePixels are not called anywhere, so delete
everything related to both.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
When a GC is allocated, it is zeroed, including all storage requested
with dixRegisterPrivateKey. So CreateGC hooks don't need to initialize
anything to zero.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
RegisterPointerDevice() and RegisterKeyboardDevice() were already mapped to
RegisterOtherDevice() and obsolete.
RegisterOtherDevice() was called for all devices and the two assignments can
simply be moved into AddInputDevice(). Purge RegisterOtherDevice() and
pretend it never happened.
*lalalalala*
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Commit 9de0e31746 changed the signature
of __GLXScreen's createDrawable method.
Update the glxWinCreateDrawable() function in XWin's GLX provider
appropriately.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Fix some typos in devPrivates API changes in XWin code.
Move allocation of private keys as it's no longer valid to do them during OsVendorInit()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This patch was generated by the following Perl code:
perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;'
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
This patch has been generated by the following Coccinelle semantic patch:
@@
expression E;
@@
-if(E) { free(E); }
+free(E);
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This patch only changes the API, not the implementation of the
devPrivates infrastructure. This will permit a new devPrivates
implementation to be layed into the server without requiring
simultaneous changes in every devPrivates user.
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This is a combination of a huge mechanical patch and a few small
fixups required to finish the job. They were reviewed separately, but
because the server does not build without both pieces, I've merged
them together at this time.
The mechanical changes were performed by running the included
'fix-region' script over the whole tree:
$ git ls-files | grep -v '^fix-' | xargs ./fix-region
And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.
$ sh ./fix-patch-whitespace
Thanks to Jamey Sharp for the mighty fine sed-generating sed script.
The hand-done changes involve removing functions from dix/region.c
that duplicate inline functions in include/regionstr.h, along with
their declarations in regionstr.h, mi.h and mispans.h.
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Many references to the dixScreenOrigins array already had the
corresponding screen pointer handy, which meant they usually looked like
"dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead
of keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.
Since dix declared the dixScreenOrigins array, I figure allocating a
screen private for these values is overkill.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
Many references to the WindowTable array already had the corresponding
screen pointer handy, which meant they usually looked like
"WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of
keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.
Since dix uses this data, a screen private entry isn't appropriate.
xf86-video-dummy currently uses WindowTable, so it needs to be updated
to reflect this change.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
Propagate the shape kind all the way to SetShape to avoid performing non-input
operations such as revalidating the tree and generating exposures when only
changing a window's input shape.
Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Acked-by: Aaron Plattner<aplattner@nvidia.com>
Reviewed-by: Daniel Stone<daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
hw/xwin/Makefile.am was referencing this instead of hw/xwin/glx/Makefile.am
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
TryClientEvents already did this; this commit just moves the assignment
one level down so that no event source has to worry about sequence
numbers.
...No event source, that is, except XKB, which inexplicably calls
WriteToClient directly for several events.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This matches the test in TryClientEvents, and is a superset of tests
done by the callers of these functions. The consequence of forgetting
these tests is a server crash, so they're always desirable. In my
opinion, it's better to not require the callers to remember to do these
checks.
For callers that don't do very much work before calling WriteToClient or
WriteEventsToClient, I've removed the redundant checks.
hw/xquartz/xpr/appledri.c has an interesting case: While its check for
"client == NULL" appears redundant with the test in WriteEventsToClient,
it dereferences client to get the sequence number.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
In some cases, an option of "50%" would be preferable over fixed value
configuration - especially if the actual values are autoprobed.
Add a new set of functions to parse percent values from configurations.
The percent value parsing differs slightly - if the option is not to marked
as used (e.g. xf86CheckPercentOption()), no warning is emitted to the log
file if the value is not a percent value. This allows double-options (either
as % or as absolute number) without warnings.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Just let Dispatch() check for a noClientException, rather than making
every single dispatch procedure take care of it.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.
X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
A rewrite of the XWin DDX AIGLX code to actually make it do something useful again
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Change g_ScreenInfo, an array of winScreenInfo elements, from a
static array of MAXSCREENS elements, to a dynamically allocated one
Fix up the validation that -screen option screen numbers are
contiguous from zero (which possibly didn't work correctly before
anyhow)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jamey Sharp<jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Use an instance of the XWin DDX-specific screen info structure to hold
the current default values, to simplify greatly the code for applying
options to all screens and remove all those loops over MAXSCREENS screens
in the command line option processing
Use g_iNumScreens for tracking the current initialized screen count
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
unifdef found some code covered by
which it decided to remove. This patch simply restores that in case
someone wants it back.
Signed-off-by: Keith Packard <keithp@keithp.com>
This patch was created with:
git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done
Signed-off-by: Keith Packard <keithp@keithp.com>
Add $(AM_V_GEN) for sed-based rules so they appear as expected with
automake silent rules, and $(AM_V_at) to completely hide cp/ln/rm
commands which are not prone to fail.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Add $(AM_V_at) to all relink make targets to silence them when automake
silent rules are in use.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Allow the default log location to be configurable (e.g. /var/log),
and use separate logs for each display instance (e.g. XWin.0.log).
Make the type of g_pszLogFile const char*, per os/log.c:LogInit().
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Fix warnings due to prototypes not specifying function arguments
Fix warning with RegQueryValueEx()
Tidy up an include
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Remove some dead code, mostly code made obsolete by mandatory XKB
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Tidy up some cosmetic issues in log strings:
- Add missing '\n'
- Fix some strings starting with '\n'
- Remove '\f' from some log strings
These all just look daft in a log with timestamps.
Also clarify log message about screen origin coordinates
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Fix a thinko in mount option checking.
Use symbolic names for values assigned to binary flag for clarity.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Currently the config and InputClasses are merged together so that the
options from the config backend have the highest priority. This is bad
since it means options such as a default XKB layout set by the backend
cannot be changed by the user.
This patch changes order of precedence to be:
1. xorg.conf
2. xorg.conf.d (later files have higher priority)
3. config backend
In order to allow this ordering, the config parsing has been changed to
read the xorg.conf.d files before xorg.conf. This has the consequence
that the core device picking which looks for the first InputDevice may
not find it in xorg.conf.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The only DDX currently using hotplugging is the xfree86 one and it looks
like it'll stay that way for a bit. Move the initialization to the DDX,
since Xephyr, Xnest, and friends don't need HAL or udev notifications.
Add CloseInput (counterpart to InitInput) to be able to clean up the config
initialization from the DDX as well.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Rename a token to avoid a collision between DEBUG defined via AC_DEFINE
if --enable-debug is configured, and the token for the 'debug' instruction
in the XWin preferences file
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Fedora 12 likes to use a 39x26 animated wait cursor. Avoid spamming
the log with warnings that each frame can't be completely contained
in the 32x32 native cursor
Also reformat log message so it doesn't contain a '\n\t'. I mean,
it's not like we might want to grep the log or something...
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reverts the change which makes parented windows non-resizeable
Because this was trying to do something which we should be doing, as an alternative we
try checking WM_NORMAL_HINTS for windows which shouldn't be resizable
If a window has a maximum size specified, no maximize box
If a window has a fixed size (max size == min size, per EWMH 1.3 Implementation Notes), no resizing frame
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tidying up of other WM detection code when ading SWT/Motif
fix in commit 71519a572f
was rather over-agressive and now allows other WMs to think
they can start when the internal WM is running.
Revert to the behaviour of selecting ButtonPressMask events
as well on the root window, so other WMs will be dissuaded
from starting
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Restructure to group similar options and offer some commentary on those groups
Review option descriptions, clarify and bring up-to-date
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Alphabetize options
Review option descriptions, clarify and bring up to date
Add missing option descriptions
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Treat XSupportsLocale() returning false as non-critical to internal client
theads startup, and issue a warning, not an error
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Report BUILDERSTRING with version information
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Otherwise, this happens lazily after the first keypress, which can lead
to applications which are started from a shell window and inspect the
keyboard state before a character is typed getting the wrong idea about
the desired keymap (e.g. xemacs shows this behaviour)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Look for system.Xwinrc in SYSCONFDIR/X11 (usually /etc/X11)
Rename sample system.Xwinrc file not to have a X11R6 path in it's name
Add makefile install rule for system.XWinrc
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Use the configured vendor web address in the About dialog
Update resources file: rework About dialog, use 'MS Shell Dlg 2'
logical font for all dialogs, add ellipsis to exit option in tray
menu as it (may) trigger another dialog.
Get short vendor name from xwin-config.h, like other configuration
data presented in the About dialog box, rather than creating the
PROJECT_NAME define
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Use manifests to enable XP style controls
(only effective for XP and later and when themes are enabled).
The addition of manifests shouldn't cause compatibility problems with older Windows versions.
Manifest must have execute permissions, otherwise attempts to
execute XWin.exe in the same directory will fail...
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Window placement refinement for multiwindow mode, ensure a window actually
ends up somewhere visible if it tries to create itself offscreen (which
can happen for e.g. if it has a stored position from a different sized
display)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Respect the system's ownership of the clipping region used for shaped windows
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Apply the Windows title wide-character in -multiwindow mode. Windows should now
display correct client X Window titles for locales with wide characters.
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Only detectable on a Cygwin build
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
Add a new command line parameter, -configdir, to specify the config
directory to be used. Rules are the same as -config for root vs. user
privileges.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Currently there is a single file, xorg.conf, for configuring the server.
This works fine most of the time, but it becomes a problem when packages
or system services need to adjust the configuration. Instead, allow
multiple configuration files to live in a directory. Typically this will
be /etc/X11/xorg.conf.d.
Files with a suffix of .conf will be read and added to the server
configuration after xorg.conf. The server won't fall back to using the
auto configuration unless there is no config file and there are no files
in the config directory.
Right now this uses a simpler search template than the config file
search path by not using the command line or environment variable
parameters. The matching code was refactored a bit to make this more
coherent. Any DDX wanting to read the config files will need to call
xf86initConfigFiles before opening/reading them. This is to allow
xf86openConfigFile without xf86openConfigDirFiles and vice-versa.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Convert all calls of CreateNewResourceType to pass name argument
Breaks DIX ABI.
ABI versions bumped:
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Calls RegisterResourceName to record the type name for
use by X-Resource, XACE/SELinux/XTsol, and DTrace.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Workaround a bug in iiimxcf (assuming the WM_STATE atom exists),
which can cause many Solaris clients to simply fail with a BadAtom
error
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Enable clipboard integration by default, can be turned off with -noclipboard.
We still accept -clipboard for backwards compatibility. If both are passed,
the last one is accepted (just as other arguments are handled).
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Setup screen layout according to the screen window native window
positions in Xinerama mode
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Mount options have changed in cygwin-1.7
Also fix a typo in the warning issued if /tmp is a textmode mount
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Apparently, fake keypresses generated by speech recognizers may not bother
with a scan code, so look up what scan code corresponds to the virtual key
code if this occurs.
Patch by Paul Loewenstein <paul.loewenstein@gmail.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Don't conditionalize use of an authorization cookie for internal client
threads on XCSECURITY, always use one (this avoids certain problems
with XDMCP setups where the XDMCP host removes localhost from the access
list etc.)
Conditionalize the use of a XCSECURITY authorization descriptor on XCSECURITY
Consolidate the various places where the authorization cookie is set
for internal threads into a new function, winSetAuthorization()
Use authorization cookie for multiwindow WM X message thread as well
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Tidy up code for initial native window positioning and avoid a
duplicate call to winMultiWindowGetTransientFor()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
XConvertSelection() in libX11 always returns 1, so there is no point in
testing it incorrectly against Success. This is possibly a bug in
XConvertSelection()
This should fix UTF8String and CompoundText selection via the clipboard.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Clearly diagnose a timeout while waiting for SelectionNotify event
in the clipboard integration internal client.
(which seems to be behind some of the reported failures)
Turn useless #if 0/ErrorF()/#endif into useful winDebug()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
SWT/Motif expects all top-level windows to get reparented, and waits until they
do. So workaround that in our internal WM by forcing a reparent event to
occur, even though we don't actually need to reparent the window to
frame it (as the frame is a native window, not an X window)
http://sourceware.org/bugzilla/show_bug.cgi?id=9848https://bugs.eclipse.org/bugs/show_bug.cgi?id=36806
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tidy up code for detecting another WM is already running
Fix typo g_fAnotherWMRunnig -> g_fAnotherWMRunning
Remove some unused event mask macros
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Add a new option to configuration file: FORCEEXIT, like SILENTEXIT
but ignores the client count. Unsaved client work may be lost with
this option but it is useful if you want no dialogs.
Add description of this new keyword to XWinrc man page
Also fix grammar of the exit confirmation dialog warning to be correct
when there is only one(1) client connected.
Also rearrange yacc tokens to one per line to make future merges
easier
Also amend default system.XWinrc so that SILENTEXIT is on by default
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion(), as
they are in screen coordindates and may need to be scaled to the axis range
appropriately
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Avoid a null pointer dereference if WM_MOUSEMOVE occurred before
the input device had been initialized (a timing sensitive bug
occassionally seen during initialization)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Make -logverbose affect the verbosity of logging to the log file, not just the
verbosity of logging to the console
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Remove the obsolete DISCARDABLE flag in the .rc file
Replace the obsolete DIALOG resource with DIALOGEX in the .rc file
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
The rootless extension now directly calls some Xplugin functions, and relies
on types defined in Xplugin.h, which isn't very abstracted :-)
This patch is a start at abstracting some of the Xplugin specific stuff which
has crept into rootlessWindow.c. This has been done in a pretty mindless fashion,
without much thought as to if the additions to the generic rootless interface are
the correct ones
There is some confusion as to if RootlesscolormapCallback() returns a Bool or
xp_error_enum value (not so abstact), but I have no way of checking, of finding
out if Xplugin actually checks the result :-)
Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
fd.o bugzilla #4491
originally from a patch by Joe Krahn <jkrahn@nc.rr.com>
Convert a NET_WM_ICON to a native icon by converting to a native
bitmap and then using CreateIconIndirect()
Don't use icon alpha on Windows 2000 or if display isn't 32-bit, convert
alpha channel to a 1-bit transparency mask using a threshold value
Fix warning in winScaleXBitmapToWindows() about signedness of *iconData
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Get/SetWindowLong() is superseded by Get/SetWindowLongPtr(), so change to
using that everywhere it remains
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
A few tweaks to winUpdateWindowPosition():
* Don't allow window decoration to disappear off to top or left edge of the
display as a result of adjustments to add decoration for the window style
* Honour the position requested by window geometry for the client area (so
windows which save their position don't get moved by the decoration width
every time they are created) (unless we need to bump it away from top or left edges)
* Fix an issue with initial window placement being offscreen on multimonitor
systems when some monitors have negative coordinates (are to the left of or
above the primary monitor)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Remove frames from 'dock' windows and make them topmost in -multiwindow mode.
Remove frames from windows with MOTIF_WM_HINTS of no decorations in -multiwindow mode.
Apply some _NET_WM_STATE hints in -multiwindow mode.
Apply window styles overrides from .rc file
Correctly update region of shaped windows when applying styles
Copyright (C) Colin Harrison 2005-2009
http://www.straightrunning.com/XmingNotes/http://sourceforge.net/projects/xming/
from fd.o Bugzilla #4491:
There is no point in having one class for every window, aside from trying to
set custom icons via the class, which we no longer do, so converted to using
a single class for all client windows.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Build and link with rootless extension
Update Xwin code for removal of RootlessAccelInit()
Fix Xwin code which now has a collision with the type name EventType
Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Handle and ignore WM_ERASEBKGND since we repaint the entire invalidated region anyhow
(this avoids a white flickering on window resize)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Mouse pointer warping in multiwindow/rootless mode was never implemented,
due to concerns that moving the mouse pointer without asking might be rude
This patch allows X applications to move the mouse pointer in rootless modes,
Let's hope they don't abuse this privilege ;-)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
In -multiwindow mode, tell Windows we wish to capture the mouse when a button
is down. This causes Windows to continue to send movement events for the mouse
even if the mouse pointer moves outside the window frame.
This helps greatly with undecorated windows which have regions you can grab
to move (e.g. gmplayer, xine control panels) or resize (e.g. Songbird) the
window, as it means the window continues to receive the mouse motion even if the
mouse pointer moves out of the window (which presumably happens if we don't
manage to update the window fast enough to track the mouse pointer)
Consolidate the multiple instances of the code to start the mouse position
polling timer into a new function winStartMousePolling(), and use that to
restart the polling timer when we release the mouse.
Also, start the timer on WM_SHOW, so that xeyes will track the mouse position
when it is first shown, even if the mouse doesn't enter it's window
(You probably need focus-stealing turned off to see this problem)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Make the logic simpler for the ownership release of the Windows
clipboard in winclipboardwrappers.c - We've already marked a selection
as unowned if it is owned by our clipboard window
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Remove a bodge to avoid collision between X header and the native
Win32 API definitions of ATOM, use X11/Xwindows.h which exists to
address these issues
Consequently, include misc.h in winclipboardthread.c, to provide the
max() macro, as previously we were using the the one from windows.h
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Update icons directly to windows rather than modifying
the window's class. Respect custom icons overriden via
the configuration file.
fd.o bugzilla #4491
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Changed windialogs.c to set icons via window properties rather than class
properties, and use LoadImage() for small icons, because LoadIcon() can only open
large icons. Since this code is redundant across the dialogs, I put it in the
winCenterDialog function, along with a few other redundant instructions, and
renamed in winInitDialog().
Also, don't bogusly put our dialogs at the center of the virtual desktop if we
are on a multimonitor system (this causes the dialog to end up split across two
monitors in a dual-monitor side-by-side setup)
Corrections to use HWND_TOPMOST instead of HWND_TOP and not to use SWP_NOZORDER
from Colin Harrison
fd.o bugzilla #4491
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Commit 987579c930 moves main.c into
into libmain.a to be linked with separately, and updates the various
DDXs to link with libmain.a, except Xwin, which also needs this change.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Fix keyboard layout mapping table entry for Windows keyboard layout 0x80a
(Latin American), layout should (now) be 'latam', not 'la' which is Laos
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
An update to the keyboard layout mapping table which updates some no longer valid keyboard layout names
(e.g. de_CH -> ch -variant de) and adds a few more reported layouts
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Function 'winProcessXEventsTimeout()' is declared 'static Bool' and
defined 'static int' (correct) in 'winclipboardwndproc.c'. This has been
wrong since dot, but luckily was of no significance
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>