xserver: Branch 'server-1.7-branch' - 19 commits
Peter Hutterer
whot at kemper.freedesktop.org
Sun Oct 18 19:08:09 PDT 2009
Makefile.am | 2
configure.ac | 18 ++--
dix/events.c | 4
hw/kdrive/fake/Makefile.am | 3
hw/kdrive/fake/kbd.c | 137 ---------------------------------
hw/xfree86/os-support/linux/lnx_axp.c | 16 +--
hw/xfree86/os-support/linux/lnx_ev56.c | 18 ++--
hw/xfree86/os-support/misc/SlowBcopy.c | 62 +++++++++-----
hw/xquartz/xpr/xprFrame.c | 47 +++++++++++
hw/xwin/InitOutput.c | 2
hw/xwin/XWin.rc | 12 +-
hw/xwin/winscrinit.c | 6 -
m4/dolt.m4 | 3
mi/miinitext.c | 28 +++++-
miext/rootless/rootless.h | 9 ++
miext/rootless/rootlessCommon.c | 3
miext/rootless/rootlessCommon.h | 4
miext/rootless/rootlessScreen.c | 4
miext/rootless/rootlessWindow.c | 76 ++----------------
miext/rootless/rootlessWindow.h | 2
20 files changed, 188 insertions(+), 268 deletions(-)
New commits:
commit 37b5f41ccea3473b830cc0c4afb5d609e47004cb
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon Oct 19 11:48:05 2009 +1000
xserver 1.7.0.902
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/configure.ac b/configure.ac
index 75212c6..2770115 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.7.0.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2009-10-12"
+AC_INIT([xorg-server], 1.7.0.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2009-10-19"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
AM_MAINTAINER_MODE
commit 37f857eb4cd30c6499a2735f59ddec87d1b7de57
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon Oct 19 11:50:56 2009 +1000
Revert "Xming: Remove unused X-boxed icon resource"
Breaks make dist.
make[2]: *** No rule to make target `X-boxed.ico', needed by `distdir'. Stop.
This reverts commit 2969eaa88c4422fedf1b069e6fe055904b233db2.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/xwin/X-boxed.ico b/hw/xwin/X-boxed.ico
new file mode 100755
index 0000000..0727042
Binary files /dev/null and b/hw/xwin/X-boxed.ico differ
diff --git a/hw/xwin/XWin.rc b/hw/xwin/XWin.rc
index df2664d..29c6f1c 100644
--- a/hw/xwin/XWin.rc
+++ b/hw/xwin/XWin.rc
@@ -106,3 +106,4 @@ END
*/
IDI_XWIN ICON "X.ico"
+IDI_XWIN_BOXED ICON "X-boxed.ico"
diff --git a/hw/xwin/winresource.h b/hw/xwin/winresource.h
index 7085117..5aa8840 100644
--- a/hw/xwin/winresource.h
+++ b/hw/xwin/winresource.h
@@ -37,6 +37,7 @@
#define IDC_STATIC -1
#define IDI_XWIN 101
+#define IDI_XWIN_BOXED 102
#define IDM_TRAYICON_MENU 103
#define IDC_CLIENTS_CONNECTED 104
commit 650ac84a0cf62c139fa6254fb7a44157d551e8e3
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Fri Oct 16 22:29:26 2009 -0700
Fix segfault when -extension XKEYBOARD is passed on the command line
Users should be told they can't disable XKB or XInput via error messages,
not core dumps.
Reported by T`2 on #xorg irc
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit 2bd71a6db241924bd17ac9dd4aa38e7e563ee5c1)
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 0dca390..2a67fd3 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -359,8 +359,14 @@ Bool EnableDisableExtension(char *name, Bool enable)
for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) {
if (strcmp(name, ext->name) == 0) {
- *ext->disablePtr = !enable;
- return TRUE;
+ if (ext->disablePtr != NULL) {
+ *ext->disablePtr = !enable;
+ return TRUE;
+ } else {
+ /* Extension is always on, impossible to disable */
+ return enable; /* okay if they wanted to enable,
+ fail if they tried to disable */
+ }
}
}
@@ -370,12 +376,24 @@ Bool EnableDisableExtension(char *name, Bool enable)
void EnableDisableExtensionError(char *name, Bool enable)
{
ExtensionToggle *ext = &ExtensionToggleList[0];
+ Bool found = FALSE;
- ErrorF("[mi] Extension \"%s\" is not recognized\n", name);
+ for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) {
+ if ((strcmp(name, ext->name) == 0) && (ext->disablePtr == NULL)) {
+ ErrorF("[mi] Extension \"%s\" can not be disabled\n", name);
+ found = TRUE;
+ break;
+ }
+ }
+ if (found == FALSE)
+ ErrorF("[mi] Extension \"%s\" is not recognized\n", name);
ErrorF("[mi] Only the following extensions can be run-time %s:\n",
enable ? "enabled" : "disabled");
- for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++)
- ErrorF("[mi] %s\n", ext->name);
+ for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) {
+ if (ext->disablePtr != NULL) {
+ ErrorF("[mi] %s\n", ext->name);
+ }
+ }
}
#ifndef XFree86LOADER
commit a8bfbd81b8aaac31b87d15257273d82174912b37
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu Oct 15 13:50:36 2009 +1000
kdrive: fix Xfake build by removing the old keysym stuff
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Acked-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit a32b2420d85f076282721afe005e85fff7d9837e)
diff --git a/hw/kdrive/fake/kbd.c b/hw/kdrive/fake/kbd.c
index 83c1b3b..51fba04 100644
--- a/hw/kdrive/fake/kbd.c
+++ b/hw/kdrive/fake/kbd.c
@@ -28,142 +28,11 @@
#define FAKE_WIDTH 2
-KeySym FakeKeymap[] = {
-/* 1 8 */ XK_Escape, NoSymbol,
-/* 2 9 */ XK_1, XK_exclam,
-/* 3 10 */ XK_2, XK_at,
-/* 4 11 */ XK_3, XK_numbersign,
-/* 5 12 */ XK_4, XK_dollar,
-/* 6 13 */ XK_5, XK_percent,
-/* 7 14 */ XK_6, XK_asciicircum,
-/* 8 15 */ XK_7, XK_ampersand,
-/* 9 16 */ XK_8, XK_asterisk,
-/* 10 17 */ XK_9, XK_parenleft,
-/* 11 18 */ XK_0, XK_parenright,
-/* 12 19 */ XK_minus, XK_underscore,
-/* 13 20 */ XK_equal, XK_plus,
-/* 14 21 */ XK_BackSpace, NoSymbol,
-/* 15 22 */ XK_Tab, NoSymbol,
-/* 16 23 */ XK_Q, NoSymbol,
-/* 17 24 */ XK_W, NoSymbol,
-/* 18 25 */ XK_E, NoSymbol,
-/* 19 26 */ XK_R, NoSymbol,
-/* 20 27 */ XK_T, NoSymbol,
-/* 21 28 */ XK_Y, NoSymbol,
-/* 22 29 */ XK_U, NoSymbol,
-/* 23 30 */ XK_I, NoSymbol,
-/* 24 31 */ XK_O, NoSymbol,
-/* 25 32 */ XK_P, NoSymbol,
-/* 26 33 */ XK_bracketleft, XK_braceleft,
-/* 27 34 */ XK_bracketright, XK_braceright,
-/* 28 35 */ XK_Return, NoSymbol,
-/* 29 36 */ XK_Control_L, NoSymbol,
-/* 30 37 */ XK_A, NoSymbol,
-/* 31 38 */ XK_S, NoSymbol,
-/* 32 39 */ XK_D, NoSymbol,
-/* 33 40 */ XK_F, NoSymbol,
-/* 34 41 */ XK_G, NoSymbol,
-/* 35 42 */ XK_H, NoSymbol,
-/* 36 43 */ XK_J, NoSymbol,
-/* 37 44 */ XK_K, NoSymbol,
-/* 38 45 */ XK_L, NoSymbol,
-/* 39 46 */ XK_semicolon, XK_colon,
-/* 40 47 */ XK_apostrophe, XK_quotedbl,
-/* 41 48 */ XK_grave, XK_asciitilde,
-/* 42 49 */ XK_Shift_L, NoSymbol,
-/* 43 50 */ XK_backslash, XK_bar,
-/* 44 51 */ XK_Z, NoSymbol,
-/* 45 52 */ XK_X, NoSymbol,
-/* 46 53 */ XK_C, NoSymbol,
-/* 47 54 */ XK_V, NoSymbol,
-/* 48 55 */ XK_B, NoSymbol,
-/* 49 56 */ XK_N, NoSymbol,
-/* 50 57 */ XK_M, NoSymbol,
-/* 51 58 */ XK_comma, XK_less,
-/* 52 59 */ XK_period, XK_greater,
-/* 53 60 */ XK_slash, XK_question,
-/* 54 61 */ XK_Shift_R, NoSymbol,
-/* 55 62 */ XK_KP_Multiply, NoSymbol,
-/* 56 63 */ XK_Alt_L, XK_Meta_L,
-/* 57 64 */ XK_space, NoSymbol,
-/* 58 65 */ XK_Caps_Lock, NoSymbol,
-/* 59 66 */ XK_F1, NoSymbol,
-/* 60 67 */ XK_F2, NoSymbol,
-/* 61 68 */ XK_F3, NoSymbol,
-/* 62 69 */ XK_F4, NoSymbol,
-/* 63 70 */ XK_F5, NoSymbol,
-/* 64 71 */ XK_F6, NoSymbol,
-/* 65 72 */ XK_F7, NoSymbol,
-/* 66 73 */ XK_F8, NoSymbol,
-/* 67 74 */ XK_F9, NoSymbol,
-/* 68 75 */ XK_F10, NoSymbol,
-/* 69 76 */ XK_Break, XK_Pause,
-/* 70 77 */ XK_Scroll_Lock, NoSymbol,
-/* 71 78 */ XK_KP_Home, XK_KP_7,
-/* 72 79 */ XK_KP_Up, XK_KP_8,
-/* 73 80 */ XK_KP_Page_Up, XK_KP_9,
-/* 74 81 */ XK_KP_Subtract, NoSymbol,
-/* 75 82 */ XK_KP_Left, XK_KP_4,
-/* 76 83 */ XK_KP_5, NoSymbol,
-/* 77 84 */ XK_KP_Right, XK_KP_6,
-/* 78 85 */ XK_KP_Add, NoSymbol,
-/* 79 86 */ XK_KP_End, XK_KP_1,
-/* 80 87 */ XK_KP_Down, XK_KP_2,
-/* 81 88 */ XK_KP_Page_Down, XK_KP_3,
-/* 82 89 */ XK_KP_Insert, XK_KP_0,
-/* 83 90 */ XK_KP_Delete, XK_KP_Decimal,
-/* 84 91 */ NoSymbol, NoSymbol,
-/* 85 92 */ NoSymbol, NoSymbol,
-/* 86 93 */ NoSymbol, NoSymbol,
-/* 87 94 */ XK_F11, NoSymbol,
-/* 88 95 */ XK_F12, NoSymbol,
-
-/* These are remapped from the extended set (using ExtendMap) */
-
-/* 89 96 */ XK_Control_R, NoSymbol,
-/* 90 97 */ XK_KP_Enter, NoSymbol,
-/* 91 98 */ XK_KP_Divide, NoSymbol,
-/* 92 99 */ XK_Sys_Req, XK_Print,
-/* 93 100 */ XK_Alt_R, XK_Meta_R,
-/* 94 101 */ XK_Num_Lock, NoSymbol,
-/* 95 102 */ XK_Home, NoSymbol,
-/* 96 103 */ XK_Up, NoSymbol,
-/* 97 104 */ XK_Page_Up, NoSymbol,
-/* 98 105 */ XK_Left, NoSymbol,
-/* 99 106 */ XK_Right, NoSymbol,
-/* 100 107 */ XK_End, NoSymbol,
-/* 101 108 */ XK_Down, NoSymbol,
-/* 102 109 */ XK_Page_Down, NoSymbol,
-/* 103 110 */ XK_Insert, NoSymbol,
-/* 104 111 */ XK_Delete, NoSymbol,
-/* 105 112 */ XK_Super_L, NoSymbol,
-/* 106 113 */ XK_Super_R, NoSymbol,
-/* 107 114 */ XK_Menu, NoSymbol,
-
-/* 108 115 */ XK_Next, NoSymbol, /* right button on side */
-/* 109 116 */ XK_Prior, NoSymbol, /* left button on side */
-/* 110 117 */ XK_Up, NoSymbol, /* joypad */
-/* 111 118 */ XK_Down, NoSymbol,
-/* 112 119 */ XK_Left, NoSymbol,
-/* 113 120 */ XK_Right, NoSymbol,
-/* 114 121 */ NoSymbol, NoSymbol, /* left near speaker */
-/* 115 122 */ NoSymbol, NoSymbol, /* right near speaker */
-/* 116 123 */ NoSymbol, NoSymbol, /* tiny button */
-};
-
static Status
FakeKeyboardInit (KdKeyboardInfo *ki)
{
- ki->keySyms.minKeyCode = 1;
- ki->keySyms.maxKeyCode = (sizeof (FakeKeymap) / sizeof (FakeKeymap[0])) / FAKE_WIDTH;
- ki->keySyms.mapWidth = FAKE_WIDTH;
- if (ki->keySyms.map)
- xfree(ki->keySyms.map);
- ki->keySyms.map = (KeySym *)xalloc(sizeof(FakeKeymap));
- if (!ki->keySyms.map)
- return BadAlloc;
- memcpy (ki->keySyms.map, FakeKeymap, sizeof (FakeKeymap));
-
+ ki->minScanCode = 8;
+ ki->maxScanCode = 255;
return Success;
}
@@ -182,8 +51,6 @@ FakeKeyboardDisable (KdKeyboardInfo *ki)
static void
FakeKeyboardFini (KdKeyboardInfo *ki)
{
- xfree(ki->keySyms.map);
- ki->keySyms.map = NULL;
}
static void
commit 64faf44f36b09780737c06781dadcf8fcbcaf836
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date: Thu Oct 15 01:53:42 2009 -0500
Remove duplicates from Xfake_LDADD
KDRIVE_LIBS already contains the libs in XSERVER_LIBS, so linking against
both leads to multiple-definition errors when linking on Cygwin.
Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit a2f27b97900f335cd5f6a3e5bf8fa1d0ec9eb9ac)
diff --git a/hw/kdrive/fake/Makefile.am b/hw/kdrive/fake/Makefile.am
index 8b93e9e..71b24b7 100644
--- a/hw/kdrive/fake/Makefile.am
+++ b/hw/kdrive/fake/Makefile.am
@@ -18,8 +18,7 @@ Xfake_SOURCES = \
Xfake_LDADD = \
libfake.la \
- @KDRIVE_LIBS@ \
- @XSERVER_LIBS@
+ @KDRIVE_LIBS@
Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -Wl,-undefined=InitExtensions
commit 4b419c1651bbe7fbd3e87c3d71ba9fe642672ca2
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date: Thu Oct 15 01:53:41 2009 -0500
Fix XWIN_LIBS definition
Move XWIN_LIBS from XWIN=auto conditional to XWIN=yes conditional,
otherwise the build breaks if an explicit --enable-xwin is passed to
configure.
Also remove obsolete library values from the definition.
Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit ed4c6bc79a797830895ad6c3601318b2d1c4bdcb)
diff --git a/configure.ac b/configure.ac
index d51171b..75212c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1702,8 +1702,6 @@ if test "x$XWIN" = xauto; then
mingw*) XWIN="yes" ;;
*) XWIN="no" ;;
esac
- XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $RANDR_LIB $RENDER_LIB $XTRAP_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $MIEXT_LAYER_LIB $LAYER_LIB $XPSTUBS_LIB $SHADOW_LIB $OS_LIB"
- AC_SUBST([XWIN_LIBS])
fi
AC_MSG_RESULT([$XWIN])
@@ -1733,7 +1731,9 @@ if test "x$XWIN" = xyes; then
XWIN_SYS_LIBS=-lwinsock2
;;
esac
+ XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB"
XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS"
+ AC_SUBST(XWIN_LIBS)
AC_SUBST(XWIN_SERVER_NAME)
AC_SUBST(XWIN_SYS_LIBS)
commit 7d5282dd597eb9353ca7a7697604d81228254d4a
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date: Thu Oct 15 01:53:40 2009 -0500
Install SDK pkg-config and aclocal files only if XORG
Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit bcd0c02cfd0707b5f8b1ca91dfbe4412df2c643e)
diff --git a/Makefile.am b/Makefile.am
index cf1469f..cb98d2c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,11 +41,13 @@ SUBDIRS = \
hw \
test
+if XORG
aclocaldir = $(datadir)/aclocal
aclocal_DATA = xorg-server.m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xorg-server.pc
+endif
EXTRA_DIST = xorg-server.pc.in xorg-server.m4 ChangeLog autogen.sh
commit 1b88e4eb2e605fd1d3adffaf38dc40be6a28970d
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Tue Jul 21 02:23:21 2009 +0100
Cygwin/X: Make -logverbose affect the verbosity of logging to the log file
Make -logverbose affect the verbosity of logging to the log file, not just the
verbosity of logging to the console
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
(cherry picked from commit 1b0dfd8dee639870725d3bd9b70c3bd589d09e5a)
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 2f4b0d2..9aff336 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -706,7 +706,7 @@ OsVendorInit (void)
}
LogSetParameter (XLOG_FLUSH, 1);
LogSetParameter (XLOG_VERBOSITY, g_iLogVerbose);
- LogSetParameter (XLOG_FILE_VERBOSITY, 1);
+ LogSetParameter (XLOG_FILE_VERBOSITY, g_iLogVerbose);
/* Log the version information */
if (serverGeneration == 1)
commit 2969eaa88c4422fedf1b069e6fe055904b233db2
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Fri Sep 25 17:49:59 2009 +0100
Xming: Remove unused X-boxed icon resource
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
(cherry picked from commit 78c87bdad1feab91c2a39e01513b4b0826665f06)
diff --git a/hw/xwin/X-boxed.ico b/hw/xwin/X-boxed.ico
deleted file mode 100755
index 0727042..0000000
Binary files a/hw/xwin/X-boxed.ico and /dev/null differ
diff --git a/hw/xwin/XWin.rc b/hw/xwin/XWin.rc
index 29c6f1c..df2664d 100644
--- a/hw/xwin/XWin.rc
+++ b/hw/xwin/XWin.rc
@@ -106,4 +106,3 @@ END
*/
IDI_XWIN ICON "X.ico"
-IDI_XWIN_BOXED ICON "X-boxed.ico"
diff --git a/hw/xwin/winresource.h b/hw/xwin/winresource.h
index 5aa8840..7085117 100644
--- a/hw/xwin/winresource.h
+++ b/hw/xwin/winresource.h
@@ -37,7 +37,6 @@
#define IDC_STATIC -1
#define IDI_XWIN 101
-#define IDI_XWIN_BOXED 102
#define IDM_TRAYICON_MENU 103
#define IDC_CLIENTS_CONNECTED 104
commit 92253b0f2028c6c243be5f444b59568b0c15ae1f
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Fri Sep 25 17:46:40 2009 +0100
Xming: update .rc file
Remove the obsolete DISCARDABLE flag in the .rc file
Replace the obsolete DIALOG resource with DIALOGEX in the .rc file
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
(cherry picked from commit fdf7f7e95c852734c620f58df408a324902172cf)
diff --git a/hw/xwin/XWin.rc b/hw/xwin/XWin.rc
index 5a254e1..29c6f1c 100644
--- a/hw/xwin/XWin.rc
+++ b/hw/xwin/XWin.rc
@@ -36,7 +36,7 @@
*/
/* About */
-ABOUT_BOX DIALOG DISCARDABLE 32, 32, 240, 105
+ABOUT_BOX DIALOGEX 32, 32, 240, 105
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
CAPTION "About " PROJECT_NAME
FONT 8, "MS Sans Serif"
@@ -58,7 +58,7 @@ END
/* Depth change */
-DEPTH_CHANGE_BOX DIALOG DISCARDABLE 32, 32, 180, 100
+DEPTH_CHANGE_BOX DIALOGEX 32, 32, 180, 100
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTERMOUSE
FONT 8, "MS Sans Serif"
CAPTION PROJECT_NAME
@@ -72,7 +72,7 @@ END
/* Exit */
-EXIT_DIALOG DIALOG DISCARDABLE 32, 32, 180, 78
+EXIT_DIALOG DIALOGEX 32, 32, 180, 78
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
FONT 8, "MS Sans Serif"
CAPTION "Exit " PROJECT_NAME "?"
@@ -89,7 +89,7 @@ END
* Menus
*/
-IDM_TRAYICON_MENU MENU DISCARDABLE
+IDM_TRAYICON_MENU MENU
BEGIN
POPUP "TRAYICON_MENU"
BEGIN
@@ -105,5 +105,5 @@ END
* Icons
*/
-IDI_XWIN ICON DISCARDABLE "X.ico"
-IDI_XWIN_BOXED ICON DISCARDABLE "X-boxed.ico"
+IDI_XWIN ICON "X.ico"
+IDI_XWIN_BOXED ICON "X-boxed.ico"
commit 237bc0c2558bdda5c7ec44cbc86a65af21344ba2
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Sat Oct 3 13:07:23 2009 +0100
Cygwin/X: Don't build rootless extension code unless we need it
Only try to build rootless extension code if we really need it (i.e. mwextwm mode is enabled)
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
(cherry picked from commit 5ddfd9d0898629627e8ab10e65ea2e082be3af37)
diff --git a/configure.ac b/configure.ac
index be0ccf4..d51171b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1716,8 +1716,14 @@ if test "x$XWIN" = xyes; then
XWIN_SERVER_NAME=XWin
PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont])
AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for signaling new win32 messages])
- AC_DEFINE(ROOTLESS,1,[Build Rootless code])
- CFLAGS="$CFLAGS -DFD_SETSIZE=256 -DROOTLESS_WORKAROUND"
+
+ dnl if we have windowswmproto, build rootless extension for multwindowextwm mode
+ if test "x$WINDOWSWM" = xyes ; then
+ AC_DEFINE(ROOTLESS,1,[Build Rootless code])
+ CFLAGS="$CFLAGS -DROOTLESS_WORKAROUND"
+ fi
+
+ CFLAGS="$CFLAGS -DFD_SETSIZE=256"
;;
mingw*)
XWIN_SERVER_NAME=Xming
commit c163126f06720a4bca1d073a2fb6d138ca6f0f00
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date: Tue Oct 13 20:14:58 2009 -0500
dolt: add Cygwin to supported platforms
Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit 25344ba7f7845654364d62bf15322b3b79465bd9)
diff --git a/m4/dolt.m4 b/m4/dolt.m4
index 1109bdb..7c62b6c 100644
--- a/m4/dolt.m4
+++ b/m4/dolt.m4
@@ -26,6 +26,9 @@ i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*)
pic_options='-fPIC'
;;
+i?86-pc-cygwin*)
+ pic_options='-DDLL_EXPORT'
+ ;;
i?86-apple-darwin*)
pic_options='-fno-common'
;;
commit 07229cd6da6a9b7acedb994275fed5b512fe48b1
Author: Matt Turner <mattst88 at gmail.com>
Date: Tue Oct 13 20:42:14 2009 -0400
[alpha] assume we have __NR_pciconfig_iobase
The code path if we didn't have support has been broken since before we
switched to git.
The pciconfig_iobase syscall has been supported since 2000.
Signed-off-by: Matt Turner <mattst88 at gmail.com>
(cherry picked from commit 5e762f0e2f203b5121a3de3b9af3c8981b31a77f)
diff --git a/hw/xfree86/os-support/linux/lnx_axp.c b/hw/xfree86/os-support/linux/lnx_axp.c
index 34129cc..10b97b0 100644
--- a/hw/xfree86/os-support/linux/lnx_axp.c
+++ b/hw/xfree86/os-support/linux/lnx_axp.c
@@ -138,16 +138,12 @@ long (*_iobase)(unsigned, int, int, int) = _alpha_iobase_query;
static long
_alpha_iobase(unsigned flags, int hose, int bus, int devfn)
{
-#ifdef __NR_pciconfig_iobase
if (bus < 0) {
bus = hose;
flags |= IOBASE_FROM_HOSE;
}
return syscall(__NR_pciconfig_iobase, flags, bus, devfn);
-#else
- return -ENOSYS
-#endif
}
static long
commit 13c5e2fe9c7ce82dfdc026a392327b115d8c6a15
Author: Matt Turner <mattst88 at gmail.com>
Date: Tue Oct 13 20:40:59 2009 -0400
[alpha] don't return from void functions
Signed-off-by: Matt Turner <mattst88 at gmail.com>
(cherry picked from commit 46785c04bca16f495af3ed8d685aee939a1a8f39)
diff --git a/hw/xfree86/os-support/linux/lnx_ev56.c b/hw/xfree86/os-support/linux/lnx_ev56.c
index e751da2..c65e1cc 100644
--- a/hw/xfree86/os-support/linux/lnx_ev56.c
+++ b/hw/xfree86/os-support/linux/lnx_ev56.c
@@ -94,28 +94,34 @@ writeDense32(int Value, pointer Base, register unsigned long Offset)
void
_dense_outb(char val, unsigned long port)
{
- if ((port & ~0xffff) == 0) return _outb(val, port);
-
+ if ((port & ~0xffff) == 0) {
+ _outb(val, port);
+ } else {
write_mem_barrier();
*(volatile CARD8 *)port = val;
+ }
}
void
_dense_outw(short val, unsigned long port)
{
- if ((port & ~0xffff) == 0) return _outw(val, port);
-
+ if ((port & ~0xffff) == 0) {
+ _outw(val, port);
+ } else {
write_mem_barrier();
*(volatile CARD16 *)port = val;
+ }
}
void
_dense_outl(int val, unsigned long port)
{
- if ((port & ~0xffff) == 0) return _outl(val, port);
-
+ if ((port & ~0xffff) == 0) {
+ _outl(val, port);
+ } else {
write_mem_barrier();
*(volatile CARD32 *)port = val;
+ }
}
unsigned int
commit fff0b2013ad40c6116e92a9c5e233da4a34e6943
Author: Michael Cree <mcree at orcon.net.nz>
Date: Wed Oct 7 18:33:29 2009 -0400
Fix undefined symbols on alpha
Signed-off-by: Matt Turner <mattst88 at gmail.com>
(cherry picked from commit 34eddbbb73bb16395dba0818247909c1b4bee4c2)
diff --git a/hw/xfree86/os-support/linux/lnx_axp.c b/hw/xfree86/os-support/linux/lnx_axp.c
index 8571c04..34129cc 100644
--- a/hw/xfree86/os-support/linux/lnx_axp.c
+++ b/hw/xfree86/os-support/linux/lnx_axp.c
@@ -125,12 +125,12 @@ extern unsigned int _dense_inb(unsigned long);
extern unsigned int _dense_inw(unsigned long);
extern unsigned int _dense_inl(unsigned long);
-void (*_alpha_outb)(char, unsigned long) = _outb;
-void (*_alpha_outw)(short, unsigned long) = _outw;
-void (*_alpha_outl)(int, unsigned long) = _outl;
-unsigned int (*_alpha_inb)(unsigned long) = _inb;
-unsigned int (*_alpha_inw)(unsigned long) = _inw;
-unsigned int (*_alpha_inl)(unsigned long) = _inl;
+_X_EXPORT void (*_alpha_outb)(char, unsigned long) = _outb;
+_X_EXPORT void (*_alpha_outw)(short, unsigned long) = _outw;
+_X_EXPORT void (*_alpha_outl)(int, unsigned long) = _outl;
+_X_EXPORT unsigned int (*_alpha_inb)(unsigned long) = _inb;
+_X_EXPORT unsigned int (*_alpha_inw)(unsigned long) = _inw;
+_X_EXPORT unsigned int (*_alpha_inl)(unsigned long) = _inl;
static long _alpha_iobase_query(unsigned, int, int, int);
long (*_iobase)(unsigned, int, int, int) = _alpha_iobase_query;
commit a08186fe59f003fc9e1edceb1d95d2e316766e2a
Author: Matt Turner <mattst88 at gmail.com>
Date: Tue Oct 6 20:58:30 2009 -0400
Fix breakage on alpha caused by c7680befe5ae
Pinpointed by by Michael Cree.
Commit c7680befe5ae removed Jensen support, but at the same time broke
support for dense memory systems.
Signed-off-by: Matt Turner <mattst88 at gmail.com>
(cherry picked from commit 9625f6d328d6f516520930227b218979309938bc)
diff --git a/hw/xfree86/os-support/misc/SlowBcopy.c b/hw/xfree86/os-support/misc/SlowBcopy.c
index 182a3e6..0021b55 100644
--- a/hw/xfree86/os-support/misc/SlowBcopy.c
+++ b/hw/xfree86/os-support/misc/SlowBcopy.c
@@ -59,10 +59,16 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
#ifdef linux
+unsigned long _bus_base(void);
+
+#define useSparse() (!_bus_base())
+
#define SPARSE (7)
#else
+#define useSparse() 0
+
#define SPARSE 0
#endif
@@ -70,32 +76,42 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
void
xf86SlowBCopyFromBus(unsigned char *src, unsigned char *dst, int count)
{
- unsigned long addr;
- long result;
-
- addr = (unsigned long) src;
- while( count ){
- result = *(volatile int *) addr;
- result >>= ((addr>>SPARSE) & 3) * 8;
- *dst++ = (unsigned char) (0xffUL & result);
- addr += 1<<SPARSE;
- count--;
- outb(0x80, 0x00);
- }
+ if (useSparse())
+ {
+ unsigned long addr;
+ long result;
+
+ addr = (unsigned long) src;
+ while (count) {
+ result = *(volatile int *) addr;
+ result >>= ((addr>>SPARSE) & 3) * 8;
+ *dst++ = (unsigned char) (0xffUL & result);
+ addr += 1<<SPARSE;
+ count--;
+ outb(0x80, 0x00);
+ }
+ }
+ else
+ xf86SlowBcopy(src, dst, count);
}
-
+
void
xf86SlowBCopyToBus(unsigned char *src, unsigned char *dst, int count)
{
- unsigned long addr;
-
- addr = (unsigned long) dst;
- while(count) {
- *(volatile unsigned int *) addr = (unsigned short)(*src) * 0x01010101;
- src++;
- addr += 1<<SPARSE;
- count--;
- outb(0x80, 0x00);
- }
+ if (useSparse())
+ {
+ unsigned long addr;
+
+ addr = (unsigned long) dst;
+ while (count) {
+ *(volatile unsigned int *) addr = (unsigned short)(*src) * 0x01010101;
+ src++;
+ addr += 1<<SPARSE;
+ count--;
+ outb(0x80, 0x00);
+ }
+ }
+ else
+ xf86SlowBcopy(src, dst, count);
}
#endif
commit e116bebb1324c5cdb806a70683ca747321c536b0
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Oct 13 13:15:05 2009 +1000
dix: extend IsPointerDevice check to valuator-only devices.
A device with valuators but no keys is definitely a pointer device and needs
to be attached to the VCP. Otherwise, the class copying happens on the VCK
and the VCP isn't updated with the events that are to be sent through it.
This addresses the trigger for #24441, not the actual issue.
Jury is still out on valuator+key devices.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit 72f5874434c0c015b671c492c1318f35f1793668)
diff --git a/dix/events.c b/dix/events.c
index d60b8a5..8f63d33 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -345,7 +345,9 @@ DevHasCursor(DeviceIntPtr pDev)
Bool
IsPointerDevice(DeviceIntPtr dev)
{
- return (dev->type == MASTER_POINTER) || (dev->valuator && dev->button);
+ return (dev->type == MASTER_POINTER) ||
+ (dev->valuator && dev->button) ||
+ (dev->valuator && !dev->key);
}
/*
commit f6cb78e476132b201334655f0015a2c727434fbf
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Tue Oct 13 12:54:56 2009 -0700
Rootless: src drawable window can now be NULL
Fix a possible crash when pSrc->pDrawable is NULL.
Signed-off-by: Colin Harrison <colin.harrison at virgin.net>
Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
(cherry picked from commit 7e178ffbed7c8557faf8d471ad275aa2b0365e1d)
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index b10ca70..c73d517 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -257,7 +257,7 @@ RootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
maskWin = (pMask->pDrawable->type == DRAWABLE_WINDOW) ?
(WindowPtr)pMask->pDrawable : NULL;
}
- srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
+ srcWin = (pSrc->pDrawable && pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
(WindowPtr)pSrc->pDrawable : NULL;
dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ?
(WindowPtr)pDst->pDrawable : NULL;
@@ -297,7 +297,7 @@ RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
GlyphPtr glyph;
WindowPtr srcWin, dstWin;
- srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
+ srcWin = (pSrc->pDrawable && pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
(WindowPtr)pSrc->pDrawable : NULL;
dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ?
(WindowPtr)pDst->pDrawable : NULL;
commit 496350bd6832e595e42620da76d2f1e2e4c9e91d
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Tue Oct 13 12:54:11 2009 -0700
Rootless: Abstract some of the Xplugin specific stuff which has crept into rootlessWindow.c
The rootless extension now directly calls some Xplugin functions, and relies
on types defined in Xplugin.h, which isn't very abstracted :-)
This patch is a start at abstracting some of the Xplugin specific stuff which
has crept into rootlessWindow.c. This has been done in a pretty mindless fashion,
without much thought as to if the additions to the generic rootless interface are
the correct ones
There is some confusion as to if RootlesscolormapCallback() returns a Bool or
xp_error_enum value (not so abstact), but I have no way of checking, of finding
out if Xplugin actually checks the result :-)
Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
(cherry picked from commit 6980f77892e0409b44bd8f33ba82e7273c6462a4)
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index a3e2076..53dde7a 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -83,6 +83,8 @@ static void xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects,
int shift_x, int shift_y);
static void xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin);
static Bool xprDoReorderWindow(RootlessWindowPtr pFrame);
+static void xprHideWindow(RootlessFrameID wid);
+static void xprUpdateColormap(RootlessFrameID wid, ScreenPtr pScreen);
static void xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
int dx, int dy);
@@ -117,6 +119,11 @@ xprSetNativeProperty(RootlessWindowPtr pFrame)
}
}
+static xp_error
+xprColormapCallback(void *data, int first_color, int n_colors, uint32_t *colors)
+{
+ return (RootlessResolveColormap (data, first_color, n_colors, colors) ? XP_Success : XP_BadMatch);
+}
/*
* Create and display a new frame.
@@ -142,7 +149,7 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
if (pWin->drawable.depth == 8)
{
wc.depth = XP_DEPTH_INDEX8;
- wc.colormap = RootlessColormapCallback;
+ wc.colormap = xprColormapCallback;
wc.colormap_data = pScreen;
mask |= XP_COLORMAP;
}
@@ -447,6 +454,8 @@ static RootlessFrameProcsRec xprRootlessProcs = {
xprDamageRects,
xprSwitchWindow,
xprDoReorderWindow,
+ xprHideWindow,
+ xprUpdateColormap,
xp_copy_bytes,
xp_fill_bytes,
xp_composite_pixels,
@@ -593,3 +602,39 @@ xprHideWindows(Bool hide)
}
}
}
+
+// XXX: identical to x_cvt_vptr_to_uint ?
+#define MAKE_WINDOW_ID(x) ((xp_window_id)((size_t)(x)))
+
+Bool no_configure_window;
+
+static inline int
+configure_window (xp_window_id id, unsigned int mask,
+ const xp_window_changes *values)
+{
+ if (!no_configure_window)
+ return xp_configure_window (id, mask, values);
+ else
+ return XP_Success;
+}
+
+
+static
+void xprUpdateColormap(RootlessFrameID wid, ScreenPtr pScreen)
+{
+ /* This is how we tell xp that the colormap may have changed. */
+ xp_window_changes wc;
+ wc.colormap = xprColormapCallback;
+ wc.colormap_data = pScreen;
+
+ configure_window(MAKE_WINDOW_ID(wid), XP_COLORMAP, &wc);
+}
+
+static
+void xprHideWindow(RootlessFrameID wid)
+{
+ xp_window_changes wc;
+ wc.stack_mode = XP_UNMAPPED;
+ wc.sibling = 0;
+ configure_window(MAKE_WINDOW_ID(wid), XP_STACKING, &wc);
+}
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index eab0c6c..99d5a46 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -58,8 +58,10 @@ winMWExtWMProcs = {
winMWExtWMDamageRects,
#endif
winMWExtWMRootlessSwitchWindow,
- NULL,//winWMExtWMDoReorderWindow,
-
+ NULL,//winMWExtWMDoReorderWindow,
+ NULL,//winMWExtWMHideWindow,
+ NULL,//winMWExtWMUpdateColorMap,
+
NULL,//winMWExtWMCopyBytes,
NULL,//winMWExtWMFillBytes,
NULL,//winMWExtWMCompositePixels,
diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h
index bde4cff..00eac4e 100644
--- a/miext/rootless/rootless.h
+++ b/miext/rootless/rootless.h
@@ -351,6 +351,13 @@ typedef void (*RootlessCopyWindowProc)
(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
int dx, int dy);
+
+typedef void (*RootlessHideWindowProc)
+ (RootlessFrameID wid);
+
+typedef void (*RootlessUpdateColormapProc)
+ (RootlessFrameID wid, ScreenPtr pScreen);
+
/*
* Rootless implementation function list
*/
@@ -374,6 +381,8 @@ typedef struct _RootlessFrameProcs {
/* Optional frame functions */
RootlessSwitchWindowProc SwitchWindow;
RootlessDoReorderWindowProc DoReorderWindow;
+ RootlessHideWindowProc HideWindow;
+ RootlessUpdateColormapProc UpdateColormap;
/* Optional acceleration functions */
RootlessCopyBytesProc CopyBytes;
diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c
index e3dd9d9..39a3eed 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -146,6 +146,7 @@ void RootlessStartDrawing(WindowPtr pWindow)
ScreenPtr pScreen = pWindow->drawable.pScreen;
WindowPtr top = TopLevelParent(pWindow);
RootlessWindowRec *winRec;
+ PixmapPtr curPixmap;
if (top == NULL)
return;
@@ -172,7 +173,7 @@ void RootlessStartDrawing(WindowPtr pWindow)
winRec->is_drawing = TRUE;
}
- PixmapPtr curPixmap = pScreen->GetWindowPixmap(pWindow);
+ curPixmap = pScreen->GetWindowPixmap(pWindow);
if (curPixmap == winRec->pixmap)
{
RL_DEBUG_MSG("Window %p already has winRec->pixmap %p; not pushing\n", pWindow, winRec->pixmap);
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h
index ba121c0..d4a94f8 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -268,9 +268,6 @@ Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color,
void RootlessFlushWindowColormap (WindowPtr pWin);
void RootlessFlushScreenColormaps (ScreenPtr pScreen);
-// xp_error
-int RootlessColormapCallback(void *data, int first_color, int n_colors, uint32_t *colors);
-
// Move a window to its proper location on the screen.
void RootlessRepositionWindow(WindowPtr pWin);
@@ -285,5 +282,6 @@ void RootlessUpdateRooted (Bool state);
void RootlessEnableRoot (ScreenPtr pScreen);
void RootlessDisableRoot (ScreenPtr pScreen);
+void RootlessSetPixmapOfAncestors(WindowPtr pWin);
#endif /* _ROOTLESSCOMMON_H */
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index d43301f..5320956 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -36,15 +36,15 @@
#include <stddef.h> /* For NULL */
#include <limits.h> /* For CHAR_BIT */
#include <assert.h>
-#ifdef __APPLE__
-//#include <X11/Xlib.h>
#include <X11/Xatom.h>
+#ifdef __APPLE__
+#include <Xplugin.h>
#include "mi.h"
#include "pixmapstr.h"
#include "windowstr.h"
-#include <Xplugin.h>
//#include <X11/extensions/applewm.h>
extern int darwinMainScreenX, darwinMainScreenY;
+extern Bool no_configure_window;
#endif
#include "fb.h"
@@ -61,8 +61,6 @@ extern int darwinMainScreenX, darwinMainScreenY;
#define SCREEN_TO_GLOBAL_Y 0
#endif
-#define MAKE_WINDOW_ID(x) ((xp_window_id)((size_t)(x)))
-
#define DEFINE_ATOM_HELPER(func,atom_name) \
static Atom func (void) { \
static unsigned int generation = 0; \
@@ -74,34 +72,15 @@ extern int darwinMainScreenX, darwinMainScreenY;
return atom; \
}
-DEFINE_ATOM_HELPER (xa_native_screen_origin, "_NATIVE_SCREEN_ORIGIN")
DEFINE_ATOM_HELPER (xa_native_window_id, "_NATIVE_WINDOW_ID")
-DEFINE_ATOM_HELPER (xa_apple_no_order_in, "_APPLE_NO_ORDER_IN")
-static Bool no_configure_window;
static Bool windows_hidden;
// TODO - abstract xp functions
-static inline int
-configure_window (xp_window_id id, unsigned int mask,
- const xp_window_changes *values)
-{
- if (!no_configure_window)
- return xp_configure_window (id, mask, values);
- else
- return XP_Success;
-}
-
-/*static inline unsigned long
-current_time_in_seconds (void)
-{
- unsigned long t = 0;
-
- t += currentTime.milliseconds / 1000;
- t += currentTime.months * 4294967;
+#ifdef __APPLE__
- return t;
- } */
+// XXX: identical to x_cvt_vptr_to_uint ?
+#define MAKE_WINDOW_ID(x) ((xp_window_id)((size_t)(x)))
void
RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state)
@@ -153,25 +132,7 @@ void RootlessNativeWindowMoved (WindowPtr pWin) {
no_configure_window = FALSE;
}
-/* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */
-static void
-set_screen_origin (WindowPtr pWin)
-{
- long data[2];
-
- if (!IsRoot (pWin))
- return;
-
- /* FIXME: move this to an extension? */
-
- data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x
- + darwinMainScreenX);
- data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y
- + darwinMainScreenY);
-
- dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(),
- XA_INTEGER, 32, PropModeReplace, 2, data, TRUE);
-}
+#endif /* __APPLE__ */
/*
* RootlessCreateWindow
@@ -437,13 +398,6 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec)
#endif
}
-
-Bool
-RootlessColormapCallback (void *data, int first_color, int n_colors, uint32_t *colors)
-{
- return (RootlessResolveColormap (data, first_color, n_colors, colors) ? XP_Success : XP_BadMatch);
-}
-
/*
* RootlessEnsureFrame
* Make sure the given window is framed. If the window doesn't have a
@@ -1482,19 +1436,15 @@ void
RootlessFlushWindowColormap (WindowPtr pWin)
{
RootlessWindowRec *winRec = WINREC (pWin);
- xp_window_changes wc;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
if (winRec == NULL)
return;
RootlessStopDrawing (pWin, FALSE);
- /* This is how we tell xp that the colormap may have changed. */
-
- wc.colormap = RootlessColormapCallback;
- wc.colormap_data = pWin->drawable.pScreen;
-
- configure_window (MAKE_WINDOW_ID(winRec->wid), XP_COLORMAP, &wc);
+ if (SCREENREC(pScreen)->imp->UpdateColormap)
+ SCREENREC(pScreen)->imp->UpdateColormap(winRec->wid, pScreen);
}
/*
@@ -1617,7 +1567,6 @@ RootlessHideAllWindows (void)
ScreenPtr pScreen;
WindowPtr pWin;
RootlessWindowRec *winRec;
- xp_window_changes wc;
if (windows_hidden)
return;
@@ -1641,9 +1590,8 @@ RootlessHideAllWindows (void)
winRec = WINREC (pWin);
if (winRec != NULL)
{
- wc.stack_mode = XP_UNMAPPED;
- wc.sibling = 0;
- configure_window (MAKE_WINDOW_ID(winRec->wid), XP_STACKING, &wc);
+ if (SCREENREC(pScreen)->imp->HideWindow)
+ SCREENREC(pScreen)->imp->HideWindow(winRec->wid);
}
}
}
diff --git a/miext/rootless/rootlessWindow.h b/miext/rootless/rootlessWindow.h
index 2d2555e..ca104a4 100644
--- a/miext/rootless/rootlessWindow.h
+++ b/miext/rootless/rootlessWindow.h
@@ -52,7 +52,9 @@ void RootlessResizeWindow(WindowPtr pWin, int x, int y,
unsigned int w, unsigned int h, WindowPtr pSib);
void RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent);
void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width);
+#ifdef __APPLE__
void RootlessNativeWindowMoved (WindowPtr pWin);
void RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state);
+#endif
#endif
More information about the xorg-commit
mailing list