Commit Graph

22 Commits

Author SHA1 Message Date
James Cloos
04211c3532 Prevent the -wm command line option from causing a SEGV
The -wm (when mapped) option for the BackingStore support has been
causing the server to dereference a NULL pointer.

This has probably been the case since backing store has been
implemented on top of Composite.

It looks like (some of?) Composite didn’t expect its WIndowPtr
argument to be the root window.

In Composite’s compCheckRedirect() function we now avoid calling
compAllocPixmap() and compFreePixmap() when the pWin pointer’s
parent member is NULL, as is it the case with a server’s root window.

This addresses:

https://bugs.freedesktop.org/show_bug.cgi?id=15878
2008-05-12 03:03:13 -04:00
James Cloos
7e768c08f7 Clean up whitespace 2008-05-12 02:53:59 -04:00
Eamon Walsh
27bcf40cda XACE: Fix instances of DixUnknownAccess at hook callsites. 2008-02-28 16:43:43 -05:00
Maarten Maathuis
70c0592a97 Resize composite overlay window when the root window changes.
- This allows some compositing managers to work, even after randr12 has changed the root window size.
- Thanks to ajax for figuring out the best place to put this.
- Example:
	- xf86RandR12SetMode() calls EnableDisableFBAccess().
	- That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize().
	- The final step is the call to PositionWindow().
2008-02-17 11:21:01 +01: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
Keith Packard
f98dfec79d [COMPOSITE] Composite used for pixmap population on redirect. (Bug #7447)
compNewPixmap copies bits from the parent window to the redirected child
pixmap to populate the pixmap with reasonable data. It cannot always use
CopyArea as that only works across matching depths. Use Composite when
the depths do not match.
2007-09-01 21:14:22 -07:00
Michel Dänzer
5957aa6fdc Fix regression from recent composite changes.
One pWin->redirectDraw test was converted incorrectly, causing incorrect
rendering in some cases.
2007-07-09 08:47:05 +02:00
Keith Packard
866f092ca0 Make Composite manual redirect windows not clip their parent.
This patch changes the semantics of manual redirect windows so that they no
longer affect the clip list of their parent. Doing this means the parent can
draw to the area covered by the child without using IncludeInferiors. More
importantly, this also means that the parent receives expose events when
that region is damaged by other actions.
2007-07-03 14:29:11 -07:00
Adam Jackson
4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Eamon Walsh
04c721854f Convert callers of LookupWindow() to dixLookupWindow(). 2006-12-15 14:19:54 -05:00
Aaron Plattner
462bb61b0f Add CompositeRegisterAlternateVisuals.
This provides drivers the ability to add their own alternate visuals and then
register them with Composite for implicit redirection.
2006-08-08 18:41:30 -07:00
Deron Johnson
e31e8ace10 Fix composite overlay window bug 6411 2006-03-29 17:51:54 +00:00
Deron Johnson
450018f48b Part 3 of 3 (Other parts are in proto and lib) Composite Version 0.3:
CompositeGetOverlayWindow, CompositeReleaseOverlayWindow Xfixes Version
    4.0: XFixesHideCursor, XFixesShowCursor
2006-03-13 21:59:55 +00:00
Daniel Stone
46b64bd5c6 Fix more include paths; add dix-config.h to XKB code. 2005-07-03 07:37:35 +00:00
Daniel Stone
e03198972c Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
    source files in the xserver/xorg tree, predicated on defines of
    HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
    <X11/fonts/foo.h>.
2005-07-03 07:02:09 +00:00
Keith Packard
9da0c214ab Clip destination instead of source. Should be the same, but it looks nicer
to me.
Clean up transition between cheap and expensive GC wrappers by using the
    prologue and epilogue macros. Before, the GC would be left unvalidated
    sometimes which would cause all kinds of entertaining bugs against a
    DDX which cares (XAA).
2004-08-15 21:13:11 +00:00
Keith Packard
a68f350195 Remove debugging code which did a full tree walk on every window operation
Eliminate needless (and, it turns out, dangerous) call to ChangeGC on
    DestroyGCPrivate.
in cwSetWindowPixmap, check if the pixmap is the screen pixmap and disable
    the wrapper by setting the private to NULL.
2004-08-15 19:05:01 +00:00
Keith Packard
9433085179 Redraw window borders when switching window pixmaps around
Make cw "own" the window pixmaps by wrapping
    GetWindowPixmap/SetWindowPixmap.
2004-08-15 00:43:39 +00:00
Keith Packard
a29bfbd3d0 Empty damage object when freeing pixmap.
Wrap InstallColormap so that the DDX doesn't see colormaps from our ARGB
    visual (avoids lovely green tint to screen). Also, set visual->nplanes
    of ARGB visual to all used (including alpha) planes so DIX can set
    pixel values correctly.
Translate automatic update regions correctly to account for borders
When nplanes == 32 (ARGB visuals), mask in all ones for alpha values to
    allocated pixel values.
Remove redundant fbAddTraps declaration
Fix fbCopyWindow to work on non-screen pixmaps (not needed yet)
Replace broken clipping code with that from modular tree.
Respect subWindowMode.
2004-08-13 08:16:14 +00:00
Eric Anholt
789cf3ed84 Fix some issues reported by deronj:
- Hopefully fix a crash in compCheckRedirect on unrealizing windows.
- Remove an extern that doesn't point at anything.
2004-08-12 07:57:03 +00:00
Keith Packard
9d0213525f Paint to parent window instead of parent window's pixmap (helps for servers
that don't have a pixmap for the root)
Fix offsets for render drawing.
2004-08-12 00:09:30 +00:00
Eric Anholt
d690556d49 Integrate COMPOSITEWRAP branch including composite wrapper. This code still
has several issues, including:
- CopyWindow and PaintWindow wrappers missing (will be done soon)
- Some segfaults seen in the Render wrappers.
- Xprt server build breaks with Composite.
- DDXs must be recompiled for Composite due to VisualRec size change.
- Composite bugs pointed out by Deron Johnson in email.
Also, reorder XFixes initialization according to comments by Keith which
    are also in xserver CVS.
2004-07-31 08:24:14 +00:00