Commit Graph

112 Commits

Author SHA1 Message Date
Nicolas Kaiser
a17c30d43e hw/xwin: remove duplicated includes
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>
2011-04-25 10:45:29 -07:00
Keith Packard
d5b16b037b Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class"
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>
2011-03-17 23:48:52 -07:00
Adam Jackson
1564c82417 dix: Remove usage_hint from pixmaps, store it in ->drawable.class
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>
2011-03-08 13:16:50 -05:00
Jon TURNEY
3f7339a7c5 Cygwin/X: Deal with RANDR depth changes correctly in ShadowGDI drawing engine
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>
2011-01-19 14:02:34 +00:00
Jon TURNEY
8385c426f8 Cygwin/X: Remove WIN_DIB_MAXIMUM_SIZE check
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>
2011-01-19 14:02:31 +00:00
Jon TURNEY
33106e1e80 Cygwin/X: Generate RANDR change on WM_DISPLAYCHANGE for rootless modes
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>
2011-01-19 14:02:26 +00:00
Jon TURNEY
85c497a8b6 Cygwin/X: Implement framebuffer resizing in RANDR extension
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>
2011-01-19 14:02:23 +00:00
Jon TURNEY
873abef315 Cygwin/X: Add -resize command line option
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>
2011-01-19 14:02:22 +00:00
Jon TURNEY
73b02e9647 Cygwin/X: Remove an attempt at detecting if WM_DISPLAYCHANGE affects the X screen
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>
2011-01-19 14:02:19 +00:00
Jon TURNEY
a46146af5f Cygwin/X: Rather than storing calculated physical display sizes, calculate them when needed
(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>
2011-01-19 14:02:17 +00:00
Jon TURNEY
df51800127 Cygwin/X: Refactor framebuffer allocation/release in drawing engines
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>
2011-01-19 14:02:16 +00:00
Jon TURNEY
708d0b9781 Cygwin/X: Enable building of nativegdi and primaryfb engines to avoid further rusting
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>
2011-01-19 14:02:14 +00:00
Alan Coopersmith
03e8bfa1d1 Convert existing Xprintf style calls to asprintf style
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Jon TURNEY
25801a2556 Cygwin/X: Move duplicate extern variable declarations from various .c files to a new header file
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>
2010-10-19 15:02:00 +01:00
Jon TURNEY
5e896e425f Cygwin/X: Make g_hmodCommonControls static
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>
2010-10-19 15:01:56 +01:00
Jon TURNEY
49b996faad Cygwin/X: Make g_hmodDirectDraw static
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>
2010-10-19 15:01:55 +01:00
Jamey Sharp
2079853632 rootless: Delete dead remnants of rootless acceleration.
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>
2010-09-13 15:58:08 -07:00
Colin Harrison
37734ba79c XWin: Fixes for devPrivates API change
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>
2010-06-22 11:06:30 -07:00
Keith Packard
faeebead7b Change the devPrivates API to require dixRegisterPrivateKey
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>
2010-06-05 19:23:03 -07:00
Pierre-Loup A. Griffais
643cb6e87c Only deal with input code when changing the input shape.
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>
2010-06-02 21:11:31 -07:00
Mikhail Gusarov
3f3ff971ec Replace X-allocation functions with their C89 counterparts
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>
2010-05-13 00:22:37 +07:00
Jon TURNEY
a7d398e545 Xwin: make screens structures run-time adjustable
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>
2010-04-23 15:59:49 +03:00
Jon TURNEY
d8454ae488 Xwin: Simplify screen option processing
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>
2010-04-23 15:55:17 +03:00
Keith Packard
28b7b2b8d0 unifdef -B -DRENDER to always include RENDER code
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>
2010-04-19 09:26:10 -07:00
Colin Harrison
cca4952d75 Xming: Warning fixes
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>
2010-03-16 13:56:58 +00:00
Jon TURNEY
0866322b57 Cygwin/X: Always use an authorization cookie for internal clients
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>
2009-11-09 20:33:44 +00:00
Jon TURNEY
9955252564 Cygwin/X: Remove unused TimeSinceLastInputEvent()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-05-27 14:14:10 +01:00
Jon TURNEY
5ff289834d Cygwin/X: Place prototype for winSelectIcons() in a header file
Fixes warning as prototype is now in scope for the definition

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-02-12 12:05:53 +00:00
Jon TURNEY
ab2c98b86f Cygwin/X: Place prototypes for winCheckKeyPressed() and winFixShiftKeys() in a header file
Fixes warnings as they are now in scope at the definition

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-02-12 12:05:13 +00:00
Colin Harrison
6f065a26db Xming: Reduce MOUSE_POLLING_INTERVAL
Reduce MOUSE_POLLING_INTERVAL from 500ms to 50ms

In -multiwindow mode, this determines how quickly X windows can track the mouse
when it is outside any X window... Move the cursor around an xeyes, and you will
see what this timing effects.
2009-01-15 21:49:52 +00:00
Jon TURNEY
2850f26bb2 Cygwin/X: update for changes to shadow framebuffer
Bring Cygwin/X up to date with the change to damage-based shadow framebuffer.

Register the screen bitmap as the shadow framebuffer after screen resources
are created.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2008-12-17 13:37:38 +00:00
Jon TURNEY
35d7602830 Cygwin/X: enqueue a pointer motion event on mouse movement
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2008-12-17 13:37:38 +00:00
Jon TURNEY
bca7483c4e Cygwin/X: update for MPX device changes
Bring Cygwin/X up to date with MPX device API changes

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2008-12-17 13:37:36 +00:00
Peter Hutterer
cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.

Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.

Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-12 11:43:32 +10:00
Adam Jackson
d6228cb22a Shape extension is built-in and mandatory. 2008-07-24 15:46:08 -04:00
Eamon Walsh
a52c9b2a59 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/dispatch.c
	dix/property.c
	hw/xfree86/common/xf86VidMode.c
	include/xkbsrv.h
	render/glyph.c
	xkb/xkbActions.c
2007-11-05 19:08:36 -05:00
Aaron Plattner
f2e310132f Add CreatePixmap allocation hints.
These hints allow an acceleration architecture to optimize allocation of certain
types of pixmaps, such as pixmaps that will serve as backing pixmaps for
redirected windows.
2007-11-04 16:11:28 -08:00
Eamon Walsh
97c150b61b Merge branch 'master' into XACE-SELINUX
Conflicts:

	afb/afbpntwin.c
	afb/afbscrinit.c
	afb/afbwindow.c
	cfb/cfb.h
	cfb/cfballpriv.c
	cfb/cfbscrinit.c
	cfb/cfbwindow.c
	configure.ac
	fb/wfbrename.h
	hw/xfree86/xf4bpp/ppcIO.c
	hw/xfree86/xf4bpp/ppcPntWin.c
	hw/xfree86/xf4bpp/ppcWindow.c
	hw/xfree86/xf8_32bpp/cfbscrinit.c
	mfb/mfb.h
	mfb/mfbpntwin.c
	mfb/mfbscrinit.c
	mfb/mfbwindow.c
	mi/miexpose.c

Note: conflicts caused by devPrivates rework vs. paintwindow changes.
2007-09-19 07:25:55 -04:00
Eric Anholt
e4d11e58ce Remove the PaintWindow optimization.
This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive.  This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it.  No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
2007-09-13 00:08:53 +00:00
Eamon Walsh
4017d31902 devPrivates rework: since API is already broken, switch everything
over to new system.

Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
2007-08-28 09:28:25 -04:00
Adam Jackson
0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Alexander Gottwald
508cdb5cb0 Include xwin-config.h if HAVE_XWIN_CONFIG is defined Cleanup X11 includes
handling Warning fixes
2005-07-04 22:10:43 +00:00
Alexander Gottwald
1cb18a4bad Workaround bug in pthread.h 2005-05-25 12:14:29 +00:00
Daniel Stone
292c4cff26 Fix includes right throughout the Xserver tree:
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h;
change "foo.h", "extensions/foo.h" and "X11/foo.h" to
    <X11/extensions/foo.h> for extension headers, e.g. Xv.h;
change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
2005-04-20 12:25:48 +00:00
Alexander Gottwald
8df7126f09 win.h
winfont.c
winmultiwindowshape.c
winmultiwindowwindow.c
winpfbdd.c
winshaddd.c
winshadddnl.c
winshadgdi.c
Fix incorrect wrapping of functions. Ensure the pointers from pScreen point
    to the called function even if wrapped functions changed it
Set the window properties to NULL to avoid referencing freed memory because
    of timing problems after deleting a window
Do not wrap ChangeWindowAttributes. All functions are noops currently
2005-02-12 14:47:17 +00:00
Alexander Gottwald
081b33d73f import changes from CYGWIN branch 2004-12-08 15:48:15 +00:00
Alexander Gottwald
531776becf missed another wBOOL issue 2004-12-05 21:33:23 +00:00
Alexander Gottwald
9bd1328c49 redone ddraw.h to be able to mix it with w32api style COM header files.
obj_base.h is not needed anymore. Using <objbase.h> instead.
Use Xwindows.h instead of windows.h
do not include win_ms.h
remove extra definition of sleep()
Set HOME to Documents and Settings/username if not set
Use Xming basedir instead of ProjectRoot for system.XWinrc
Fix callback functions to use wBOOL instead of BOOL
Fix compiler warnings. Added debug output.
Fix warning about undefined macro max
2004-12-05 21:24:48 +00:00
Alexander Gottwald
f264a7ea74 Removed scprintf, aprintf and snprintf stuff and use newXprintf 2004-12-03 12:04:15 +00:00
Alexander Gottwald
9826b83826 Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added
mingw (Win32) port
2004-11-15 15:06:51 +00:00
Kensuke Matsuzaki
1aef106064 Add InternalWM mode. 2004-11-04 11:52:22 +00:00
Alexander Gottwald
9d4823adc8 Import recent changes from CYGWIN branch 2004-10-28 14:23:08 +00:00
Alexander Gottwald
c4083511ac add support for mice with more than 3 buttons and one scroll wheel (Chris
B)
2004-09-15 17:58:50 +00:00
Alexander Gottwald
d638a50f3f adjust prototype for winInitCmapPrivates to match Egberts change. 2004-07-31 18:33:56 +00:00
Alexander Gottwald
d6e8b1affe Bug 777: Merge from CYGWIN branch 2004-06-21 13:19:32 +00:00
Egbert Eich
2fb5886200 Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
Egbert Eich
dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich
867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich
df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich
147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley
adc7f9a4eb XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:29:01 +00:00
Kaleb Keithley
9508a382f8 Initial revision 2003-11-14 16:48:57 +00:00