diff options
Diffstat (limited to 'xorg-server/hw')
-rw-r--r-- | xorg-server/hw/kdrive/fake/Makefile.am | 3 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/fake/Makefile.in | 3 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/fake/kbd.c | 137 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnx_axp.c | 16 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c | 18 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c | 62 | ||||
-rw-r--r-- | xorg-server/hw/xquartz/xpr/xprFrame.c | 47 | ||||
-rw-r--r-- | xorg-server/hw/xwin/InitOutput.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xwin/XWin.rc | 12 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winscrinit.c | 6 |
10 files changed, 118 insertions, 188 deletions
diff --git a/xorg-server/hw/kdrive/fake/Makefile.am b/xorg-server/hw/kdrive/fake/Makefile.am index 8b93e9e2f..71b24b7e6 100644 --- a/xorg-server/hw/kdrive/fake/Makefile.am +++ b/xorg-server/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 diff --git a/xorg-server/hw/kdrive/fake/Makefile.in b/xorg-server/hw/kdrive/fake/Makefile.in index 164d6f0d7..f879f6159 100644 --- a/xorg-server/hw/kdrive/fake/Makefile.in +++ b/xorg-server/hw/kdrive/fake/Makefile.in @@ -408,8 +408,7 @@ Xfake_SOURCES = \ Xfake_LDADD = \ libfake.la \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -Wl,-undefined=InitExtensions Xfake_DEPENDENCIES = \ diff --git a/xorg-server/hw/kdrive/fake/kbd.c b/xorg-server/hw/kdrive/fake/kbd.c index 83c1b3b20..51fba044d 100644 --- a/xorg-server/hw/kdrive/fake/kbd.c +++ b/xorg-server/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 diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c b/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c index 8571c048b..10b97b0d6 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c +++ b/xorg-server/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; @@ -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 diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c index e751da2d0..c65e1cca4 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c +++ b/xorg-server/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 diff --git a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c index 182a3e6ec..0021b5544 100644 --- a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c +++ b/xorg-server/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 diff --git a/xorg-server/hw/xquartz/xpr/xprFrame.c b/xorg-server/hw/xquartz/xpr/xprFrame.c index a3e207616..53dde7acc 100644 --- a/xorg-server/hw/xquartz/xpr/xprFrame.c +++ b/xorg-server/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/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c index 2f4b0d222..9aff336e1 100644 --- a/xorg-server/hw/xwin/InitOutput.c +++ b/xorg-server/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) diff --git a/xorg-server/hw/xwin/XWin.rc b/xorg-server/hw/xwin/XWin.rc index 5a254e1ab..29c6f1ccf 100644 --- a/xorg-server/hw/xwin/XWin.rc +++ b/xorg-server/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" diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c index eab0c6ccf..99d5a464e 100644 --- a/xorg-server/hw/xwin/winscrinit.c +++ b/xorg-server/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, |