diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/kdrive/ephyr/ephyr.c | 3 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyrdriext.c | 2 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyrlog.h | 4 | ||||
-rw-r--r-- | hw/kdrive/ephyr/hostx.c | 20 | ||||
-rw-r--r-- | hw/xfree86/common/xf86MiscExt.c | 4 | ||||
-rw-r--r-- | hw/xfree86/dixmods/extmod/modinit.c | 9 | ||||
-rw-r--r-- | hw/xfree86/dixmods/extmod/modinit.h | 5 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86Cursors.c | 2 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86EdidModes.c | 37 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_video.c | 11 | ||||
-rw-r--r-- | hw/xquartz/X11Application.h | 1 | ||||
-rw-r--r-- | hw/xquartz/X11Application.m | 7 | ||||
-rw-r--r-- | hw/xquartz/X11Controller.m | 2 | ||||
-rw-r--r-- | hw/xquartz/bundle/Info.plist | 2 | ||||
-rw-r--r-- | hw/xquartz/bundle/Makefile.am | 2 | ||||
-rw-r--r-- | hw/xquartz/bundle/bundle-main.c | 3 |
16 files changed, 71 insertions, 43 deletions
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 21203a5e8..90aadf0f2 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -635,7 +635,9 @@ ephyrInitScreen (ScreenPtr pScreen) if (!ephyrNoDRI && !hostx_has_dri ()) { EPHYR_LOG ("host x does not support DRI. Disabling DRI forwarding\n") ; ephyrNoDRI = TRUE ; +#ifdef GLXEXT noGlxVisualInit = FALSE ; +#endif } if (!ephyrNoDRI) { ephyrDRIExtensionInit (pScreen) ; @@ -1029,6 +1031,7 @@ EphyrKeyboardInit (KdKeyboardInfo *ki) ki->minScanCode = ki->keySyms.minKeyCode; ki->maxScanCode = ki->keySyms.maxKeyCode; ki->keySyms.mapWidth = ephyrKeySyms.mapWidth; + xfree(ki->keySyms.map); ki->keySyms.map = ephyrKeySyms.map; ki->name = KdSaveString("Xephyr virtual keyboard"); ephyrKbd = ki; diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index b6be47f5e..1b9dce5c8 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -206,7 +206,7 @@ ephyrDRIScreenInit (ScreenPtr a_screen) a_screen->ClipNotify = ephyrDRIClipNotify ; is_ok = TRUE ; -out: + return is_ok ; } diff --git a/hw/kdrive/ephyr/ephyrlog.h b/hw/kdrive/ephyr/ephyrlog.h index 4c6435edd..71f797777 100644 --- a/hw/kdrive/ephyr/ephyrlog.h +++ b/hw/kdrive/ephyr/ephyrlog.h @@ -33,8 +33,8 @@ #ifdef NDEBUG /*we are not in debug mode*/ -#define EPHYR_LOG -#define EPHYR_LOG_ERROR +#define EPHYR_LOG(...) +#define EPHYR_LOG_ERROR(...) #endif /*NDEBUG*/ #define ERROR_LOG_LEVEL 3 diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index b5ffdd075..a5413b876 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -1078,16 +1078,6 @@ out: } -typedef struct { - int is_valid ; - int local_id ; - int remote_id ; -} ResourcePair ; - -#define RESOURCE_PEERS_SIZE 1024*10 -static ResourcePair resource_peers[RESOURCE_PEERS_SIZE] ; - - int hostx_create_window (int a_screen_number, EphyrBox *a_geometry, @@ -1259,6 +1249,16 @@ hostx_has_xshape (void) } #ifdef XEPHYR_DRI +typedef struct { + int is_valid ; + int local_id ; + int remote_id ; +} ResourcePair ; + +#define RESOURCE_PEERS_SIZE 1024*10 +static ResourcePair resource_peers[RESOURCE_PEERS_SIZE] ; + + int hostx_allocate_resource_id_peer (int a_local_resource_id, int *a_remote_resource_id) diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c index c1b9c60fc..40c196a3e 100644 --- a/hw/xfree86/common/xf86MiscExt.c +++ b/hw/xfree86/common/xf86MiscExt.c @@ -548,6 +548,10 @@ MiscExtPassMessage(int scrnIndex, const char *msgtype, const char *msgval, { ScrnInfoPtr pScr = xf86Screens[scrnIndex]; + /* should check this in the protocol, but xf86NumScreens isn't exported */ + if (scrnIndex >= xf86NumScreens) + return BadValue; + if (*pScr->HandleMessage == NULL) return BadImplementation; return (*pScr->HandleMessage)(scrnIndex, msgtype, msgval, retstr); diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c index acd700694..d0d892aaf 100644 --- a/hw/xfree86/dixmods/extmod/modinit.c +++ b/hw/xfree86/dixmods/extmod/modinit.c @@ -38,6 +38,15 @@ static MODULESETUPPROTO(extmodSetup); * Array describing extensions to be initialized */ static ExtensionModule extensionModules[] = { +#ifdef XSELINUX + { + SELinuxExtensionInit, + SELINUX_EXTENSION_NAME, + NULL, + NULL, + NULL + }, +#endif #ifdef SHAPE { ShapeExtensionInit, diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h index 99d714c4f..3c2e2022a 100644 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ b/hw/xfree86/dixmods/extmod/modinit.h @@ -125,12 +125,9 @@ extern void ShmRegisterFuncs( ShmFuncsPtr funcs); #endif -#ifdef XACE -extern void XaceExtensionInit(INITARGS); -#endif - #ifdef XSELINUX extern void SELinuxExtensionInit(INITARGS); +#include "xselinux.h" #endif #if 1 diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index f3b1ebb7a..171d16ab3 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c @@ -401,7 +401,7 @@ xf86_crtc_load_cursor_image (xf86CrtcPtr crtc, CARD8 *src) int flags = cursor_info->Flags; cursor_image = xf86_config->cursor_image; - memset(cursor_image, 0, cursor_info->MaxWidth * stride); + memset(cursor_image, 0, cursor_info->MaxHeight * stride); for (y = 0; y < cursor_info->MaxHeight; y++) for (x = 0; x < cursor_info->MaxWidth; x++) diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index 87a812765..b865727ef 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -66,6 +66,8 @@ typedef enum { DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE = 1 << 5, /* Monitor forgot to set the first detailed is preferred bit. */ DDC_QUIRK_FIRST_DETAILED_PREFERRED = 1 << 6, + /* use +hsync +vsync for detailed mode */ + DDC_QUIRK_DETAILED_SYNC_PP = 1 << 7, } ddc_quirk_t; static Bool quirk_prefer_large_60 (int scrnIndex, xf86MonPtr DDC) @@ -160,6 +162,15 @@ static Bool quirk_first_detailed_preferred (int scrnIndex, xf86MonPtr DDC) return FALSE; } +static Bool quirk_detailed_sync_pp(int scrnIndex, xf86MonPtr DDC) +{ + /* Bug #12439: Samsung SyncMaster 205BW */ + if (memcmp (DDC->vendor.name, "SAM", 4) == 0 && + DDC->vendor.prod_id == 541) + return TRUE; + return FALSE; +} + typedef struct { Bool (*detect) (int scrnIndex, xf86MonPtr DDC); ddc_quirk_t quirk; @@ -195,6 +206,10 @@ static const ddc_quirk_map_t ddc_quirks[] = { quirk_first_detailed_preferred, DDC_QUIRK_FIRST_DETAILED_PREFERRED, "First detailed timing was not marked as preferred." }, + { + quirk_detailed_sync_pp, DDC_QUIRK_DETAILED_SYNC_PP, + "Use +hsync +vsync for detailed timing." + }, { NULL, DDC_QUIRK_NONE, "No known quirks" @@ -341,15 +356,19 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, if (timing->interlaced) Mode->Flags |= V_INTERLACE; - if (timing->misc & 0x02) - Mode->Flags |= V_PVSYNC; - else - Mode->Flags |= V_NVSYNC; - - if (timing->misc & 0x01) - Mode->Flags |= V_PHSYNC; - else - Mode->Flags |= V_NHSYNC; + if (quirks & DDC_QUIRK_DETAILED_SYNC_PP) + Mode->Flags |= V_PVSYNC | V_PHSYNC; + else { + if (timing->misc & 0x02) + Mode->Flags |= V_PVSYNC; + else + Mode->Flags |= V_NVSYNC; + + if (timing->misc & 0x01) + Mode->Flags |= V_PHSYNC; + else + Mode->Flags |= V_NHSYNC; + } return Mode; } diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c index ad2b66f74..1bd2d575f 100644 --- a/hw/xfree86/os-support/linux/lnx_video.c +++ b/hw/xfree86/os-support/linux/lnx_video.c @@ -142,17 +142,8 @@ mtrr_open(int verbosity) /* Only report absence of /proc/mtrr once. */ static Bool warned = FALSE; - char **fn; - static char *mtrr_files[] = { - "/dev/cpu/mtrr", /* Possible future name */ - "/proc/mtrr", /* Current name */ - NULL - }; - if (mtrr_fd == MTRR_FD_UNOPENED) { - /* So open it. */ - for (fn = mtrr_files; mtrr_fd < 0 && *fn; fn++) - mtrr_fd = open(*fn, O_WRONLY); + mtrr_fd = open("/proc/mtrr", O_WRONLY); if (mtrr_fd < 0) mtrr_fd = MTRR_FD_PROBLEM; diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h index a1be7514a..af5aea2ce 100644 --- a/hw/xquartz/X11Application.h +++ b/hw/xquartz/X11Application.h @@ -97,5 +97,6 @@ extern int quartzHasRoot, quartzEnableRootless; #define PREFS_SWAP_ALT_META "swap_alt_meta" #define PREFS_XP_OPTIONS "xp_options" #define PREFS_ENABLE_STEREO "enable_stereo" +#define PREFS_LOGIN_SHELL "login_shell" #endif /* X11APPLICATION_H */ diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 72537bb65..be5511d30 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -164,7 +164,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) { have it activated while X is active (unless using the old keymapping files) */ static TSMDocumentID x11_document; - + DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active) if (state) { QuartzMessageServerThread (kXDarwinActivate, 0); @@ -314,6 +314,11 @@ static void message_kit_thread (SEL selector, NSObject *arg) { } - (void) set_front_process:unused { + /* Hackery needed due to argv[0] hackery */ + // [self activateX:YES]; + ProcessSerialNumber psn = { 0, kCurrentProcess }; + SetFrontProcess(&psn); + QuartzMessageServerThread(kXDarwinBringAllToFront, 0); } diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index 6b7c35141..d3f83656c 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -302,7 +302,7 @@ argv[0] = "/usr/bin/login"; argv[1] = "-fp"; argv[2] = getlogin(); - argv[3] = "/bin/sh"; + argv[3] = [X11App prefs_get_string:@PREFS_LOGIN_SHELL default:"/bin/sh"]; argv[4] = "-c"; argv[5] = command; argv[6] = NULL; diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist index 5babdfe6e..6ba02dda2 100644 --- a/hw/xquartz/bundle/Info.plist +++ b/hw/xquartz/bundle/Info.plist @@ -27,7 +27,7 @@ <key>NSHumanReadableCopyright</key> <string>Copyright © 2003-2008, Apple Inc. Copyright © 2003, XFree86 Project, Inc. -Copyright © 2003-2008, X.org Project, Inc. +Copyright © 2003-2008, X.org Foundation, Inc. </string> <key>NSMainNibFile</key> <string>main</string> diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 951167002..00d540fee 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -18,8 +18,6 @@ EXTRA_DIST = \ Info.plist \ X11.icns \ bundle-main.c \ - launcher-main.c \ - server-main.c \ English.lproj/InfoPlist.strings \ English.lproj/Localizable.strings \ English.lproj/main.nib/classes.nib \ diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index df78d7fb8..54d01368d 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -38,6 +38,7 @@ #define DEFAULT_CLIENT "/usr/X11/bin/xterm" #define DEFAULT_STARTX "/usr/X11/bin/startx" +#define DEFAULT_SHELL "/bin/sh" static int execute(const char *command); static char *command_from_prefs(const char *key, const char *default_value); @@ -82,7 +83,7 @@ static int execute(const char *command) { newargv[0] = "/usr/bin/login"; newargv[1] = "-fp"; newargv[2] = getlogin(); - newargv[3] = "/bin/sh"; + newargv[3] = command_from_prefs("login_shell", DEFAULT_SHELL); newargv[4] = "-c"; newargv[5] = command; newargv[6] = NULL; |