pulling more patches over from xorg-xserver-1.2-apple branch
This commit is contained in:
parent
10fde62fc8
commit
b1764ddf13
|
@ -141,6 +141,7 @@ enum {
|
|||
kXDarwinQuit, // kill the X server and release the display
|
||||
kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
|
||||
kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
|
||||
kXDarwinBringAllToFront, // bring all X windows to front
|
||||
/*
|
||||
* AppleWM events
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
.\" $XFree86: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.man,v 1.1 2002/02/05 19:16:14 torrey Exp $
|
||||
.TH XDarwinStartup 1
|
||||
.SH NAME
|
||||
XDarwinStartup - Startup program for the XDarwin X window server
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**************************************************************************
|
||||
|
||||
Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
|
||||
Copyright (c) 2002-2007 Apple Inc. All Rights Reserved.
|
||||
Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
* quartzCursor.h
|
||||
*
|
||||
* External interface for Quartz hardware cursor
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/*
|
||||
*
|
||||
* This module converts keysym values into the corresponding ISO 10646
|
||||
* (UCS, Unicode) values.
|
||||
*
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
/**************************************************************
|
||||
/*
|
||||
*
|
||||
* Quartz-specific support for the Darwin X Server
|
||||
*
|
||||
**************************************************************/
|
||||
/*
|
||||
* Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
|
@ -64,7 +62,7 @@ int quartzServerVisible = TRUE;
|
|||
int quartzServerQuitting = FALSE;
|
||||
int quartzScreenIndex = 0;
|
||||
int aquaMenuBarHeight = 0;
|
||||
int noPseudoramiXExtension = TRUE;
|
||||
int noPseudoramiXExtension = FALSE;
|
||||
QuartzModeProcsPtr quartzProcs = NULL;
|
||||
const char *quartzOpenGLBundle = NULL;
|
||||
|
||||
|
@ -397,11 +395,22 @@ void DarwinModeProcessEvent(
|
|||
QuartzUpdateScreens();
|
||||
break;
|
||||
|
||||
case kXDarwinWindowState:
|
||||
case kXDarwinWindowMoved:
|
||||
// FIXME: Not implemented yet
|
||||
case kXDarwinBringAllToFront:
|
||||
RootlessOrderAllWindows();
|
||||
break;
|
||||
|
||||
case kXDarwinWindowState:
|
||||
ErrorF("kXDarwinWindowState\n");
|
||||
break;
|
||||
case kXDarwinWindowMoved: {
|
||||
WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0;
|
||||
short x = xe->u.clientMessage.u.l.longs1,
|
||||
y = xe->u.clientMessage.u.l.longs2;
|
||||
ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y);
|
||||
RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorF("Unknown application defined event type %d.\n",
|
||||
xe->u.u.type);
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
*
|
||||
* External interface of the Quartz display modes seen by the generic, mode
|
||||
* independent parts of the Darwin X server.
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
|
|
|
@ -42,14 +42,16 @@
|
|||
|
||||
#include <Cocoa/Cocoa.h>
|
||||
|
||||
#ifndef INXQUARTZ
|
||||
#import "Preferences.h"
|
||||
#endif
|
||||
#include "pseudoramiX.h"
|
||||
|
||||
extern void FatalError(const char *, ...);
|
||||
extern char *display;
|
||||
extern int noPanoramiXExtension;
|
||||
|
||||
|
||||
#ifndef INXQUARTZ
|
||||
/*
|
||||
* QuartzReadPreferences
|
||||
* Read the user preferences from the Cocoa front end.
|
||||
|
@ -95,7 +97,7 @@ void QuartzReadPreferences(void)
|
|||
|
||||
darwinDesiredDepth = [Preferences depth] - 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* QuartzWriteCocoaPasteboard
|
||||
|
@ -160,6 +162,7 @@ char *QuartzReadCocoaPasteboard(void)
|
|||
int QuartzFSUseQDCursor(
|
||||
int depth) // screen depth
|
||||
{
|
||||
#ifndef INXQUARTZ
|
||||
switch ([Preferences useQDCursor]) {
|
||||
case qdCursor_Always:
|
||||
return TRUE;
|
||||
|
@ -171,6 +174,7 @@ int QuartzFSUseQDCursor(
|
|||
else
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
* quartzCursor.h
|
||||
*
|
||||
* External interface for Quartz hardware cursor
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
|
|
|
@ -217,42 +217,41 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
|
|||
const void *chr_data = NULL;
|
||||
int num_keycodes = NUM_KEYCODES;
|
||||
UInt32 keyboard_type = 0;
|
||||
int is_uchr, i, j;
|
||||
int is_uchr = 1, i, j;
|
||||
OSStatus err;
|
||||
KeySym *k;
|
||||
|
||||
TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
|
||||
if (currentKeyLayoutRef)
|
||||
{
|
||||
CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
|
||||
if (currentKeyLayoutDataRef)
|
||||
chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
|
||||
}
|
||||
|
||||
if (chr_data != NULL)
|
||||
{
|
||||
KLGetCurrentKeyboardLayout (&key_layout);
|
||||
KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
|
||||
|
||||
if (chr_data != NULL)
|
||||
if (currentKeyLayoutRef)
|
||||
{
|
||||
is_uchr = 1;
|
||||
keyboard_type = LMGetKbdType ();
|
||||
CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
|
||||
if (currentKeyLayoutDataRef)
|
||||
chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
|
||||
}
|
||||
|
||||
if(chr_data == NULL) {
|
||||
KLGetCurrentKeyboardLayout (&key_layout);
|
||||
KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
|
||||
|
||||
if (chr_data != NULL)
|
||||
{
|
||||
is_uchr = 1;
|
||||
keyboard_type = LMGetKbdType ();
|
||||
}
|
||||
else
|
||||
{
|
||||
KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
|
||||
|
||||
if (chr_data == NULL)
|
||||
{
|
||||
ErrorF ( "Couldn't get uchr or kchr resource\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
is_uchr = 0;
|
||||
num_keycodes = 128;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
|
||||
|
||||
if (chr_data == NULL)
|
||||
{
|
||||
ErrorF ( "Couldn't get uchr or kchr resource\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
is_uchr = 0;
|
||||
num_keycodes = 128;
|
||||
}
|
||||
}
|
||||
|
||||
/* Scan the keycode range for the Unicode character that each
|
||||
key produces in the four shift states. Then convert that to
|
||||
|
@ -376,8 +375,7 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
|
||||
if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ DRIFinishScreenInit(ScreenPtr pScreen)
|
|||
pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify;
|
||||
pScreen->ClipNotify = DRIClipNotify;
|
||||
|
||||
ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum);
|
||||
// ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,10 @@
|
|||
# include "damage.h"
|
||||
#endif
|
||||
|
||||
/* 10.4's deferred update makes X slower.. have to live with the tearing
|
||||
for now.. */
|
||||
#define XP_NO_DEFERRED_UPDATES 8
|
||||
|
||||
// Name of GLX bundle for native OpenGL
|
||||
static const char *xprOpenGLBundle = "glxCGL.bundle";
|
||||
|
||||
|
@ -59,10 +63,12 @@ eventHandler(unsigned int type, const void *arg,
|
|||
switch (type)
|
||||
{
|
||||
case XP_EVENT_DISPLAY_CHANGED:
|
||||
// ErrorF("XP_EVENT_DISPLAY_MOVED\n");
|
||||
QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
|
||||
break;
|
||||
|
||||
case XP_EVENT_WINDOW_STATE_CHANGED:
|
||||
// ErrorF("XP_EVENT_WINDOW_STATE_CHANGED\n");
|
||||
if (arg_size >= sizeof(xp_window_state_event))
|
||||
{
|
||||
const xp_window_state_event *ws_arg = arg;
|
||||
|
@ -73,6 +79,7 @@ eventHandler(unsigned int type, const void *arg,
|
|||
break;
|
||||
|
||||
case XP_EVENT_WINDOW_MOVED:
|
||||
// ErrorF("XP_EVENT_WINDOW_MOVED\n");
|
||||
if (arg_size == sizeof(xp_window_id))
|
||||
{
|
||||
xp_window_id id = * (xp_window_id *) arg;
|
||||
|
@ -89,6 +96,7 @@ eventHandler(unsigned int type, const void *arg,
|
|||
|
||||
case XP_EVENT_SURFACE_DESTROYED:
|
||||
case XP_EVENT_SURFACE_CHANGED:
|
||||
// ErrorF("XP_EVENT_SURFACE_MOVED\n");
|
||||
if (arg_size == sizeof(xp_surface_id))
|
||||
{
|
||||
int kind;
|
||||
|
|
|
@ -432,4 +432,8 @@ void RootlessUpdateScreenPixmap(ScreenPtr pScreen);
|
|||
*/
|
||||
void RootlessRepositionWindows(ScreenPtr pScreen);
|
||||
|
||||
/*
|
||||
* Bring all windows to the front of the Aqua stack
|
||||
*/
|
||||
void RootlessOrderAllWindows (void);
|
||||
#endif /* _ROOTLESS_H */
|
||||
|
|
|
@ -1376,3 +1376,29 @@ RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width)
|
|||
|
||||
RL_DEBUG_MSG("change border width end\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* RootlessOrderAllWindows
|
||||
* Brings all X11 windows to the top of the window stack
|
||||
* (i.e in front of Aqua windows) -- called when X11.app is given focus
|
||||
*/
|
||||
void
|
||||
RootlessOrderAllWindows (void)
|
||||
{
|
||||
int i;
|
||||
WindowPtr pWin;
|
||||
|
||||
RL_DEBUG_MSG("RootlessOrderAllWindows() ");
|
||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||
if (screenInfo.screens[i] == NULL) continue;
|
||||
pWin = WindowTable[i];
|
||||
if (pWin == NULL) continue;
|
||||
|
||||
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) {
|
||||
if (!pWin->realized) continue;
|
||||
if (RootlessEnsureFrame(pWin) == NULL) continue;
|
||||
RootlessReorderWindow (pWin);
|
||||
}
|
||||
}
|
||||
RL_DEBUG_MSG("RootlessOrderAllWindows() done");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user