[Pkg-sdl-commits] [libsdl2] 01/03: patch to use default screen from DISPLAY (Closes: #754401)

dod at debian.org dod at debian.org
Sat Oct 18 17:20:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository libsdl2.

commit 142d576bbf9ef7333ccfd0a3c8573650bed418b8
Author: Dominique Dumont <dod at debian.org>
Date:   Sat Oct 18 15:13:17 2014 +0200

    patch to use default screen from DISPLAY (Closes: #754401)
---
 debian/patches/series             |  1 +
 debian/patches/use-default-screen | 48 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index b6f97fc..71d01f8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
+use-default-screen
 SDL2_dont_propagate_lpthread.diff
 fix_joystick_misc_axes.diff
diff --git a/debian/patches/use-default-screen b/debian/patches/use-default-screen
new file mode 100644
index 0000000..d71bbf6
--- /dev/null
+++ b/debian/patches/use-default-screen
@@ -0,0 +1,48 @@
+Description: Use default screen
+ Respect default screen from DISPLAY variable, using standard X11 function calls.
+Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2192
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%23754401
+Author: Steaphan Greene
+Origin: upstream
+From: https://hg.libsdl.org/SDL/rev/3d2c0f659ad3
+Reviewed-by: dod
+--- a/src/video/x11/SDL_x11modes.c	Wed Oct 15 15:50:35 2014 -0400
++++ b/src/video/x11/SDL_x11modes.c	Wed Oct 15 18:33:43 2014 -0300
+@@ -375,7 +375,7 @@
+ X11_InitModes(_THIS)
+ {
+     SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
+-    int screen, screencount;
++    int snum, screen, screencount;
+ #if SDL_VIDEO_DRIVER_X11_XINERAMA
+     int xinerama_major, xinerama_minor;
+     int use_xinerama = 0;
+@@ -423,7 +423,7 @@
+     }
+ #endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
+ 
+-    for (screen = 0; screen < screencount; ++screen) {
++    for (snum = 0; snum < screencount; ++snum) {
+         XVisualInfo vinfo;
+         SDL_VideoDisplay display;
+         SDL_DisplayData *displaydata;
+@@ -433,6 +433,15 @@
+         char display_name[128];
+         int i, n;
+ 
++        /* Re-order screens to always put default screen first */
++        if (snum == 0) {
++            screen = DefaultScreen(data->display);
++        } else if (snum == DefaultScreen(data->display)) {
++            screen = 0;
++        } else {
++            screen = snum;
++        }
++
+ #if SDL_VIDEO_DRIVER_X11_XINERAMA
+         if (xinerama) {
+             if (get_visualinfo(data->display, 0, &vinfo) < 0) {
+
+
+
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sdl/packages/libsdl2.git



More information about the pkg-sdl-commits mailing list