xserver 1.11rc2
This commit is contained in:
parent
f79834a16d
commit
82739d88d5
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ xorg-server-1.9.1.tar.bz2
|
||||
/xorg-server-1.10.0.tar.bz2
|
||||
/xorg-server-20110418.tar.xz
|
||||
/xorg-server-20110510.tar.xz
|
||||
/xorg-server-20110818.tar.xz
|
||||
|
2
commitid
2
commitid
@ -1 +1 @@
|
||||
5cb31cd0cbf83fff5f17a475e7b0e45246b19bf3
|
||||
ac2c307f4716ebd3e955c004ceec9f4c029401a0
|
||||
|
1
sources
1
sources
@ -1 +1,2 @@
|
||||
057d7e203b21055711e545373d07c5d6 xorg-server-20110510.tar.xz
|
||||
4e9245e6a9a7e71d2176d8d8e85c7ec4 xorg-server-20110818.tar.xz
|
||||
|
@ -17,24 +17,23 @@
|
||||
# because rpm is a terrible language. HTFU.
|
||||
%define ansic_major 0
|
||||
%define ansic_minor 4
|
||||
%define videodrv_major 10
|
||||
%define videodrv_major 11
|
||||
%define videodrv_minor 0
|
||||
%define xinput_major 12
|
||||
%define xinput_minor 2
|
||||
%define xinput_major 13
|
||||
%define xinput_minor 0
|
||||
%define extension_major 5
|
||||
%define extension_minor 0
|
||||
|
||||
%define pkgname xorg-server
|
||||
%define gitdate 20110510
|
||||
%define gitdate 20110818
|
||||
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.10.99.1
|
||||
Release: 10%{?gitdate:.%{gitdate}}%{dist}
|
||||
Version: 1.10.99.902
|
||||
Release: 1%{?gitdate:.%{gitdate}}%{dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
#VCS: git:git://git.freedesktop.org/git/xorg/xserver
|
||||
%if 0%{?gitdate}
|
||||
@ -81,8 +80,6 @@ Patch6030: xserver-1.6.99-right-of.patch
|
||||
# fallback to vesa when module is missing seems broken
|
||||
Patch6053: xserver-1.8-disable-vboxvideo.patch
|
||||
|
||||
# misc
|
||||
Patch7006: xserver-1.10-pointer-barriers.patch
|
||||
# tests require Xorg
|
||||
Patch7007: xserver-1.10.99.1-test.patch
|
||||
|
||||
@ -392,18 +389,11 @@ install -m 755 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}
|
||||
# Make the source package
|
||||
%define xserver_source_dir %{_datadir}/xorg-x11-server-source
|
||||
%define inst_srcdir %{buildroot}/%{xserver_source_dir}
|
||||
mkdir -p %{inst_srcdir}/{doc/xml{,/dtrace},Xext,xkb,GL,hw/{xquartz/bundle,xfree86/common}}
|
||||
mkdir -p %{inst_srcdir}/{hw/dmx/doc,doc/man}
|
||||
cp {,%{inst_srcdir}/}doc/xml/xmlrules.in
|
||||
cp {,%{inst_srcdir}/}doc/xml/xmlrules-noinst.in
|
||||
cp {,%{inst_srcdir}/}doc/xml/xmlrules-inst.in
|
||||
cp {,%{inst_srcdir}/}doc/xml/xserver.ent.in
|
||||
cp {,%{inst_srcdir}/}doc/xml/Xserver-spec.xml
|
||||
cp {,%{inst_srcdir}/}doc/xml/dtrace/Xserver-DTrace.xml
|
||||
mkdir -p %{inst_srcdir}/{Xext,xkb,GL,hw/{xquartz/bundle,xfree86/common}}
|
||||
mkdir -p %{inst_srcdir}/{hw/dmx/doc,man,doc}
|
||||
cp {,%{inst_srcdir}/}hw/xquartz/bundle/cpprules.in
|
||||
cp {,%{inst_srcdir}/}doc/man/Xserver.man
|
||||
cp {,%{inst_srcdir}/}man/Xserver.man
|
||||
cp {,%{inst_srcdir}/}doc/smartsched
|
||||
cp {,%{inst_srcdir}/}hw/dmx/doc/doxygen.conf.in
|
||||
cp xkb/README.compiled %{inst_srcdir}/xkb
|
||||
cp hw/xfree86/xorgconf.cpp %{inst_srcdir}/hw/xfree86
|
||||
cp hw/xfree86/common/{vesamodes,extramodes} %{inst_srcdir}/hw/xfree86/common
|
||||
@ -560,6 +550,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{xserver_source_dir}
|
||||
|
||||
%changelog
|
||||
* Thu Aug 18 2011 Adam Jackson <ajax@redhat.com> 1.10.99.902-1.20110818
|
||||
- xserver 1.11rc2
|
||||
|
||||
* Fri Jul 29 2011 Dave Airlie <airlied@redhat.com> 1.10.99.1-10.2011051
|
||||
- xvfb-run requires xauth installed, fix requires (from jlaska on irc)
|
||||
|
||||
|
@ -1,645 +0,0 @@
|
||||
From ad2c48ab05d9415aa384eda6be52576525a3abcf Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Thu, 17 Mar 2011 13:56:17 -0400
|
||||
Subject: [PATCH] CRTC confine and pointer barriers
|
||||
|
||||
---
|
||||
include/protocol-versions.h | 2 +-
|
||||
xfixes/cursor.c | 408 ++++++++++++++++++++++++++++++++++++++++++-
|
||||
xfixes/xfixes.c | 24 ++-
|
||||
xfixes/xfixes.h | 17 ++
|
||||
xfixes/xfixesint.h | 16 ++
|
||||
6 files changed, 458 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/include/protocol-versions.h b/include/protocol-versions.h
|
||||
index 8692ded..7b7a9f5 100644
|
||||
--- a/include/protocol-versions.h
|
||||
+++ b/include/protocol-versions.h
|
||||
@@ -122,7 +122,7 @@
|
||||
#define SERVER_XF86VIDMODE_MINOR_VERSION 2
|
||||
|
||||
/* Fixes */
|
||||
-#define SERVER_XFIXES_MAJOR_VERSION 4
|
||||
+#define SERVER_XFIXES_MAJOR_VERSION 5
|
||||
#define SERVER_XFIXES_MINOR_VERSION 0
|
||||
|
||||
/* X Input */
|
||||
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
|
||||
index fb608f6..5c55c95 100644
|
||||
--- a/xfixes/cursor.c
|
||||
+++ b/xfixes/cursor.c
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright 2010 Red Hat, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -50,13 +51,16 @@
|
||||
#include "cursorstr.h"
|
||||
#include "dixevents.h"
|
||||
#include "servermd.h"
|
||||
+#include "mipointer.h"
|
||||
#include "inputstr.h"
|
||||
#include "windowstr.h"
|
||||
#include "xace.h"
|
||||
+#include "list.h"
|
||||
|
||||
static RESTYPE CursorClientType;
|
||||
static RESTYPE CursorHideCountType;
|
||||
static RESTYPE CursorWindowType;
|
||||
+RESTYPE PointerBarrierType;
|
||||
static CursorPtr CursorCurrent[MAXDEVICES];
|
||||
|
||||
static DevPrivateKeyRec CursorScreenPrivateKeyRec;
|
||||
@@ -107,6 +111,14 @@ typedef struct _CursorHideCountRec {
|
||||
XID resource;
|
||||
} CursorHideCountRec;
|
||||
|
||||
+typedef struct PointerBarrierClient *PointerBarrierClientPtr;
|
||||
+
|
||||
+struct PointerBarrierClient {
|
||||
+ ScreenPtr screen;
|
||||
+ struct PointerBarrier barrier;
|
||||
+ struct list entry;
|
||||
+};
|
||||
+
|
||||
/*
|
||||
* Wrap DisplayCursor to catch cursor change events
|
||||
*/
|
||||
@@ -114,7 +126,9 @@ typedef struct _CursorHideCountRec {
|
||||
typedef struct _CursorScreen {
|
||||
DisplayCursorProcPtr DisplayCursor;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
+ ConstrainCursorHarderProcPtr ConstrainCursorHarder;
|
||||
CursorHideCountPtr pCursorHideCounts;
|
||||
+ struct list barriers;
|
||||
} CursorScreenRec, *CursorScreenPtr;
|
||||
|
||||
#define GetCursorScreen(s) ((CursorScreenPtr)dixLookupPrivate(&(s)->devPrivates, CursorScreenPrivateKey))
|
||||
@@ -184,9 +198,11 @@ CursorCloseScreen (int index, ScreenPtr pScreen)
|
||||
Bool ret;
|
||||
CloseScreenProcPtr close_proc;
|
||||
DisplayCursorProcPtr display_proc;
|
||||
+ ConstrainCursorHarderProcPtr constrain_proc;
|
||||
|
||||
Unwrap (cs, pScreen, CloseScreen, close_proc);
|
||||
Unwrap (cs, pScreen, DisplayCursor, display_proc);
|
||||
+ Unwrap (cs, pScreen, ConstrainCursorHarder, constrain_proc);
|
||||
deleteCursorHideCountsForScreen(pScreen);
|
||||
ret = (*pScreen->CloseScreen) (index, pScreen);
|
||||
free(cs);
|
||||
@@ -1029,6 +1045,391 @@ CursorFreeWindow (pointer data, XID id)
|
||||
return 1;
|
||||
}
|
||||
|
||||
+static BOOL
|
||||
+barrier_is_horizontal(const struct PointerBarrier *barrier)
|
||||
+{
|
||||
+ return barrier->y1 == barrier->y2;
|
||||
+}
|
||||
+
|
||||
+static BOOL
|
||||
+barrier_is_vertical(const struct PointerBarrier *barrier)
|
||||
+{
|
||||
+ return barrier->x1 == barrier->x2;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * @return The set of barrier movement directions the movement vector
|
||||
+ * x1/y1 → x2/y2 represents.
|
||||
+ */
|
||||
+int
|
||||
+barrier_get_direction(int x1, int y1, int x2, int y2)
|
||||
+{
|
||||
+ int direction = 0;
|
||||
+
|
||||
+ /* which way are we trying to go */
|
||||
+ if (x2 > x1)
|
||||
+ direction |= BarrierPositiveX;
|
||||
+ if (x2 < x1)
|
||||
+ direction |= BarrierNegativeX;
|
||||
+ if (y2 > y1)
|
||||
+ direction |= BarrierPositiveY;
|
||||
+ if (y2 < y1)
|
||||
+ direction |= BarrierNegativeY;
|
||||
+
|
||||
+ return direction;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Test if the barrier may block movement in the direction defined by
|
||||
+ * x1/y1 → x2/y2. This function only tests whether the directions could be
|
||||
+ * blocked, it does not test if the barrier actually blocks the movement.
|
||||
+ *
|
||||
+ * @return TRUE if the barrier blocks the direction of movement or FALSE
|
||||
+ * otherwise.
|
||||
+ */
|
||||
+BOOL
|
||||
+barrier_is_blocking_direction(const struct PointerBarrier *barrier, int direction)
|
||||
+{
|
||||
+ /* Barriers define which way is ok, not which way is blocking */
|
||||
+ return (barrier->directions & direction) != direction;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Test if the movement vector x1/y1 → x2/y2 is intersecting with the
|
||||
+ * barrier. A movement vector with the startpoint or endpoint on the barrier
|
||||
+ * itself counts as intersecting.
|
||||
+ *
|
||||
+ * @param x1 X start coordinate of movement vector
|
||||
+ * @param y1 Y start coordinate of movement vector
|
||||
+ * @param x2 X end coordinate of movement vector
|
||||
+ * @param y2 Y end coordinate of movement vector
|
||||
+ * @param[out] distance The distance between the start point and the
|
||||
+ * intersection with the barrier (if applicable).
|
||||
+ * @return TRUE if the barrier intersects with the given vector
|
||||
+ */
|
||||
+BOOL
|
||||
+barrier_is_blocking(const struct PointerBarrier *barrier,
|
||||
+ int x1, int y1, int x2, int y2,
|
||||
+ double *distance)
|
||||
+{
|
||||
+ BOOL rc = FALSE;
|
||||
+ float ua, ub, ud;
|
||||
+ int dir = barrier_get_direction(x1, y1, x2, y2);
|
||||
+
|
||||
+ /* Algorithm below doesn't handle edge cases well, hence the extra
|
||||
+ * checks. */
|
||||
+ if (barrier_is_vertical(barrier)) {
|
||||
+ /* handle immediate barrier adjacency, moving away */
|
||||
+ if (dir & BarrierPositiveX && x1 == barrier->x1)
|
||||
+ return FALSE;
|
||||
+ if (dir & BarrierNegativeX && x1 == (barrier->x1 - 1))
|
||||
+ return FALSE;
|
||||
+ /* startpoint on barrier */
|
||||
+ if (x1 == barrier->x1 && y1 >= barrier->y1 && y1 <= barrier->y2) {
|
||||
+ *distance = 0;
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ /* endpoint on barrier */
|
||||
+ if (x2 == barrier->x1 && y2 >= barrier->y1 && y2 <= barrier->y2) {
|
||||
+ *distance = abs(x2 - x1);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* handle immediate barrier adjacency, moving away */
|
||||
+ if (dir & BarrierPositiveY && y1 == barrier->y1)
|
||||
+ return FALSE;
|
||||
+ if (dir & BarrierNegativeY && y1 == (barrier->y1 - 1))
|
||||
+ return FALSE;
|
||||
+ /* startpoint on barrier */
|
||||
+ if (y1 == barrier->y1 && x1 >= barrier->x1 && x1 <= barrier->x2) {
|
||||
+ *distance = 0;
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ /* endpoint on barrier */
|
||||
+ if (y2 == barrier->y1 && x2 >= barrier->x1 && x2 <= barrier->x2) {
|
||||
+ *distance = abs(y2 - y1);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* not an edge case, compute distance */
|
||||
+ ua = 0;
|
||||
+ ud = (barrier->y2 - barrier->y1) * (x2 - x1) - (barrier->x2 - barrier->x1) * (y2 - y1);
|
||||
+ if (ud != 0) {
|
||||
+ ua = ((barrier->x2 - barrier->x1) * (y1 - barrier->y1) -
|
||||
+ (barrier->y2 - barrier->y1) * (x1 - barrier->x1)) / ud;
|
||||
+ ub = ((x2 - x1) * (y1 - barrier->y1) -
|
||||
+ (y2 - y1) * (x1 - barrier->x1)) / ud;
|
||||
+ if (ua < 0 || ua > 1 || ub < 0 || ub > 1)
|
||||
+ ua = 0;
|
||||
+ }
|
||||
+
|
||||
+ if (ua > 0 && ua <= 1)
|
||||
+ {
|
||||
+ double ix = barrier->x1 + ua * (barrier->x2 - barrier->x1);
|
||||
+ double iy = barrier->y1 + ua * (barrier->y2 - barrier->y1);
|
||||
+
|
||||
+ *distance = sqrt(pow(x1 - ix, 2) + pow(y1 - iy, 2));
|
||||
+ rc = TRUE;
|
||||
+ }
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Find the nearest barrier that is blocking movement from x1/y1 to x2/y2.
|
||||
+ *
|
||||
+ * @param dir Only barriers blocking movement in direction dir are checked
|
||||
+ * @param x1 X start coordinate of movement vector
|
||||
+ * @param y1 Y start coordinate of movement vector
|
||||
+ * @param x2 X end coordinate of movement vector
|
||||
+ * @param y2 Y end coordinate of movement vector
|
||||
+ * @return The barrier nearest to the movement origin that blocks this movement.
|
||||
+ */
|
||||
+static struct PointerBarrier*
|
||||
+barrier_find_nearest(CursorScreenPtr cs, int dir,
|
||||
+ int x1, int y1, int x2, int y2)
|
||||
+{
|
||||
+ struct PointerBarrierClient *c;
|
||||
+ struct PointerBarrier *nearest = NULL;
|
||||
+ double min_distance = INT_MAX; /* can't get higher than that in X anyway */
|
||||
+
|
||||
+ list_for_each_entry(c, &cs->barriers, entry) {
|
||||
+ struct PointerBarrier *b = &c->barrier;
|
||||
+ double distance;
|
||||
+
|
||||
+ if (!barrier_is_blocking_direction(b, dir))
|
||||
+ continue;
|
||||
+
|
||||
+ if (barrier_is_blocking(b, x1, y1, x2, y2, &distance))
|
||||
+ {
|
||||
+ if (min_distance > distance)
|
||||
+ {
|
||||
+ min_distance = distance;
|
||||
+ nearest = b;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return nearest;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Clamp to the given barrier given the movement direction specified in dir.
|
||||
+ *
|
||||
+ * @param barrier The barrier to clamp to
|
||||
+ * @param dir The movement direction
|
||||
+ * @param[out] x The clamped x coordinate.
|
||||
+ * @param[out] y The clamped x coordinate.
|
||||
+ */
|
||||
+void
|
||||
+barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, int *y)
|
||||
+{
|
||||
+ if (barrier_is_vertical(barrier)) {
|
||||
+ if ((dir & BarrierNegativeX) & ~barrier->directions)
|
||||
+ *x = barrier->x1;
|
||||
+ if ((dir & BarrierPositiveX) & ~barrier->directions)
|
||||
+ *x = barrier->x1 - 1;
|
||||
+ }
|
||||
+ if (barrier_is_horizontal(barrier))
|
||||
+ {
|
||||
+ if ((dir & BarrierNegativeY) & ~barrier->directions)
|
||||
+ *y = barrier->y1;
|
||||
+ if ((dir & BarrierPositiveY) & ~barrier->directions)
|
||||
+ *y = barrier->y1 - 1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+CursorConstrainCursorHarder(DeviceIntPtr dev, ScreenPtr screen, int mode, int *x, int *y)
|
||||
+{
|
||||
+ CursorScreenPtr cs = GetCursorScreen(screen);
|
||||
+
|
||||
+ if (!list_is_empty(&cs->barriers) && !IsFloating(dev) && mode == Relative) {
|
||||
+ int ox, oy;
|
||||
+ int dir;
|
||||
+ struct PointerBarrier *nearest = NULL;
|
||||
+
|
||||
+ /* where are we coming from */
|
||||
+ miPointerGetPosition(dev, &ox, &oy);
|
||||
+
|
||||
+ /* How this works:
|
||||
+ * Given the origin and the movement vector, get the nearest barrier
|
||||
+ * to the origin that is blocking the movement.
|
||||
+ * Clamp to that barrier.
|
||||
+ * Then, check from the clamped position to the original
|
||||
+ * destination, again finding the nearest barrier and clamping.
|
||||
+ */
|
||||
+ dir = barrier_get_direction(ox, oy, *x, *y);
|
||||
+
|
||||
+ nearest = barrier_find_nearest(cs, dir, ox, oy, *x, *y);
|
||||
+ if (nearest) {
|
||||
+ barrier_clamp_to_barrier(nearest, dir, x, y);
|
||||
+
|
||||
+ if (barrier_is_vertical(nearest)) {
|
||||
+ dir &= ~(BarrierNegativeX | BarrierPositiveX);
|
||||
+ ox = *x;
|
||||
+ } else if (barrier_is_horizontal(nearest)) {
|
||||
+ dir &= ~(BarrierNegativeY | BarrierPositiveY);
|
||||
+ oy = *y;
|
||||
+ }
|
||||
+
|
||||
+ nearest = barrier_find_nearest(cs, dir, ox, oy, *x, *y);
|
||||
+ if (nearest) {
|
||||
+ barrier_clamp_to_barrier(nearest, dir, x, y);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (cs->ConstrainCursorHarder) {
|
||||
+ screen->ConstrainCursorHarder = cs->ConstrainCursorHarder;
|
||||
+ screen->ConstrainCursorHarder(dev, screen, mode, x, y);
|
||||
+ screen->ConstrainCursorHarder = CursorConstrainCursorHarder;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static struct PointerBarrierClient *
|
||||
+CreatePointerBarrierClient(ScreenPtr screen, ClientPtr client,
|
||||
+ xXFixesCreatePointerBarrierReq *stuff)
|
||||
+{
|
||||
+ CursorScreenPtr cs = GetCursorScreen(screen);
|
||||
+ struct PointerBarrierClient *ret = malloc(sizeof(*ret));
|
||||
+
|
||||
+ if (ret) {
|
||||
+ ret->screen = screen;
|
||||
+ ret->barrier.x1 = min(stuff->x1, stuff->x2);
|
||||
+ ret->barrier.x2 = max(stuff->x1, stuff->x2);
|
||||
+ ret->barrier.y1 = min(stuff->y1, stuff->y2);
|
||||
+ ret->barrier.y2 = max(stuff->y1, stuff->y2);
|
||||
+ ret->barrier.directions = stuff->directions & 0x0f;
|
||||
+ if (barrier_is_horizontal(&ret->barrier))
|
||||
+ ret->barrier.directions &= ~(BarrierPositiveX | BarrierNegativeX);
|
||||
+ if (barrier_is_vertical(&ret->barrier))
|
||||
+ ret->barrier.directions &= ~(BarrierPositiveY | BarrierNegativeY);
|
||||
+ list_add(&ret->entry, &cs->barriers);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+ProcXFixesCreatePointerBarrier (ClientPtr client)
|
||||
+{
|
||||
+ int err;
|
||||
+ WindowPtr pWin;
|
||||
+ struct PointerBarrierClient *barrier;
|
||||
+ struct PointerBarrier b;
|
||||
+ REQUEST (xXFixesCreatePointerBarrierReq);
|
||||
+
|
||||
+ REQUEST_SIZE_MATCH(xXFixesCreatePointerBarrierReq);
|
||||
+ LEGAL_NEW_RESOURCE(stuff->barrier, client);
|
||||
+
|
||||
+ err = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
|
||||
+ if (err != Success) {
|
||||
+ client->errorValue = stuff->window;
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ /* This sure does need fixing. */
|
||||
+ if (stuff->num_devices)
|
||||
+ return BadImplementation;
|
||||
+
|
||||
+ b.x1 = stuff->x1;
|
||||
+ b.x2 = stuff->x2;
|
||||
+ b.y1 = stuff->y1;
|
||||
+ b.y2 = stuff->y2;
|
||||
+
|
||||
+ if (!barrier_is_horizontal(&b) && !barrier_is_vertical(&b))
|
||||
+ return BadValue;
|
||||
+
|
||||
+ /* no 0-sized barriers */
|
||||
+ if (barrier_is_horizontal(&b) && barrier_is_vertical(&b))
|
||||
+ return BadValue;
|
||||
+
|
||||
+ if (!(barrier = CreatePointerBarrierClient(pWin->drawable.pScreen,
|
||||
+ client, stuff)))
|
||||
+ return BadAlloc;
|
||||
+
|
||||
+ if (!AddResource(stuff->barrier, PointerBarrierType, &barrier->barrier))
|
||||
+ return BadAlloc;
|
||||
+
|
||||
+ return Success;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+SProcXFixesCreatePointerBarrier (ClientPtr client)
|
||||
+{
|
||||
+ int n;
|
||||
+ REQUEST(xXFixesCreatePointerBarrierReq);
|
||||
+
|
||||
+ swaps(&stuff->length, n);
|
||||
+ REQUEST_SIZE_MATCH(xXFixesCreatePointerBarrierReq);
|
||||
+ swapl(&stuff->barrier, n);
|
||||
+ swapl(&stuff->window, n);
|
||||
+ swaps(&stuff->x1, n);
|
||||
+ swaps(&stuff->y1, n);
|
||||
+ swaps(&stuff->x2, n);
|
||||
+ swaps(&stuff->y2, n);
|
||||
+ swapl(&stuff->directions, n);
|
||||
+ return ProcXFixesVector[stuff->xfixesReqType](client);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+CursorFreeBarrier(void *data, XID id)
|
||||
+{
|
||||
+ struct PointerBarrierClient *b = NULL, *barrier;
|
||||
+ ScreenPtr screen;
|
||||
+ CursorScreenPtr cs;
|
||||
+
|
||||
+ barrier = container_of(data, struct PointerBarrierClient, barrier);
|
||||
+ screen = barrier->screen;
|
||||
+ cs = GetCursorScreen(screen);
|
||||
+
|
||||
+ /* find and unlink from the screen private */
|
||||
+ list_for_each_entry(b, &cs->barriers, entry) {
|
||||
+ if (b == barrier) {
|
||||
+ list_del(&b->entry);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ free(barrier);
|
||||
+ return Success;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+ProcXFixesDestroyPointerBarrier (ClientPtr client)
|
||||
+{
|
||||
+ int err;
|
||||
+ void *barrier;
|
||||
+ REQUEST (xXFixesDestroyPointerBarrierReq);
|
||||
+
|
||||
+ REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq);
|
||||
+
|
||||
+ err = dixLookupResourceByType((void **)&barrier, stuff->barrier,
|
||||
+ PointerBarrierType, client,
|
||||
+ DixDestroyAccess);
|
||||
+ if (err != Success) {
|
||||
+ client->errorValue = stuff->barrier;
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ FreeResource(stuff->barrier, RT_NONE);
|
||||
+ return Success;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+SProcXFixesDestroyPointerBarrier (ClientPtr client)
|
||||
+{
|
||||
+ int n;
|
||||
+ REQUEST(xXFixesDestroyPointerBarrierReq);
|
||||
+
|
||||
+ swaps(&stuff->length, n);
|
||||
+ REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq);
|
||||
+ swapl(&stuff->barrier, n);
|
||||
+ return ProcXFixesVector[stuff->xfixesReqType](client);
|
||||
+}
|
||||
+
|
||||
Bool
|
||||
XFixesCursorInit (void)
|
||||
{
|
||||
@@ -1048,8 +1449,10 @@ XFixesCursorInit (void)
|
||||
cs = (CursorScreenPtr) calloc(1, sizeof (CursorScreenRec));
|
||||
if (!cs)
|
||||
return FALSE;
|
||||
+ list_init(&cs->barriers);
|
||||
Wrap (cs, pScreen, CloseScreen, CursorCloseScreen);
|
||||
Wrap (cs, pScreen, DisplayCursor, CursorDisplayCursor);
|
||||
+ Wrap (cs, pScreen, ConstrainCursorHarder, CursorConstrainCursorHarder);
|
||||
cs->pCursorHideCounts = NULL;
|
||||
SetCursorScreen (pScreen, cs);
|
||||
}
|
||||
@@ -1059,7 +1462,10 @@ XFixesCursorInit (void)
|
||||
"XFixesCursorHideCount");
|
||||
CursorWindowType = CreateNewResourceType(CursorFreeWindow,
|
||||
"XFixesCursorWindow");
|
||||
+ PointerBarrierType = CreateNewResourceType(CursorFreeBarrier,
|
||||
+ "XFixesPointerBarrier");
|
||||
|
||||
- return CursorClientType && CursorHideCountType && CursorWindowType;
|
||||
+ return CursorClientType && CursorHideCountType && CursorWindowType &&
|
||||
+ PointerBarrierType;
|
||||
}
|
||||
|
||||
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
|
||||
index e8c7bf1..de0e4db 100644
|
||||
--- a/xfixes/xfixes.c
|
||||
+++ b/xfixes/xfixes.c
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright 2010 Red Hat, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -47,10 +48,6 @@
|
||||
|
||||
#include "xfixesint.h"
|
||||
#include "protocol-versions.h"
|
||||
-/*
|
||||
- * Must use these instead of the constants from xfixeswire.h. They advertise
|
||||
- * what we implement, not what the protocol headers define.
|
||||
- */
|
||||
|
||||
static unsigned char XFixesReqCode;
|
||||
int XFixesEventBase;
|
||||
@@ -97,11 +94,12 @@ ProcXFixesQueryVersion(ClientPtr client)
|
||||
|
||||
/* Major version controls available requests */
|
||||
static const int version_requests[] = {
|
||||
- X_XFixesQueryVersion, /* before client sends QueryVersion */
|
||||
- X_XFixesGetCursorImage, /* Version 1 */
|
||||
- X_XFixesChangeCursorByName, /* Version 2 */
|
||||
- X_XFixesExpandRegion, /* Version 3 */
|
||||
- X_XFixesShowCursor, /* Version 4 */
|
||||
+ X_XFixesQueryVersion, /* before client sends QueryVersion */
|
||||
+ X_XFixesGetCursorImage, /* Version 1 */
|
||||
+ X_XFixesChangeCursorByName, /* Version 2 */
|
||||
+ X_XFixesExpandRegion, /* Version 3 */
|
||||
+ X_XFixesShowCursor, /* Version 4 */
|
||||
+ X_XFixesDestroyPointerBarrier, /* Version 5 */
|
||||
};
|
||||
|
||||
#define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0]))
|
||||
@@ -142,6 +140,9 @@ int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr) = {
|
||||
/*************** Version 4 ****************/
|
||||
ProcXFixesHideCursor,
|
||||
ProcXFixesShowCursor,
|
||||
+/*************** Version 5 ****************/
|
||||
+ ProcXFixesCreatePointerBarrier,
|
||||
+ ProcXFixesDestroyPointerBarrier,
|
||||
};
|
||||
|
||||
static int
|
||||
@@ -205,6 +206,9 @@ static int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr) = {
|
||||
/*************** Version 4 ****************/
|
||||
SProcXFixesHideCursor,
|
||||
SProcXFixesShowCursor,
|
||||
+/*************** Version 5 ****************/
|
||||
+ SProcXFixesCreatePointerBarrier,
|
||||
+ SProcXFixesDestroyPointerBarrier,
|
||||
};
|
||||
|
||||
static int
|
||||
@@ -260,6 +264,8 @@ XFixesExtensionInit(void)
|
||||
EventSwapVector[XFixesEventBase + XFixesCursorNotify] =
|
||||
(EventSwapPtr) SXFixesCursorNotifyEvent;
|
||||
SetResourceTypeErrorValue(RegionResType, XFixesErrorBase + BadRegion);
|
||||
+ SetResourceTypeErrorValue(PointerBarrierType,
|
||||
+ XFixesErrorBase + BadBarrier);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/xfixes/xfixes.h b/xfixes/xfixes.h
|
||||
index 1638350..5765e64 100644
|
||||
--- a/xfixes/xfixes.h
|
||||
+++ b/xfixes/xfixes.h
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "resource.h"
|
||||
|
||||
extern _X_EXPORT RESTYPE RegionResType;
|
||||
+extern _X_EXPORT RESTYPE PointerBarrierType;
|
||||
extern _X_EXPORT int XFixesErrorBase;
|
||||
|
||||
#define VERIFY_REGION(pRegion, rid, client, mode) \
|
||||
@@ -51,5 +52,21 @@ extern _X_EXPORT int XFixesErrorBase;
|
||||
extern _X_EXPORT RegionPtr
|
||||
XFixesRegionCopy (RegionPtr pRegion);
|
||||
|
||||
+struct PointerBarrier {
|
||||
+ CARD16 x1, x2, y1, y2;
|
||||
+ CARD32 directions;
|
||||
+};
|
||||
+
|
||||
+
|
||||
+extern int
|
||||
+barrier_get_direction(int, int, int, int);
|
||||
+extern BOOL
|
||||
+barrier_is_blocking(const struct PointerBarrier*, int, int, int, int, double*);
|
||||
+extern BOOL
|
||||
+barrier_is_blocking_direction(const struct PointerBarrier*, int);
|
||||
+extern void
|
||||
+barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, int *y);
|
||||
+
|
||||
+
|
||||
|
||||
#endif /* _XFIXES_H_ */
|
||||
diff --git a/xfixes/xfixesint.h b/xfixes/xfixesint.h
|
||||
index d005369..6ba276e 100644
|
||||
--- a/xfixes/xfixesint.h
|
||||
+++ b/xfixes/xfixesint.h
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright 2010 Red Hat, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -278,6 +279,21 @@ ProcXFixesShowCursor (ClientPtr client);
|
||||
int
|
||||
SProcXFixesShowCursor (ClientPtr client);
|
||||
|
||||
+/* Version 5 */
|
||||
+
|
||||
+int
|
||||
+ProcXFixesCreatePointerBarrier (ClientPtr client);
|
||||
+
|
||||
+int
|
||||
+SProcXFixesCreatePointerBarrier (ClientPtr client);
|
||||
+
|
||||
+int
|
||||
+ProcXFixesDestroyPointerBarrier (ClientPtr client);
|
||||
+
|
||||
+int
|
||||
+SProcXFixesDestroyPointerBarrier (ClientPtr client);
|
||||
+
|
||||
+/* Xinerama */
|
||||
extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests])(ClientPtr);
|
||||
void PanoramiXFixesInit (void);
|
||||
void PanoramiXFixesReset (void);
|
||||
--
|
||||
1.7.4.4
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8d9371f9035654cbb694ad51cf384a78b044bb9f Mon Sep 17 00:00:00 2001
|
||||
From 5a555338bf11afb5942daabfdae8638e7aab2ac6 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 18 Jul 2011 21:19:23 +0200
|
||||
Subject: [PATCH] config: add udev/systemd multi-seat support
|
||||
@ -36,16 +36,16 @@ Conflicts:
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
---
|
||||
config/udev.c | 19 +++++++++++++++++++
|
||||
doc/man/Xserver.man | 6 ++++++
|
||||
config/udev.c | 18 ++++++++++++++++++
|
||||
hw/xfree86/common/xf86Init.c | 19 +++++++++++++++++++
|
||||
include/globals.h | 2 +-
|
||||
include/xserver-properties.h | 3 +++
|
||||
man/Xserver.man | 6 ++++++
|
||||
os/utils.c | 10 ++++++++++
|
||||
6 files changed, 58 insertions(+), 1 deletions(-)
|
||||
6 files changed, 57 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/config/udev.c b/config/udev.c
|
||||
index 9ac34ee..ca978b0 100644
|
||||
index e7383dc..fc6ee5d 100644
|
||||
--- a/config/udev.c
|
||||
+++ b/config/udev.c
|
||||
@@ -35,6 +35,7 @@
|
||||
@ -81,9 +81,9 @@ index 9ac34ee..ca978b0 100644
|
||||
if (!udev_device_get_property_value(udev_device, "ID_INPUT")) {
|
||||
LogMessageVerb(X_INFO, 10,
|
||||
"config/udev: ignoring device %s without "
|
||||
@@ -283,6 +295,9 @@ config_udev_init(void)
|
||||
if (!udev_monitor)
|
||||
return 0;
|
||||
@@ -284,6 +296,9 @@ config_udev_init(void)
|
||||
udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "input", NULL);
|
||||
udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "tty", NULL); /* For Wacom serial devices */
|
||||
|
||||
+ if (SeatId && strcmp(SeatId, "seat0"))
|
||||
+ udev_monitor_filter_add_match_tag(udev_monitor, SeatId);
|
||||
@ -91,36 +91,18 @@ index 9ac34ee..ca978b0 100644
|
||||
if (udev_monitor_enable_receiving(udev_monitor)) {
|
||||
ErrorF("config/udev: failed to bind the udev monitor\n");
|
||||
return 0;
|
||||
@@ -291,6 +306,10 @@ config_udev_init(void)
|
||||
enumerate = udev_enumerate_new(udev);
|
||||
if (!enumerate)
|
||||
return 0;
|
||||
+
|
||||
@@ -296,6 +311,9 @@ config_udev_init(void)
|
||||
udev_enumerate_add_match_subsystem(enumerate, "input");
|
||||
udev_enumerate_add_match_subsystem(enumerate, "tty");
|
||||
|
||||
+ if (SeatId && strcmp(SeatId, "seat0"))
|
||||
+ udev_enumerate_add_match_tag(enumerate, SeatId);
|
||||
+
|
||||
udev_enumerate_scan_devices(enumerate);
|
||||
devices = udev_enumerate_get_list_entry(enumerate);
|
||||
udev_list_entry_foreach(device, devices) {
|
||||
diff --git a/doc/man/Xserver.man b/doc/man/Xserver.man
|
||||
index b725949..8d23894 100644
|
||||
--- a/doc/man/Xserver.man
|
||||
+++ b/doc/man/Xserver.man
|
||||
@@ -220,6 +220,12 @@ sets screen-saver timeout time in minutes.
|
||||
.B \-su
|
||||
disables save under support on all screens.
|
||||
.TP 8
|
||||
+.B \-seat \fIseat\fP
|
||||
+seat to run on. Takes a string identifying a seat in a platform
|
||||
+specific syntax. On platforms which support this feature this may be
|
||||
+used to limit the server to expose only a specific subset of devices
|
||||
+connected to the system.
|
||||
+.TP 8
|
||||
.B \-t \fInumber\fP
|
||||
sets pointer acceleration threshold in pixels (i.e. after how many pixels
|
||||
pointer acceleration should take effect).
|
||||
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
|
||||
index 0b36163..6dbbd77 100644
|
||||
index 71926f8..a268ced 100644
|
||||
--- a/hw/xfree86/common/xf86Init.c
|
||||
+++ b/hw/xfree86/common/xf86Init.c
|
||||
@@ -80,6 +80,7 @@
|
||||
@ -170,7 +152,7 @@ index 8b80a65..17bca82 100644
|
||||
|
||||
#ifdef DPMSExtension
|
||||
diff --git a/include/xserver-properties.h b/include/xserver-properties.h
|
||||
index c6259ae..a0936a5 100644
|
||||
index 2b1feab..bf50042 100644
|
||||
--- a/include/xserver-properties.h
|
||||
+++ b/include/xserver-properties.h
|
||||
@@ -30,6 +30,9 @@
|
||||
@ -183,8 +165,25 @@ index c6259ae..a0936a5 100644
|
||||
/* BOOL. 0 - device disabled, 1 - device enabled */
|
||||
#define XI_PROP_ENABLED "Device Enabled"
|
||||
/* BOOL. If present, device is a virtual XTEST device */
|
||||
diff --git a/man/Xserver.man b/man/Xserver.man
|
||||
index f743912..1a36b09 100644
|
||||
--- a/man/Xserver.man
|
||||
+++ b/man/Xserver.man
|
||||
@@ -220,6 +220,12 @@ sets screen-saver timeout time in minutes.
|
||||
.B \-su
|
||||
disables save under support on all screens.
|
||||
.TP 8
|
||||
+.B \-seat \fIseat\fP
|
||||
+seat to run on. Takes a string identifying a seat in a platform
|
||||
+specific syntax. On platforms which support this feature this may be
|
||||
+used to limit the server to expose only a specific subset of devices
|
||||
+connected to the system.
|
||||
+.TP 8
|
||||
.B \-t \fInumber\fP
|
||||
sets pointer acceleration threshold in pixels (i.e. after how many pixels
|
||||
pointer acceleration should take effect).
|
||||
diff --git a/os/utils.c b/os/utils.c
|
||||
index 36cb46f..e8ecb71 100644
|
||||
index 6338860..db2ae84 100644
|
||||
--- a/os/utils.c
|
||||
+++ b/os/utils.c
|
||||
@@ -201,6 +201,8 @@ Bool PanoramiXExtensionDisabledHack = FALSE;
|
||||
@ -204,7 +203,7 @@ index 36cb46f..e8ecb71 100644
|
||||
ErrorF("-t # default pointer threshold (pixels/t)\n");
|
||||
ErrorF("-terminate terminate at server reset\n");
|
||||
ErrorF("-to # connection time out\n");
|
||||
@@ -802,6 +805,13 @@ ProcessCommandLine(int argc, char *argv[])
|
||||
@@ -813,6 +816,13 @@ ProcessCommandLine(int argc, char *argv[])
|
||||
else
|
||||
UseMsg();
|
||||
}
|
||||
|
@ -1,155 +0,0 @@
|
||||
From c89255169f6de9dcaec67509cec1c9b5048b2155 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora X Ninjas <x@fedoraproject.org>
|
||||
Date: Wed, 20 Jan 2010 14:46:12 +1300
|
||||
Subject: [PATCH 02/17] Add nr for background=none root
|
||||
|
||||
---
|
||||
dix/globals.c | 1 +
|
||||
dix/window.c | 12 +++++++-----
|
||||
hw/xfree86/common/xf86Init.c | 11 +++++++++++
|
||||
hw/xfree86/common/xf86str.h | 5 ++++-
|
||||
include/opaque.h | 1 +
|
||||
os/utils.c | 3 +++
|
||||
6 files changed, 27 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dix/globals.c b/dix/globals.c
|
||||
index b128569..95dde2d 100644
|
||||
--- a/dix/globals.c
|
||||
+++ b/dix/globals.c
|
||||
@@ -122,6 +122,7 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
|
||||
CursorPtr rootCursor;
|
||||
Bool party_like_its_1989 = FALSE;
|
||||
Bool whiteRoot = FALSE;
|
||||
+Bool bgNoneRoot = FALSE;
|
||||
|
||||
TimeStamp currentTime;
|
||||
TimeStamp lastDeviceEventTime;
|
||||
diff --git a/dix/window.c b/dix/window.c
|
||||
index 4a47dd5..67da401 100644
|
||||
--- a/dix/window.c
|
||||
+++ b/dix/window.c
|
||||
@@ -459,22 +459,24 @@ InitRootWindow(WindowPtr pWin)
|
||||
pWin->optional->cursor = rootCursor;
|
||||
rootCursor->refcnt++;
|
||||
|
||||
+ pWin->backingStore = defaultBackingStore;
|
||||
+ pWin->forcedBS = (defaultBackingStore != NotUseful);
|
||||
|
||||
if (party_like_its_1989) {
|
||||
MakeRootTile(pWin);
|
||||
backFlag |= CWBackPixmap;
|
||||
+ pScreen->ChangeWindowAttributes(pWin, backFlag);
|
||||
+ } else if (bgNoneRoot) {
|
||||
+ /* nothing, handled in xf86CreateRootWindow */
|
||||
} else {
|
||||
if (whiteRoot)
|
||||
pWin->background.pixel = pScreen->whitePixel;
|
||||
else
|
||||
pWin->background.pixel = pScreen->blackPixel;
|
||||
backFlag |= CWBackPixel;
|
||||
- }
|
||||
|
||||
- pWin->backingStore = defaultBackingStore;
|
||||
- pWin->forcedBS = (defaultBackingStore != NotUseful);
|
||||
- /* We SHOULD check for an error value here XXX */
|
||||
- (*pScreen->ChangeWindowAttributes)(pWin, backFlag);
|
||||
+ pScreen->ChangeWindowAttributes(pWin, backFlag);
|
||||
+ }
|
||||
|
||||
MapWindow(pWin, serverClient);
|
||||
}
|
||||
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
|
||||
index ca532ee..6843273 100644
|
||||
--- a/hw/xfree86/common/xf86Init.c
|
||||
+++ b/hw/xfree86/common/xf86Init.c
|
||||
@@ -76,6 +76,7 @@
|
||||
#include "xf86Xinput.h"
|
||||
#include "xf86InPriv.h"
|
||||
#include "picturestr.h"
|
||||
+#include "xace.h"
|
||||
|
||||
#include "xf86Bus.h"
|
||||
#include "xf86VGAarbiter.h"
|
||||
@@ -242,6 +243,7 @@ xf86CreateRootWindow(WindowPtr pWin)
|
||||
int ret = TRUE;
|
||||
int err = Success;
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
RootWinPropPtr pProp;
|
||||
CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
|
||||
dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
|
||||
@@ -293,6 +295,15 @@ xf86CreateRootWindow(WindowPtr pWin)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (bgNoneRoot && pScrn->canDoBGNoneRoot) {
|
||||
+ pWin->backgroundState = XaceBackgroundNoneState(pWin);
|
||||
+ pWin->background.pixel = pScreen->whitePixel;
|
||||
+ pScreen->ChangeWindowAttributes(pWin, CWBackPixmap | CWBorderPixel | CWCursor | CWBackingStore);
|
||||
+ } else {
|
||||
+ pWin->background.pixel = pScreen->blackPixel;
|
||||
+ pScreen->ChangeWindowAttributes(pWin, CWBackPixel | CWBorderPixel | CWCursor | CWBackingStore);
|
||||
+ }
|
||||
+
|
||||
DebugF("xf86CreateRootWindow() returns %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
|
||||
index c9b261d..f96fc5d 100644
|
||||
--- a/hw/xfree86/common/xf86str.h
|
||||
+++ b/hw/xfree86/common/xf86str.h
|
||||
@@ -502,7 +502,7 @@ typedef struct _confdrirec {
|
||||
} confDRIRec, *confDRIPtr;
|
||||
|
||||
/* These values should be adjusted when new fields are added to ScrnInfoRec */
|
||||
-#define NUM_RESERVED_INTS 16
|
||||
+#define NUM_RESERVED_INTS 15
|
||||
#define NUM_RESERVED_POINTERS 14
|
||||
#define NUM_RESERVED_FUNCS 11
|
||||
|
||||
@@ -774,6 +774,9 @@ typedef struct _ScrnInfoRec {
|
||||
ClockRangePtr clockRanges;
|
||||
int adjustFlags;
|
||||
|
||||
+ /* -nr support */
|
||||
+ int canDoBGNoneRoot;
|
||||
+
|
||||
/*
|
||||
* These can be used when the minor ABI version is incremented.
|
||||
* The NUM_* parameters must be reduced appropriately to keep the
|
||||
diff --git a/include/opaque.h b/include/opaque.h
|
||||
index b3c7c70..fcc8c95 100644
|
||||
--- a/include/opaque.h
|
||||
+++ b/include/opaque.h
|
||||
@@ -71,6 +71,7 @@ extern _X_EXPORT Bool defeatAccessControl;
|
||||
extern _X_EXPORT long maxBigRequestSize;
|
||||
extern _X_EXPORT Bool party_like_its_1989;
|
||||
extern _X_EXPORT Bool whiteRoot;
|
||||
+extern _X_EXPORT Bool bgNoneRoot;
|
||||
|
||||
extern _X_EXPORT Bool CoreDump;
|
||||
|
||||
diff --git a/os/utils.c b/os/utils.c
|
||||
index 51455cc..64810cf 100644
|
||||
--- a/os/utils.c
|
||||
+++ b/os/utils.c
|
||||
@@ -502,6 +502,7 @@ void UseMsg(void)
|
||||
#endif
|
||||
ErrorF("-nolisten string don't listen on protocol\n");
|
||||
ErrorF("-noreset don't reset after last client exists\n");
|
||||
+ ErrorF("-nr create root window with no background\n");
|
||||
ErrorF("-reset reset after last client exists\n");
|
||||
ErrorF("-p # screen-saver pattern duration (minutes)\n");
|
||||
ErrorF("-pn accept failure to listen on all ports\n");
|
||||
@@ -841,6 +842,8 @@ ProcessCommandLine(int argc, char *argv[])
|
||||
defaultBackingStore = WhenMapped;
|
||||
else if ( strcmp( argv[i], "-wr") == 0)
|
||||
whiteRoot = TRUE;
|
||||
+ else if ( strcmp( argv[i], "-nr") == 0)
|
||||
+ bgNoneRoot = TRUE;
|
||||
else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
|
||||
if(++i < argc) {
|
||||
long reqSizeArg = atol(argv[i]);
|
||||
--
|
||||
1.7.1
|
||||
|
Loading…
Reference in New Issue
Block a user