forked from pool/xorg-x11-server
Accepting request 284232 from home:tobijk:X11:XOrg
- Update to version 1.17.0: + Continued work to strip out stale code and clean up the server. Thousands of lines of unnecessary code have disappeared yet again. + The modesetting driver has been merged into the server code base, simplifying ongoing maintenance by coupling it to the X server ABI/API release schedule. This now includes DRI2 support (so that GLX works correctly) along with Glamor support (which handles DRI3). + Lots of Glamor improvements, including a rewrite of the core protocol rendering functions. - Remove upstream patches: + Patch130: U_BellProc-Send-bell-event-on-core-protocol-bell-when-requested.patch + Patch131: U_fb-Fix-invalid-bpp-for-24bit-depth-window.patch + Patch200: U_kdrive_extend_screen_option_syntax.patch + Patch201: U_ephyr_enable_screen_window_placement.patch + Patch202: U_ephyr_add_output_option_support.patch OBS-URL: https://build.opensuse.org/request/show/284232 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=556
This commit is contained in:
parent
1c5bfa2b0a
commit
0de1ccd95c
@ -1,39 +0,0 @@
|
||||
From: Egbert Eich <eich@freedesktop.org>
|
||||
Date: Mon Aug 4 19:16:30 2014 +0200
|
||||
Subject: [PATCH] BellProc: Send bell event on core protocol bell when requested
|
||||
Patch-mainline: Upstream
|
||||
Git-commit: e6c8c7e46c79b2837a7d0b12079a47734eff1eb7
|
||||
Git-repo: git://anongit.freedesktop.org/git/xorg/xserver
|
||||
References: bnc#890323
|
||||
Signed-off-by: Egbert Eich <eich@suse.com>
|
||||
|
||||
XKB allows to override the BellProc() ringing the 'keyboard bell':
|
||||
instead an event is sent to an X client which can perform an
|
||||
appropriate action.
|
||||
In most cases this effectively prevents the core protocol bell
|
||||
from ringing: if no BellProc() is set for the device, no attempt
|
||||
is made to ring a bell.
|
||||
This patch ensures that an XKB bell event is sent also when
|
||||
the core protocol bell is rung end thus an appropriate action
|
||||
can be taken by a client.
|
||||
|
||||
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
||||
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
---
|
||||
dix/devices.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dix/devices.c b/dix/devices.c
|
||||
index 7f079ff..5d26fae 100644
|
||||
--- a/dix/devices.c
|
||||
+++ b/dix/devices.c
|
||||
@@ -2257,7 +2257,7 @@ ProcBell(ClientPtr client)
|
||||
for (dev = inputInfo.devices; dev; dev = dev->next) {
|
||||
if ((dev == keybd ||
|
||||
(!IsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == keybd)) &&
|
||||
- dev->kbdfeed && dev->kbdfeed->BellProc) {
|
||||
+ ((dev->kbdfeed && dev->kbdfeed->BellProc) || dev->xkb_interest)) {
|
||||
|
||||
rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixBellAccess);
|
||||
if (rc != Success)
|
@ -1,392 +0,0 @@
|
||||
From 3a51418b2db353519a1779cf3cebbcc9afba2520 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?La=C3=A9rcio=20de=20Sousa?=
|
||||
<laerciosousa@sme-mogidascruzes.sp.gov.br>
|
||||
Date: Mon, 18 Aug 2014 08:45:43 -0300
|
||||
Subject: ephyr: set screen size & origin from host X server output's CRTC
|
||||
geometry
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
If a given output is passed via new -output option, Xephyr will query
|
||||
host X server for its info. If the following conditions are met:
|
||||
|
||||
a. RandR extension is enabled in host X server;
|
||||
b. supported RandR version in host X server is 1.2 or newer;
|
||||
c. the given output name is valid;
|
||||
d. the given output is connected;
|
||||
|
||||
then Xephyr will get output's CRTC geometry and use it to set its own
|
||||
screen size and origin. It's just like starting Xephyr in fullscreen mode,
|
||||
but restricted to the given output's CRTC geometry (fake "Zaphod mode").
|
||||
|
||||
This is the main feature needed for Xephyr-based single-card multiseat
|
||||
setups where we don't have separate screens to start Xephyr in fullscreen
|
||||
mode safely.
|
||||
|
||||
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
|
||||
Reviewed-by: Keith Packard <keithp@keithp.com>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f3d9654..cba7d24 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2364,7 +2364,7 @@ if test "$KDRIVE" = yes; then
|
||||
AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver])
|
||||
fi
|
||||
|
||||
- XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms"
|
||||
+ XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms xcb-randr"
|
||||
if test "x$XV" = xyes; then
|
||||
XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv"
|
||||
fi
|
||||
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
|
||||
index b039c68..85d4193 100644
|
||||
--- a/hw/kdrive/ephyr/ephyr.c
|
||||
+++ b/hw/kdrive/ephyr/ephyr.c
|
||||
@@ -111,13 +111,16 @@ Bool
|
||||
ephyrScreenInitialize(KdScreenInfo *screen)
|
||||
{
|
||||
EphyrScrPriv *scrpriv = screen->driver;
|
||||
+ int x = 0, y = 0;
|
||||
int width = 640, height = 480;
|
||||
CARD32 redMask, greenMask, blueMask;
|
||||
|
||||
- if (hostx_want_screen_size(screen, &width, &height)
|
||||
+ if (hostx_want_screen_geometry(screen, &width, &height, &x, &y)
|
||||
|| !screen->width || !screen->height) {
|
||||
screen->width = width;
|
||||
screen->height = height;
|
||||
+ screen->x = x;
|
||||
+ screen->y = y;
|
||||
}
|
||||
|
||||
if (EphyrWantGrayScale)
|
||||
diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
|
||||
index 5c4936b..4e753f1 100644
|
||||
--- a/hw/kdrive/ephyr/ephyr.h
|
||||
+++ b/hw/kdrive/ephyr/ephyr.h
|
||||
@@ -74,8 +74,10 @@ typedef struct _ephyrScrPriv {
|
||||
xcb_window_t peer_win; /* Used for GL; should be at most one */
|
||||
xcb_image_t *ximg;
|
||||
Bool win_explicit_position;
|
||||
+ int win_x, win_y;
|
||||
int win_width, win_height;
|
||||
int server_depth;
|
||||
+ const char *output; /* Set via -output option */
|
||||
unsigned char *fb_data; /* only used when host bpp != server bpp */
|
||||
xcb_shm_segment_info_t shminfo;
|
||||
|
||||
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
|
||||
index e04c8dc..38acc52 100644
|
||||
--- a/hw/kdrive/ephyr/ephyrinit.c
|
||||
+++ b/hw/kdrive/ephyr/ephyrinit.c
|
||||
@@ -47,6 +47,8 @@ extern KdPointerDriver LinuxEvdevMouseDriver;
|
||||
extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
|
||||
#endif
|
||||
|
||||
+void processScreenOrOutputArg(const char *screen_size, const char *output, char *parent_id);
|
||||
+void processOutputArg(const char *output, char *parent_id);
|
||||
void processScreenArg(const char *screen_size, char *parent_id);
|
||||
|
||||
void
|
||||
@@ -134,6 +136,7 @@ ddxUseMsg(void)
|
||||
ErrorF("-parent <XID> Use existing window as Xephyr root win\n");
|
||||
ErrorF("-sw-cursor Render cursors in software in Xephyr\n");
|
||||
ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n");
|
||||
+ ErrorF("-output <NAME> Attempt to run Xephyr fullscreen (restricted to given output geometry)\n");
|
||||
ErrorF("-grayscale Simulate 8bit grayscale\n");
|
||||
ErrorF("-resizeable Make Xephyr windows resizeable\n");
|
||||
#ifdef GLAMOR
|
||||
@@ -154,7 +157,7 @@ ddxUseMsg(void)
|
||||
}
|
||||
|
||||
void
|
||||
-processScreenArg(const char *screen_size, char *parent_id)
|
||||
+processScreenOrOutputArg(const char *screen_size, const char *output, char *parent_id)
|
||||
{
|
||||
KdCardInfo *card;
|
||||
|
||||
@@ -178,13 +181,25 @@ processScreenArg(const char *screen_size, char *parent_id)
|
||||
|
||||
use_geometry = (strchr(screen_size, '+') != NULL);
|
||||
EPHYR_DBG("screen number:%d\n", screen->mynum);
|
||||
- hostx_add_screen(screen, p_id, screen->mynum, use_geometry);
|
||||
+ hostx_add_screen(screen, p_id, screen->mynum, use_geometry, output);
|
||||
}
|
||||
else {
|
||||
ErrorF("No matching card found!\n");
|
||||
}
|
||||
}
|
||||
|
||||
+void
|
||||
+processScreenArg(const char *screen_size, char *parent_id)
|
||||
+{
|
||||
+ processScreenOrOutputArg(screen_size, NULL, parent_id);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+processOutputArg(const char *output, char *parent_id)
|
||||
+{
|
||||
+ processScreenOrOutputArg("100x100+0+0", output, parent_id);
|
||||
+}
|
||||
+
|
||||
int
|
||||
ddxProcessArgument(int argc, char **argv, int i)
|
||||
{
|
||||
@@ -226,6 +241,15 @@ ddxProcessArgument(int argc, char **argv, int i)
|
||||
UseMsg();
|
||||
exit(1);
|
||||
}
|
||||
+ else if (!strcmp(argv[i], "-output")) {
|
||||
+ if (i + 1 < argc) {
|
||||
+ processOutputArg(argv[i + 1], NULL);
|
||||
+ return 2;
|
||||
+ }
|
||||
+
|
||||
+ UseMsg();
|
||||
+ exit(1);
|
||||
+ }
|
||||
else if (!strcmp(argv[i], "-sw-cursor")) {
|
||||
hostx_use_sw_cursor();
|
||||
return 1;
|
||||
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
|
||||
index 92a8ada..2161ad5 100644
|
||||
--- a/hw/kdrive/ephyr/hostx.c
|
||||
+++ b/hw/kdrive/ephyr/hostx.c
|
||||
@@ -51,6 +51,7 @@
|
||||
#include <xcb/xcb_image.h>
|
||||
#include <xcb/shape.h>
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
+#include <xcb/randr.h>
|
||||
#ifdef XF86DRI
|
||||
#include <xcb/xf86dri.h>
|
||||
#include <xcb/glx.h>
|
||||
@@ -104,12 +105,15 @@ static void
|
||||
#define host_depth_matches_server(_vars) (HostX.depth == (_vars)->server_depth)
|
||||
|
||||
int
|
||||
-hostx_want_screen_size(KdScreenInfo *screen, int *width, int *height)
|
||||
+hostx_want_screen_geometry(KdScreenInfo *screen, int *width, int *height, int *x, int *y)
|
||||
{
|
||||
EphyrScrPriv *scrpriv = screen->driver;
|
||||
|
||||
if (scrpriv && (scrpriv->win_pre_existing != None ||
|
||||
+ scrpriv->output != NULL ||
|
||||
HostX.use_fullscreen == TRUE)) {
|
||||
+ *x = scrpriv->win_x;
|
||||
+ *y = scrpriv->win_y;
|
||||
*width = scrpriv->win_width;
|
||||
*height = scrpriv->win_height;
|
||||
return 1;
|
||||
@@ -119,7 +123,7 @@ hostx_want_screen_size(KdScreenInfo *screen, int *width, int *height)
|
||||
}
|
||||
|
||||
void
|
||||
-hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, Bool use_geometry)
|
||||
+hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, Bool use_geometry, const char *output)
|
||||
{
|
||||
EphyrScrPriv *scrpriv = screen->driver;
|
||||
int index = HostX.n_screens;
|
||||
@@ -132,6 +136,7 @@ hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, Boo
|
||||
scrpriv->screen = screen;
|
||||
scrpriv->win_pre_existing = win_id;
|
||||
scrpriv->win_explicit_position = use_geometry;
|
||||
+ scrpriv->output = output;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -211,6 +216,119 @@ hostx_want_preexisting_window(KdScreenInfo *screen)
|
||||
}
|
||||
|
||||
void
|
||||
+hostx_get_output_geometry(const char *output,
|
||||
+ int *x, int *y,
|
||||
+ int *width, int *height)
|
||||
+{
|
||||
+ int i, name_len = 0, output_found = FALSE;
|
||||
+ char *name = NULL;
|
||||
+ xcb_generic_error_t *error;
|
||||
+ xcb_randr_query_version_cookie_t version_c;
|
||||
+ xcb_randr_query_version_reply_t *version_r;
|
||||
+ xcb_randr_get_screen_resources_cookie_t screen_resources_c;
|
||||
+ xcb_randr_get_screen_resources_reply_t *screen_resources_r;
|
||||
+ xcb_randr_output_t *randr_outputs;
|
||||
+ xcb_randr_get_output_info_cookie_t output_info_c;
|
||||
+ xcb_randr_get_output_info_reply_t *output_info_r;
|
||||
+ xcb_randr_get_crtc_info_cookie_t crtc_info_c;
|
||||
+ xcb_randr_get_crtc_info_reply_t *crtc_info_r;
|
||||
+
|
||||
+ /* First of all, check for extension */
|
||||
+ if (!xcb_get_extension_data(HostX.conn, &xcb_randr_id)->present)
|
||||
+ {
|
||||
+ fprintf(stderr, "\nHost X server does not support RANDR extension (or it's disabled).\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ /* Check RandR version */
|
||||
+ version_c = xcb_randr_query_version(HostX.conn, 1, 2);
|
||||
+ version_r = xcb_randr_query_version_reply(HostX.conn,
|
||||
+ version_c,
|
||||
+ &error);
|
||||
+
|
||||
+ if (error != NULL || version_r == NULL)
|
||||
+ {
|
||||
+ fprintf(stderr, "\nFailed to get RandR version supported by host X server.\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ else if (version_r->major_version < 1 || version_r->minor_version < 2)
|
||||
+ {
|
||||
+ free(version_r);
|
||||
+ fprintf(stderr, "\nHost X server doesn't support RandR 1.2, needed for -output usage.\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ free(version_r);
|
||||
+
|
||||
+ /* Get list of outputs from screen resources */
|
||||
+ screen_resources_c = xcb_randr_get_screen_resources(HostX.conn,
|
||||
+ HostX.winroot);
|
||||
+ screen_resources_r = xcb_randr_get_screen_resources_reply(HostX.conn,
|
||||
+ screen_resources_c,
|
||||
+ NULL);
|
||||
+ randr_outputs = xcb_randr_get_screen_resources_outputs(screen_resources_r);
|
||||
+
|
||||
+ for (i = 0; !output_found && i < screen_resources_r->num_outputs; i++)
|
||||
+ {
|
||||
+ /* Get info on the output */
|
||||
+ output_info_c = xcb_randr_get_output_info(HostX.conn,
|
||||
+ randr_outputs[i],
|
||||
+ XCB_CURRENT_TIME);
|
||||
+ output_info_r = xcb_randr_get_output_info_reply(HostX.conn,
|
||||
+ output_info_c,
|
||||
+ NULL);
|
||||
+
|
||||
+ /* Get output name */
|
||||
+ name_len = xcb_randr_get_output_info_name_length(output_info_r);
|
||||
+ name = malloc(name_len + 1);
|
||||
+ strncpy(name, (char*)xcb_randr_get_output_info_name(output_info_r), name_len);
|
||||
+ name[name_len] = '\0';
|
||||
+
|
||||
+ if (!strcmp(name, output))
|
||||
+ {
|
||||
+ output_found = TRUE;
|
||||
+
|
||||
+ /* Check if output is connected */
|
||||
+ if (output_info_r->crtc == XCB_NONE)
|
||||
+ {
|
||||
+ free(name);
|
||||
+ free(output_info_r);
|
||||
+ free(screen_resources_r);
|
||||
+ fprintf(stderr, "\nOutput %s is currently disabled (or not connected).\n", output);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ /* Get CRTC from output info */
|
||||
+ crtc_info_c = xcb_randr_get_crtc_info(HostX.conn,
|
||||
+ output_info_r->crtc,
|
||||
+ XCB_CURRENT_TIME);
|
||||
+ crtc_info_r = xcb_randr_get_crtc_info_reply(HostX.conn,
|
||||
+ crtc_info_c,
|
||||
+ NULL);
|
||||
+
|
||||
+ /* Get CRTC geometry */
|
||||
+ *x = crtc_info_r->x;
|
||||
+ *y = crtc_info_r->y;
|
||||
+ *width = crtc_info_r->width;
|
||||
+ *height = crtc_info_r->height;
|
||||
+
|
||||
+ free(crtc_info_r);
|
||||
+ }
|
||||
+
|
||||
+ free(name);
|
||||
+ free(output_info_r);
|
||||
+ }
|
||||
+
|
||||
+ free(screen_resources_r);
|
||||
+
|
||||
+ if (!output_found)
|
||||
+ {
|
||||
+ fprintf(stderr, "\nOutput %s not available in host X server.\n", output);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
hostx_use_fullscreen(void)
|
||||
{
|
||||
HostX.use_fullscreen = TRUE;
|
||||
@@ -359,6 +477,8 @@ hostx_init(void)
|
||||
scrpriv->win = xcb_generate_id(HostX.conn);
|
||||
scrpriv->server_depth = HostX.depth;
|
||||
scrpriv->ximg = NULL;
|
||||
+ scrpriv->win_x = 0;
|
||||
+ scrpriv->win_y = 0;
|
||||
|
||||
if (scrpriv->win_pre_existing != XCB_WINDOW_NONE) {
|
||||
xcb_get_geometry_reply_t *prewin_geom;
|
||||
@@ -416,6 +536,17 @@ hostx_init(void)
|
||||
|
||||
hostx_set_fullscreen_hint();
|
||||
}
|
||||
+ else if (scrpriv->output) {
|
||||
+ hostx_get_output_geometry(scrpriv->output,
|
||||
+ &scrpriv->win_x,
|
||||
+ &scrpriv->win_y,
|
||||
+ &scrpriv->win_width,
|
||||
+ &scrpriv->win_height);
|
||||
+
|
||||
+ HostX.use_fullscreen = TRUE;
|
||||
+ hostx_set_fullscreen_hint();
|
||||
+ }
|
||||
+
|
||||
|
||||
tmpstr = getenv("RESOURCE_NAME");
|
||||
if (tmpstr && (!ephyrResNameFromCmd))
|
||||
@@ -759,6 +890,8 @@ hostx_screen_init(KdScreenInfo *screen,
|
||||
|
||||
scrpriv->win_width = width;
|
||||
scrpriv->win_height = height;
|
||||
+ scrpriv->win_x = x;
|
||||
+ scrpriv->win_y = y;
|
||||
|
||||
#ifdef GLAMOR
|
||||
if (ephyr_glamor) {
|
||||
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
|
||||
index c554ca3..80894c8 100644
|
||||
--- a/hw/kdrive/ephyr/hostx.h
|
||||
+++ b/hw/kdrive/ephyr/hostx.h
|
||||
@@ -74,7 +74,7 @@ typedef struct {
|
||||
} EphyrRect;
|
||||
|
||||
int
|
||||
-hostx_want_screen_size(KdScreenInfo *screen, int *width, int *height);
|
||||
+hostx_want_screen_geometry(KdScreenInfo *screen, int *width, int *height, int *x, int *y);
|
||||
|
||||
int
|
||||
hostx_want_host_cursor(void);
|
||||
@@ -83,6 +83,11 @@ void
|
||||
hostx_use_sw_cursor(void);
|
||||
|
||||
void
|
||||
+ hostx_get_output_geometry(const char *output,
|
||||
+ int *x, int *y,
|
||||
+ int *width, int *height);
|
||||
+
|
||||
+void
|
||||
hostx_use_fullscreen(void);
|
||||
|
||||
int
|
||||
@@ -107,7 +112,7 @@ int
|
||||
hostx_init(void);
|
||||
|
||||
void
|
||||
-hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, Bool use_geometry);
|
||||
+hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, Bool use_geometry, const char *output);
|
||||
|
||||
void
|
||||
hostx_set_display_name(char *name);
|
||||
--
|
||||
cgit v0.10.2
|
||||
|
@ -1,156 +0,0 @@
|
||||
From 84b02469ef97e6f85d074d220a517d752180045f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?La=C3=A9rcio=20de=20Sousa?=
|
||||
<laerciosousa@sme-mogidascruzes.sp.gov.br>
|
||||
Date: Mon, 18 Aug 2014 08:45:42 -0300
|
||||
Subject: ephyr: enable screen window placement following kdrive -screen option
|
||||
extended syntax
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
With this patch, one can launch Xephyr with option "-screen WxH+X+Y"
|
||||
to place its window origin at (X,Y). This patch relies on a previous
|
||||
one that extends kdrive -screen option syntax to parse +X+Y substring
|
||||
as expected.
|
||||
|
||||
If +X+Y is not passed in -screen argument string, let the WM place
|
||||
the window for us, as before.
|
||||
|
||||
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
|
||||
Reviewed-by: Keith Packard <keithp@keithp.com>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
|
||||
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
|
||||
index d57e9f3..b039c68 100644
|
||||
--- a/hw/kdrive/ephyr/ephyr.c
|
||||
+++ b/hw/kdrive/ephyr/ephyr.c
|
||||
@@ -242,7 +242,8 @@ ephyrMapFramebuffer(KdScreenInfo * screen)
|
||||
buffer_height = ephyrBufferHeight(screen);
|
||||
|
||||
priv->base =
|
||||
- hostx_screen_init(screen, screen->width, screen->height, buffer_height,
|
||||
+ hostx_screen_init(screen, screen->x, screen->y,
|
||||
+ screen->width, screen->height, buffer_height,
|
||||
&priv->bytes_per_line, &screen->fb.bitsPerPixel);
|
||||
|
||||
if ((scrpriv->randr & RR_Rotate_0) && !(scrpriv->randr & RR_Reflect_All)) {
|
||||
diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
|
||||
index dfd93c9..5c4936b 100644
|
||||
--- a/hw/kdrive/ephyr/ephyr.h
|
||||
+++ b/hw/kdrive/ephyr/ephyr.h
|
||||
@@ -73,6 +73,7 @@ typedef struct _ephyrScrPriv {
|
||||
xcb_window_t win_pre_existing; /* Set via -parent option like xnest */
|
||||
xcb_window_t peer_win; /* Used for GL; should be at most one */
|
||||
xcb_image_t *ximg;
|
||||
+ Bool win_explicit_position;
|
||||
int win_width, win_height;
|
||||
int server_depth;
|
||||
unsigned char *fb_data; /* only used when host bpp != server bpp */
|
||||
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
|
||||
index fc00010..e04c8dc 100644
|
||||
--- a/hw/kdrive/ephyr/ephyrinit.c
|
||||
+++ b/hw/kdrive/ephyr/ephyrinit.c
|
||||
@@ -164,6 +164,7 @@ processScreenArg(const char *screen_size, char *parent_id)
|
||||
if (card) {
|
||||
KdScreenInfo *screen;
|
||||
unsigned long p_id = 0;
|
||||
+ Bool use_geometry;
|
||||
|
||||
screen = KdScreenInfoAdd(card);
|
||||
KdParseScreen(screen, screen_size);
|
||||
@@ -174,8 +175,10 @@ processScreenArg(const char *screen_size, char *parent_id)
|
||||
if (parent_id) {
|
||||
p_id = strtol(parent_id, NULL, 0);
|
||||
}
|
||||
+
|
||||
+ use_geometry = (strchr(screen_size, '+') != NULL);
|
||||
EPHYR_DBG("screen number:%d\n", screen->mynum);
|
||||
- hostx_add_screen(screen, p_id, screen->mynum);
|
||||
+ hostx_add_screen(screen, p_id, screen->mynum, use_geometry);
|
||||
}
|
||||
else {
|
||||
ErrorF("No matching card found!\n");
|
||||
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
|
||||
index 1c75974..92a8ada 100644
|
||||
--- a/hw/kdrive/ephyr/hostx.c
|
||||
+++ b/hw/kdrive/ephyr/hostx.c
|
||||
@@ -119,7 +119,7 @@ hostx_want_screen_size(KdScreenInfo *screen, int *width, int *height)
|
||||
}
|
||||
|
||||
void
|
||||
-hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num)
|
||||
+hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, Bool use_geometry)
|
||||
{
|
||||
EphyrScrPriv *scrpriv = screen->driver;
|
||||
int index = HostX.n_screens;
|
||||
@@ -131,6 +131,7 @@ hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num)
|
||||
|
||||
scrpriv->screen = screen;
|
||||
scrpriv->win_pre_existing = win_id;
|
||||
+ scrpriv->win_explicit_position = use_geometry;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -637,6 +638,7 @@ hostx_set_cmap_entry(unsigned char idx,
|
||||
*/
|
||||
void *
|
||||
hostx_screen_init(KdScreenInfo *screen,
|
||||
+ int x, int y,
|
||||
int width, int height, int buffer_height,
|
||||
int *bytes_per_line, int *bits_per_pixel)
|
||||
{
|
||||
@@ -648,8 +650,8 @@ hostx_screen_init(KdScreenInfo *screen,
|
||||
exit(1);
|
||||
}
|
||||
|
||||
- EPHYR_DBG("host_screen=%p wxh=%dx%d, buffer_height=%d",
|
||||
- host_screen, width, height, buffer_height);
|
||||
+ EPHYR_DBG("host_screen=%p x=%d, y=%d, wxh=%dx%d, buffer_height=%d",
|
||||
+ host_screen, x, y, width, height, buffer_height);
|
||||
|
||||
if (scrpriv->ximg != NULL) {
|
||||
/* Free up the image data if previously used
|
||||
@@ -740,6 +742,19 @@ hostx_screen_init(KdScreenInfo *screen,
|
||||
|
||||
xcb_map_window(HostX.conn, scrpriv->win);
|
||||
|
||||
+ /* Set explicit window position if it was informed in
|
||||
+ * -screen option (WxH+X or WxH+X+Y). Otherwise, accept the
|
||||
+ * position set by WM.
|
||||
+ * The trick here is putting this code after xcb_map_window() call,
|
||||
+ * so these values won't be overriden by WM. */
|
||||
+ if (scrpriv->win_explicit_position)
|
||||
+ {
|
||||
+ uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y;
|
||||
+ uint32_t values[2] = {x, y};
|
||||
+ xcb_configure_window(HostX.conn, scrpriv->win, mask, values);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
xcb_aux_sync(HostX.conn);
|
||||
|
||||
scrpriv->win_width = width;
|
||||
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
|
||||
index e83323a..c554ca3 100644
|
||||
--- a/hw/kdrive/ephyr/hostx.h
|
||||
+++ b/hw/kdrive/ephyr/hostx.h
|
||||
@@ -107,7 +107,7 @@ int
|
||||
hostx_init(void);
|
||||
|
||||
void
|
||||
-hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num);
|
||||
+hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, Bool use_geometry);
|
||||
|
||||
void
|
||||
hostx_set_display_name(char *name);
|
||||
@@ -136,6 +136,7 @@ hostx_set_cmap_entry(unsigned char idx,
|
||||
unsigned char r, unsigned char g, unsigned char b);
|
||||
|
||||
void *hostx_screen_init(KdScreenInfo *screen,
|
||||
+ int x, int y,
|
||||
int width, int height, int buffer_height,
|
||||
int *bytes_per_line, int *bits_per_pixel);
|
||||
|
||||
--
|
||||
cgit v0.10.2
|
||||
|
@ -1,108 +0,0 @@
|
||||
From 376f4de8ae927748417046390c24afbda24b0583 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?La=C3=A9rcio=20de=20Sousa?=
|
||||
<laerciosousa@sme-mogidascruzes.sp.gov.br>
|
||||
Date: Mon, 18 Aug 2014 08:45:41 -0300
|
||||
Subject: kdrive: add support to +X+Y syntax in -screen option parsing
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This patch enhances current -screen option parsing for kdrive-based
|
||||
applications. It can parse strings like
|
||||
<WIDTH>x<HEIGHT>+<XOFFSET>+<YOFFSET>, storing X and Y offsets
|
||||
in KdScreenInfo instances.
|
||||
|
||||
For negative values, this patch supports +-X+-Y (not -X-Y) syntax.
|
||||
|
||||
It will allow e.g. proper Xephyr window placement for multiseat
|
||||
purposes.
|
||||
|
||||
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
|
||||
Reviewed-by: Keith Packard <keithp@keithp.com>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
|
||||
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
|
||||
index b5b91c0..5dbff3f 100644
|
||||
--- a/hw/kdrive/src/kdrive.c
|
||||
+++ b/hw/kdrive/src/kdrive.c
|
||||
@@ -300,6 +300,8 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
|
||||
screen->softCursor = kdSoftCursor;
|
||||
screen->origin = kdOrigin;
|
||||
screen->randr = RR_Rotate_0;
|
||||
+ screen->x = 0;
|
||||
+ screen->y = 0;
|
||||
screen->width = 0;
|
||||
screen->height = 0;
|
||||
screen->width_mm = 0;
|
||||
@@ -313,7 +315,7 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
|
||||
return;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
- arg = KdParseFindNext(arg, "x/@XY", save, &delim);
|
||||
+ arg = KdParseFindNext(arg, "x/+@XY", save, &delim);
|
||||
if (!save[0])
|
||||
return;
|
||||
|
||||
@@ -321,7 +323,7 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
|
||||
mm = 0;
|
||||
|
||||
if (delim == '/') {
|
||||
- arg = KdParseFindNext(arg, "x@XY", save, &delim);
|
||||
+ arg = KdParseFindNext(arg, "x+@XY", save, &delim);
|
||||
if (!save[0])
|
||||
return;
|
||||
mm = atoi(save);
|
||||
@@ -335,7 +337,8 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
|
||||
screen->height = pixels;
|
||||
screen->height_mm = mm;
|
||||
}
|
||||
- if (delim != 'x' && delim != '@' && delim != 'X' && delim != 'Y' &&
|
||||
+ if (delim != 'x' && delim != '+' && delim != '@' &&
|
||||
+ delim != 'X' && delim != 'Y' &&
|
||||
(delim != '\0' || i == 0))
|
||||
return;
|
||||
}
|
||||
@@ -346,6 +349,18 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
|
||||
kdSoftCursor = FALSE;
|
||||
kdSubpixelOrder = SubPixelUnknown;
|
||||
|
||||
+ if (delim == '+') {
|
||||
+ arg = KdParseFindNext(arg, "+@xXY", save, &delim);
|
||||
+ if (save[0])
|
||||
+ screen->x = atoi(save);
|
||||
+ }
|
||||
+
|
||||
+ if (delim == '+') {
|
||||
+ arg = KdParseFindNext(arg, "@xXY", save, &delim);
|
||||
+ if (save[0])
|
||||
+ screen->y = atoi(save);
|
||||
+ }
|
||||
+
|
||||
if (delim == '@') {
|
||||
arg = KdParseFindNext(arg, "xXY", save, &delim);
|
||||
if (save[0]) {
|
||||
@@ -425,7 +440,7 @@ KdUseMsg(void)
|
||||
{
|
||||
ErrorF("\nTinyX Device Dependent Usage:\n");
|
||||
ErrorF
|
||||
- ("-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]] Specify screen characteristics\n");
|
||||
+ ("-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][+[-]XOFFSET][+[-]YOFFSET][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]] Specify screen characteristics\n");
|
||||
ErrorF
|
||||
("-rgba rgb/bgr/vrgb/vbgr/none Specify subpixel ordering for LCD panels\n");
|
||||
ErrorF
|
||||
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
|
||||
index 08b1681..066a134 100644
|
||||
--- a/hw/kdrive/src/kdrive.h
|
||||
+++ b/hw/kdrive/src/kdrive.h
|
||||
@@ -89,6 +89,8 @@ typedef struct _KdScreenInfo {
|
||||
ScreenPtr pScreen;
|
||||
void *driver;
|
||||
Rotation randr; /* rotation and reflection */
|
||||
+ int x;
|
||||
+ int y;
|
||||
int width;
|
||||
int height;
|
||||
int rate;
|
||||
--
|
||||
cgit v0.10.2
|
||||
|
@ -51,7 +51,7 @@ index bcb039f..c46bca9 100644
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
#pragma GCC diagnostic push
|
||||
@@ -194,7 +201,7 @@ xf86OpenConsole(void)
|
||||
/*
|
||||
* now get the VT. This _must_ succeed, or else fail completely.
|
||||
|
@ -18,12 +18,12 @@ Index: xorg-server-1.12.1/os/access.c
|
||||
+++ xorg-server-1.12.1/os/access.c
|
||||
@@ -714,7 +714,9 @@ DefineSelf(int fd)
|
||||
|
||||
/*
|
||||
/*
|
||||
* ignore 'localhost' entries as they're not useful
|
||||
- * on the other end of the wire
|
||||
+ * on the other end of the wire and because on hosts
|
||||
+ * with shared home dirs they'll result in conflicting
|
||||
+ * entries in ~/.Xauthority
|
||||
+ * with shared home dirs they'll result in conflicting
|
||||
+ * entries in ~/.Xauthority
|
||||
*/
|
||||
if (ifr->ifa_flags & IFF_LOOPBACK)
|
||||
continue;
|
||||
@ -32,13 +32,13 @@ Index: xorg-server-1.12.1/os/access.c
|
||||
IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))
|
||||
continue;
|
||||
+
|
||||
+ /* Ignore IPv6 link local addresses (fe80::/10), because
|
||||
+ * they need a scope identifier, which we have no way
|
||||
+ * of telling to the other end.
|
||||
+ */
|
||||
+ if (family == FamilyInternet6 &&
|
||||
+ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr))
|
||||
+ continue;
|
||||
+ /* Ignore IPv6 link local addresses (fe80::/10), because
|
||||
+ * they need a scope identifier, which we have no way
|
||||
+ * of telling to the other end.
|
||||
+ */
|
||||
+ if (family == FamilyInternet6 &&
|
||||
+ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr))
|
||||
+ continue;
|
||||
#endif
|
||||
XdmcpRegisterConnection(family, (char *) addr, len);
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
|
@ -188,5 +188,5 @@ Signed-off-by: Michal Srb <msrb@suse.cz>
|
||||
+ return FALSE;
|
||||
+
|
||||
pScreen->InstallColormap = vfbInstallColormap;
|
||||
pScreen->UninstallColormap = vfbUninstallColormap;
|
||||
pScreen->ListInstalledColormaps = vfbListInstalledColormaps;
|
||||
|
||||
pScreen->SaveScreen = vfbSaveScreen;
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:446e0c3ebd556aced78ec0000ba9ae73f1e5317117d497f827afba48b787ce64
|
||||
size 5805059
|
3
xorg-server-1.17.0.tar.bz2
Normal file
3
xorg-server-1.17.0.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4e8548bae163129d2fc8f8e1f3b6071fe9d62821e3d5617507ccd2f589526166
|
||||
size 5852312
|
@ -1,4 +1,4 @@
|
||||
Provides: X11_ABI_XINPUT = 21.0
|
||||
Provides: X11_ABI_VIDEODRV = 18.0
|
||||
Provides: X11_ABI_VIDEODRV = 19.0
|
||||
Provides: X11_ABI_ANSIC = 0.4
|
||||
Provides: X11_ABI_EXTENSION = 8.0
|
||||
Provides: X11_ABI_EXTENSION = 9.0
|
||||
|
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 5 16:32:50 UTC 2015 - tobias.johannes.klausmann@mni.thm.de
|
||||
|
||||
- Update to version 1.17.0:
|
||||
+ Continued work to strip out stale code and clean up the server.
|
||||
Thousands of lines of unnecessary code have disappeared yet again.
|
||||
+ The modesetting driver has been merged into the server code base,
|
||||
simplifying ongoing maintenance by coupling it to the X server
|
||||
ABI/API release schedule. This now includes DRI2 support (so that GLX
|
||||
works correctly) along with Glamor support (which handles DRI3).
|
||||
+ Lots of Glamor improvements, including a rewrite of the core protocol
|
||||
rendering functions.
|
||||
- Remove upstream patches:
|
||||
+ Patch130: U_BellProc-Send-bell-event-on-core-protocol-bell-when-requested.patch
|
||||
+ Patch131: U_fb-Fix-invalid-bpp-for-24bit-depth-window.patch
|
||||
+ Patch200: U_kdrive_extend_screen_option_syntax.patch
|
||||
+ Patch201: U_ephyr_enable_screen_window_placement.patch
|
||||
+ Patch202: U_ephyr_add_output_option_support.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 5 13:37:11 UTC 2015 - msrb@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package xorg-x11-server
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
Name: xorg-x11-server
|
||||
|
||||
%define dirsuffix 1.16.2
|
||||
%define dirsuffix 1.17.0
|
||||
|
||||
Summary: X
|
||||
License: MIT
|
||||
@ -75,6 +75,7 @@ BuildRequires: pkgconfig(xcb-aux)
|
||||
BuildRequires: pkgconfig(xcb-icccm)
|
||||
BuildRequires: pkgconfig(xcb-image)
|
||||
BuildRequires: pkgconfig(xcb-keysyms)
|
||||
BuildRequires: pkgconfig(xcb-renderutil)
|
||||
BuildRequires: pkgconfig(xcmiscproto) >= 1.2.0
|
||||
BuildRequires: pkgconfig(xdmcp)
|
||||
BuildRequires: pkgconfig(xext) >= 1.0.99.4
|
||||
@ -133,6 +134,9 @@ Provides: glamor-egl = %{version}
|
||||
Obsoletes: glamor < %{version}
|
||||
Obsoletes: glamor-egl < %{version}
|
||||
|
||||
Provides: xf86-video-modesetting = %{version}
|
||||
Obsoletes: xf86-video-modesetting < %{version}
|
||||
|
||||
# Xvfb requires keyboard files as well (bnc#797124)
|
||||
Requires: xkeyboard-config
|
||||
|
||||
@ -156,7 +160,6 @@ Patch106: u_exa-only-draw-valid-trapezoids.patch
|
||||
Patch110: u_connection-avoid-crash-when-CloseWellKnownConnections-gets-called-twice.patch
|
||||
Patch111: u_CloseConsole-Don-t-report-FatalError-when-shutting-down.patch
|
||||
Patch112: u_render-Cast-color-masks-to-unsigned-long-before-shifting-them.patch
|
||||
Patch130: U_BellProc-Send-bell-event-on-core-protocol-bell-when-requested.patch
|
||||
|
||||
Patch1000: n_xserver-optimus-autoconfig-hack.patch
|
||||
|
||||
@ -164,10 +167,6 @@ Patch1162: b_cache-xkbcomp-output-for-fast-start-up.patch
|
||||
Patch1211: b_0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch
|
||||
Patch1222: b_sync-fix.patch
|
||||
|
||||
Patch200: U_kdrive_extend_screen_option_syntax.patch
|
||||
Patch201: U_ephyr_enable_screen_window_placement.patch
|
||||
Patch202: U_ephyr_add_output_option_support.patch
|
||||
|
||||
%description
|
||||
This package contains the X.Org Server.
|
||||
|
||||
@ -248,7 +247,7 @@ cp %{SOURCE90} .
|
||||
%patch110 -p1
|
||||
%patch111 -p1
|
||||
%patch112 -p1
|
||||
%patch130 -p1
|
||||
|
||||
%patch1000 -p1
|
||||
|
||||
### disabled for now
|
||||
@ -258,10 +257,6 @@ cp %{SOURCE90} .
|
||||
### patch222 might not be applicable anymore
|
||||
#%patch1222 -p1
|
||||
|
||||
%patch200 -p1
|
||||
%patch201 -p1
|
||||
%patch202 -p1
|
||||
|
||||
find . -type f \! -name '*.orig' \! -path ./source-file-list > source-file-list
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user