Merge remote-tracking branch 'jturney/master'
This commit is contained in:
commit
47ff382d1f
|
@ -27,6 +27,7 @@ SUBDIRS = \
|
||||||
Xext \
|
Xext \
|
||||||
miext \
|
miext \
|
||||||
os \
|
os \
|
||||||
|
pseudoramiX \
|
||||||
randr \
|
randr \
|
||||||
render \
|
render \
|
||||||
Xi \
|
Xi \
|
||||||
|
@ -77,6 +78,7 @@ DIST_SUBDIRS = \
|
||||||
Xext \
|
Xext \
|
||||||
miext \
|
miext \
|
||||||
os \
|
os \
|
||||||
|
pseudoramiX \
|
||||||
randr \
|
randr \
|
||||||
render \
|
render \
|
||||||
Xi \
|
Xi \
|
||||||
|
|
|
@ -2256,6 +2256,7 @@ miext/damage/Makefile
|
||||||
miext/shadow/Makefile
|
miext/shadow/Makefile
|
||||||
miext/rootless/Makefile
|
miext/rootless/Makefile
|
||||||
os/Makefile
|
os/Makefile
|
||||||
|
pseudoramiX/Makefile
|
||||||
randr/Makefile
|
randr/Makefile
|
||||||
render/Makefile
|
render/Makefile
|
||||||
xkb/Makefile
|
xkb/Makefile
|
||||||
|
|
|
@ -28,7 +28,6 @@ libXquartz_la_SOURCES = \
|
||||||
darwinEvents.c \
|
darwinEvents.c \
|
||||||
darwinXinput.c \
|
darwinXinput.c \
|
||||||
keysym2ucs.c \
|
keysym2ucs.c \
|
||||||
pseudoramiX.c \
|
|
||||||
quartz.c \
|
quartz.c \
|
||||||
quartzCocoa.m \
|
quartzCocoa.m \
|
||||||
quartzKeyboard.c \
|
quartzKeyboard.c \
|
||||||
|
@ -36,6 +35,8 @@ libXquartz_la_SOURCES = \
|
||||||
quartzRandR.c \
|
quartzRandR.c \
|
||||||
console_redirect.c
|
console_redirect.c
|
||||||
|
|
||||||
|
libXquartz_la_LIBADD = $(top_builddir)/pseudoramiX/libPseudoramiX.la
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
X11Application.h \
|
X11Application.h \
|
||||||
X11Controller.h \
|
X11Controller.h \
|
||||||
|
@ -44,7 +45,6 @@ EXTRA_DIST = \
|
||||||
darwinfb.h \
|
darwinfb.h \
|
||||||
darwinEvents.h \
|
darwinEvents.h \
|
||||||
keysym2ucs.h \
|
keysym2ucs.h \
|
||||||
pseudoramiX.h \
|
|
||||||
quartz.h \
|
quartz.h \
|
||||||
quartzCommon.h \
|
quartzCommon.h \
|
||||||
quartzKeyboard.h \
|
quartzKeyboard.h \
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
|
|
||||||
#ifdef XWIN_CLIPBOARD
|
#ifdef XWIN_CLIPBOARD
|
||||||
int winProcEstablishConnection(ClientPtr /* client */ );
|
int winProcEstablishConnection(ClientPtr /* client */ );
|
||||||
int winProcQueryTree(ClientPtr /* client */ );
|
|
||||||
int winProcSetSelectionOwner(ClientPtr /* client */ );
|
int winProcSetSelectionOwner(ClientPtr /* client */ );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,11 @@ from The Open Group.
|
||||||
#include "xkbsrv.h"
|
#include "xkbsrv.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef RELOCATE_PROJECTROOT
|
#ifdef RELOCATE_PROJECTROOT
|
||||||
|
#pragma push_macro("Status")
|
||||||
|
#undef Status
|
||||||
|
#define Status wStatus
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
|
#pragma pop_macro("Status")
|
||||||
typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner,
|
typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner,
|
||||||
int nFolder,
|
int nFolder,
|
||||||
HANDLE hToken,
|
HANDLE hToken,
|
||||||
|
|
|
@ -153,6 +153,7 @@ XWin_SOURCES = $(SRCS)
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/miext/rootless
|
AM_CPPFLAGS = -I$(top_srcdir)/miext/rootless
|
||||||
|
|
||||||
XWIN_SYS_LIBS += -ldxguid
|
XWIN_SYS_LIBS += -ldxguid
|
||||||
|
XWIN_LIBS += $(top_builddir)/pseudoramiX/libPseudoramiX.la
|
||||||
|
|
||||||
XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(XSERVER_LIBS)
|
XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(XSERVER_LIBS)
|
||||||
XWin_LDADD = $(MULTIWINDOW_LIBS) $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS)
|
XWin_LDADD = $(MULTIWINDOW_LIBS) $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS)
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
/* Includes for authorization */
|
/* Includes for authorization */
|
||||||
#include "securitysrv.h"
|
#include "securitysrv.h"
|
||||||
|
#include "os/osdep.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constants
|
* Constants
|
||||||
|
@ -56,7 +57,6 @@ static char *g_pAuthData = NULL;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef XCSECURITY
|
#ifndef XCSECURITY
|
||||||
static
|
|
||||||
void
|
void
|
||||||
GenerateRandomData(int len, char *buf)
|
GenerateRandomData(int len, char *buf)
|
||||||
{
|
{
|
||||||
|
@ -70,9 +70,8 @@ GenerateRandomData(int len, char *buf)
|
||||||
static char cookie[16]; /* 128 bits */
|
static char cookie[16]; /* 128 bits */
|
||||||
|
|
||||||
XID
|
XID
|
||||||
static
|
|
||||||
MitGenerateCookie(unsigned data_length,
|
MitGenerateCookie(unsigned data_length,
|
||||||
char *data,
|
const char *data,
|
||||||
XID id, unsigned *data_length_return, char **data_return)
|
XID id, unsigned *data_length_return, char **data_return)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
|
@ -106,9 +106,6 @@ void
|
||||||
|
|
||||||
void *winClipboardProc(void *);
|
void *winClipboardProc(void *);
|
||||||
|
|
||||||
void
|
|
||||||
winDeinitClipboard(void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* winclipboardwndproc.c
|
* winclipboardwndproc.c
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -48,21 +48,10 @@
|
||||||
* References to external symbols
|
* References to external symbols
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern Bool g_fUseUnicode;
|
|
||||||
extern void *g_pClipboardDisplay;
|
extern void *g_pClipboardDisplay;
|
||||||
extern Window g_iClipboardWindow;
|
extern Window g_iClipboardWindow;
|
||||||
extern Atom g_atomLastOwnedSelection;
|
extern Atom g_atomLastOwnedSelection;
|
||||||
|
|
||||||
/*
|
|
||||||
* Local function prototypes
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int
|
|
||||||
|
|
||||||
|
|
||||||
winProcessXEventsTimeout(HWND hwnd, int iWindow, Display * pDisplay,
|
|
||||||
Bool fUseUnicode, int iTimeoutSec);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process X events up to specified timeout
|
* Process X events up to specified timeout
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -56,8 +56,6 @@ DISPATCH_PROC(winProcSetSelectionOwner);
|
||||||
* References to external symbols
|
* References to external symbols
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern unsigned int g_uiAuthDataLen;
|
|
||||||
extern char *g_pAuthData;
|
|
||||||
extern Bool g_fClipboardLaunched;
|
extern Bool g_fClipboardLaunched;
|
||||||
extern Bool g_fClipboardStarted;
|
extern Bool g_fClipboardStarted;
|
||||||
extern Bool g_fClipboard;
|
extern Bool g_fClipboard;
|
||||||
|
|
|
@ -162,7 +162,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
BITMAPV4HEADER bi;
|
BITMAPV4HEADER bi;
|
||||||
BITMAPINFO *pbmi;
|
BITMAPINFO *pbmi;
|
||||||
unsigned long *lpBits;
|
uint32_t *lpBits;
|
||||||
|
|
||||||
WIN_DEBUG_MSG("winLoadCursor: Win32: %dx%d X11: %dx%d hotspot: %d,%d\n",
|
WIN_DEBUG_MSG("winLoadCursor: Win32: %dx%d X11: %dx%d hotspot: %d,%d\n",
|
||||||
pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy,
|
pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy,
|
||||||
|
@ -256,15 +256,14 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
|
||||||
bi.bV4AlphaMask = 0xFF000000;
|
bi.bV4AlphaMask = 0xFF000000;
|
||||||
|
|
||||||
lpBits =
|
lpBits =
|
||||||
(unsigned long *) calloc(pScreenPriv->cursor.sm_cx *
|
(uint32_t *) calloc(pScreenPriv->cursor.sm_cx *
|
||||||
pScreenPriv->cursor.sm_cy,
|
pScreenPriv->cursor.sm_cy,
|
||||||
sizeof(unsigned long));
|
sizeof(uint32_t));
|
||||||
|
|
||||||
if (lpBits) {
|
if (lpBits) {
|
||||||
int y;
|
int y;
|
||||||
for (y = 0; y < nCY; y++) {
|
for (y = 0; y < nCY; y++) {
|
||||||
unsigned long *src, *dst;
|
void *src, *dst;
|
||||||
|
|
||||||
src = &(pCursor->bits->argb[y * pCursor->bits->width]);
|
src = &(pCursor->bits->argb[y * pCursor->bits->width]);
|
||||||
dst = &(lpBits[y * pScreenPriv->cursor.sm_cx]);
|
dst = &(lpBits[y * pScreenPriv->cursor.sm_cx]);
|
||||||
memcpy(dst, src, 4 * nCX);
|
memcpy(dst, src, 4 * nCX);
|
||||||
|
@ -273,9 +272,12 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
|
||||||
} /* End if-truecolor-icon */
|
} /* End if-truecolor-icon */
|
||||||
|
|
||||||
if (!lpBits) {
|
if (!lpBits) {
|
||||||
|
RGBQUAD *pbmiColors;
|
||||||
/* Bicolor, use a palettized DIB */
|
/* Bicolor, use a palettized DIB */
|
||||||
WIN_DEBUG_MSG("winLoadCursor: Trying two color cursor\n");
|
WIN_DEBUG_MSG("winLoadCursor: Trying two color cursor\n");
|
||||||
pbmi = (BITMAPINFO *) &bi;
|
pbmi = (BITMAPINFO *) &bi;
|
||||||
|
pbmiColors = &(pbmi->bmiColors[0]);
|
||||||
|
|
||||||
memset(pbmi, 0, sizeof(BITMAPINFOHEADER));
|
memset(pbmi, 0, sizeof(BITMAPINFOHEADER));
|
||||||
pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||||
pbmi->bmiHeader.biWidth = pScreenPriv->cursor.sm_cx;
|
pbmi->bmiHeader.biWidth = pScreenPriv->cursor.sm_cx;
|
||||||
|
@ -286,21 +288,22 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
|
||||||
pbmi->bmiHeader.biSizeImage = 0;
|
pbmi->bmiHeader.biSizeImage = 0;
|
||||||
pbmi->bmiHeader.biClrUsed = 3;
|
pbmi->bmiHeader.biClrUsed = 3;
|
||||||
pbmi->bmiHeader.biClrImportant = 3;
|
pbmi->bmiHeader.biClrImportant = 3;
|
||||||
pbmi->bmiColors[0].rgbRed = 0; /* Empty */
|
|
||||||
pbmi->bmiColors[0].rgbGreen = 0;
|
pbmiColors[0].rgbRed = 0; /* Empty */
|
||||||
pbmi->bmiColors[0].rgbBlue = 0;
|
pbmiColors[0].rgbGreen = 0;
|
||||||
pbmi->bmiColors[0].rgbReserved = 0;
|
pbmiColors[0].rgbBlue = 0;
|
||||||
pbmi->bmiColors[1].rgbRed = pCursor->backRed >> 8; /* Background */
|
pbmiColors[0].rgbReserved = 0;
|
||||||
pbmi->bmiColors[1].rgbGreen = pCursor->backGreen >> 8;
|
pbmiColors[1].rgbRed = pCursor->backRed >> 8; /* Background */
|
||||||
pbmi->bmiColors[1].rgbBlue = pCursor->backBlue >> 8;
|
pbmiColors[1].rgbGreen = pCursor->backGreen >> 8;
|
||||||
pbmi->bmiColors[1].rgbReserved = 0;
|
pbmiColors[1].rgbBlue = pCursor->backBlue >> 8;
|
||||||
pbmi->bmiColors[2].rgbRed = pCursor->foreRed >> 8; /* Foreground */
|
pbmiColors[1].rgbReserved = 0;
|
||||||
pbmi->bmiColors[2].rgbGreen = pCursor->foreGreen >> 8;
|
pbmiColors[2].rgbRed = pCursor->foreRed >> 8; /* Foreground */
|
||||||
pbmi->bmiColors[2].rgbBlue = pCursor->foreBlue >> 8;
|
pbmiColors[2].rgbGreen = pCursor->foreGreen >> 8;
|
||||||
pbmi->bmiColors[2].rgbReserved = 0;
|
pbmiColors[2].rgbBlue = pCursor->foreBlue >> 8;
|
||||||
|
pbmiColors[2].rgbReserved = 0;
|
||||||
|
|
||||||
lpBits =
|
lpBits =
|
||||||
(unsigned long *) calloc(pScreenPriv->cursor.sm_cx *
|
(uint32_t *) calloc(pScreenPriv->cursor.sm_cx *
|
||||||
pScreenPriv->cursor.sm_cy, sizeof(char));
|
pScreenPriv->cursor.sm_cy, sizeof(char));
|
||||||
|
|
||||||
pCur = (unsigned char *) lpBits;
|
pCur = (unsigned char *) lpBits;
|
||||||
|
|
|
@ -85,7 +85,6 @@ pthread_mutex_t g_pmTerminating = PTHREAD_MUTEX_INITIALIZER;
|
||||||
* Wrapped DIX functions
|
* Wrapped DIX functions
|
||||||
*/
|
*/
|
||||||
winDispatchProcPtr winProcEstablishConnectionOrig = NULL;
|
winDispatchProcPtr winProcEstablishConnectionOrig = NULL;
|
||||||
winDispatchProcPtr winProcQueryTreeOrig = NULL;
|
|
||||||
winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL;
|
winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#include <xwin-config.h>
|
#include <xwin-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* References to external symbols
|
* References to external symbols
|
||||||
*/
|
*/
|
||||||
|
@ -69,7 +71,6 @@ typedef int (*winDispatchProcPtr) (ClientPtr);
|
||||||
* Wrapped DIX functions
|
* Wrapped DIX functions
|
||||||
*/
|
*/
|
||||||
extern winDispatchProcPtr winProcEstablishConnectionOrig;
|
extern winDispatchProcPtr winProcEstablishConnectionOrig;
|
||||||
extern winDispatchProcPtr winProcQueryTreeOrig;
|
|
||||||
extern winDispatchProcPtr winProcSetSelectionOwnerOrig;
|
extern winDispatchProcPtr winProcSetSelectionOwnerOrig;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -488,7 +488,7 @@ getHwnd(WMInfoPtr pWMInfo, Window iWindow)
|
||||||
iWindow,
|
iWindow,
|
||||||
pWMInfo->atmPrivMap,
|
pWMInfo->atmPrivMap,
|
||||||
0,
|
0,
|
||||||
1,
|
sizeof(HWND)/4,
|
||||||
False,
|
False,
|
||||||
XA_INTEGER,
|
XA_INTEGER,
|
||||||
&atmType,
|
&atmType,
|
||||||
|
@ -747,10 +747,10 @@ winMultiWindowWMProc(void *pArg)
|
||||||
ErrorF("\tWM_WM_MAP\n");
|
ErrorF("\tWM_WM_MAP\n");
|
||||||
#endif
|
#endif
|
||||||
/* Put a note as to the HWND associated with this Window */
|
/* Put a note as to the HWND associated with this Window */
|
||||||
XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER, //pWMInfo->atmPrivMap,
|
XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER,
|
||||||
32,
|
32,
|
||||||
PropModeReplace,
|
PropModeReplace,
|
||||||
(unsigned char *) &(pNode->msg.hwndWindow), 1);
|
(unsigned char *) &(pNode->msg.hwndWindow), sizeof(HWND)/4);
|
||||||
UpdateName(pWMInfo, pNode->msg.iWindow);
|
UpdateName(pWMInfo, pNode->msg.iWindow);
|
||||||
UpdateIcon(pWMInfo, pNode->msg.iWindow);
|
UpdateIcon(pWMInfo, pNode->msg.iWindow);
|
||||||
break;
|
break;
|
||||||
|
@ -759,10 +759,10 @@ winMultiWindowWMProc(void *pArg)
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
ErrorF("\tWM_WM_MAP2\n");
|
ErrorF("\tWM_WM_MAP2\n");
|
||||||
#endif
|
#endif
|
||||||
XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER, //pWMInfo->atmPrivMap,
|
XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER,
|
||||||
32,
|
32,
|
||||||
PropModeReplace,
|
PropModeReplace,
|
||||||
(unsigned char *) &(pNode->msg.hwndWindow), 1);
|
(unsigned char *) &(pNode->msg.hwndWindow), sizeof(HWND)/4);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_WM_MAP3:
|
case WM_WM_MAP3:
|
||||||
|
@ -770,10 +770,10 @@ winMultiWindowWMProc(void *pArg)
|
||||||
ErrorF("\tWM_WM_MAP3\n");
|
ErrorF("\tWM_WM_MAP3\n");
|
||||||
#endif
|
#endif
|
||||||
/* Put a note as to the HWND associated with this Window */
|
/* Put a note as to the HWND associated with this Window */
|
||||||
XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER, //pWMInfo->atmPrivMap,
|
XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER,
|
||||||
32,
|
32,
|
||||||
PropModeReplace,
|
PropModeReplace,
|
||||||
(unsigned char *) &(pNode->msg.hwndWindow), 1);
|
(unsigned char *) &(pNode->msg.hwndWindow), sizeof(HWND)/4);
|
||||||
UpdateName(pWMInfo, pNode->msg.iWindow);
|
UpdateName(pWMInfo, pNode->msg.iWindow);
|
||||||
UpdateIcon(pWMInfo, pNode->msg.iWindow);
|
UpdateIcon(pWMInfo, pNode->msg.iWindow);
|
||||||
UpdateStyle(pWMInfo, pNode->msg.iWindow);
|
UpdateStyle(pWMInfo, pNode->msg.iWindow);
|
||||||
|
@ -1061,15 +1061,13 @@ winMultiWindowXMsgProc(void *pArg)
|
||||||
(pProcArg->pDisplay, pProcArg->dwScreen, TRUE)) {
|
(pProcArg->pDisplay, pProcArg->dwScreen, TRUE)) {
|
||||||
if (!g_fAnotherWMRunning) {
|
if (!g_fAnotherWMRunning) {
|
||||||
g_fAnotherWMRunning = TRUE;
|
g_fAnotherWMRunning = TRUE;
|
||||||
SendMessage(*(HWND *) pProcArg->hwndScreen, WM_UNMANAGE, 0,
|
SendMessage(pProcArg->hwndScreen, WM_UNMANAGE, 0, 0);
|
||||||
0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (g_fAnotherWMRunning) {
|
if (g_fAnotherWMRunning) {
|
||||||
g_fAnotherWMRunning = FALSE;
|
g_fAnotherWMRunning = FALSE;
|
||||||
SendMessage(*(HWND *) pProcArg->hwndScreen, WM_MANAGE, 0,
|
SendMessage(pProcArg->hwndScreen, WM_MANAGE, 0, 0);
|
||||||
0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Sleep(500);
|
Sleep(500);
|
||||||
|
|
|
@ -420,14 +420,14 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
/*
|
/*
|
||||||
* Add whatever the setup file wants to for this window
|
* Add whatever the setup file wants to for this window
|
||||||
*/
|
*/
|
||||||
SetupSysMenu((unsigned long) hwnd);
|
SetupSysMenu(hwnd);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_SYSCOMMAND:
|
case WM_SYSCOMMAND:
|
||||||
/*
|
/*
|
||||||
* Any window menu items go through here
|
* Any window menu items go through here
|
||||||
*/
|
*/
|
||||||
if (HandleCustomWM_COMMAND((unsigned long) hwnd, LOWORD(wParam))) {
|
if (HandleCustomWM_COMMAND(hwnd, LOWORD(wParam))) {
|
||||||
/* Don't pass customized menus to DefWindowProc */
|
/* Don't pass customized menus to DefWindowProc */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -443,7 +443,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
case WM_INITMENU:
|
case WM_INITMENU:
|
||||||
/* Checks/Unchecks any menu items before they are displayed */
|
/* Checks/Unchecks any menu items before they are displayed */
|
||||||
HandleCustomWM_INITMENU((unsigned long) hwnd, wParam);
|
HandleCustomWM_INITMENU(hwnd, (HMENU)wParam);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_ERASEBKGND:
|
case WM_ERASEBKGND:
|
||||||
|
@ -825,7 +825,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
/* Prevent the mouse wheel from stalling when another window is minimized */
|
/* Prevent the mouse wheel from stalling when another window is minimized */
|
||||||
if (HIWORD(wParam) == 0 && LOWORD(wParam) == WA_ACTIVE &&
|
if (HIWORD(wParam) == 0 && LOWORD(wParam) == WA_ACTIVE &&
|
||||||
(HWND) lParam != NULL && (HWND) lParam != (HWND) GetParent(hwnd))
|
(HWND) lParam != NULL && (HWND) lParam != GetParent(hwnd))
|
||||||
SetFocus(hwnd);
|
SetFocus(hwnd);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ ReloadEnumWindowsProc(HWND hwnd, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the system menu for this window */
|
/* Update the system menu for this window */
|
||||||
SetupSysMenu((unsigned long) hwnd);
|
SetupSysMenu(hwnd);
|
||||||
|
|
||||||
/* That was easy... */
|
/* That was easy... */
|
||||||
}
|
}
|
||||||
|
@ -275,15 +275,11 @@ ReloadPrefs(void)
|
||||||
* Check/uncheck the ALWAYSONTOP items in this menu
|
* Check/uncheck the ALWAYSONTOP items in this menu
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
HandleCustomWM_INITMENU(unsigned long hwndIn, unsigned long hmenuIn)
|
HandleCustomWM_INITMENU(HWND hwnd, HMENU hmenu)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
|
||||||
HMENU hmenu;
|
|
||||||
DWORD dwExStyle;
|
DWORD dwExStyle;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
hwnd = (HWND) hwndIn;
|
|
||||||
hmenu = (HMENU) hmenuIn;
|
|
||||||
if (!hwnd || !hmenu)
|
if (!hwnd || !hmenu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -305,15 +301,12 @@ HandleCustomWM_INITMENU(unsigned long hwndIn, unsigned long hmenuIn)
|
||||||
* Return TRUE if command is proccessed, FALSE otherwise.
|
* Return TRUE if command is proccessed, FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
Bool
|
Bool
|
||||||
HandleCustomWM_COMMAND(unsigned long hwndIn, int command)
|
HandleCustomWM_COMMAND(HWND hwnd, int command)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
|
||||||
int i, j;
|
int i, j;
|
||||||
MENUPARSED *m;
|
MENUPARSED *m;
|
||||||
DWORD dwExStyle;
|
DWORD dwExStyle;
|
||||||
|
|
||||||
hwnd = (HWND) hwndIn;
|
|
||||||
|
|
||||||
if (!command)
|
if (!command)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -412,15 +405,13 @@ HandleCustomWM_COMMAND(unsigned long hwndIn, int command)
|
||||||
* Add the default or a custom menu depending on the class match
|
* Add the default or a custom menu depending on the class match
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
SetupSysMenu(unsigned long hwndIn)
|
SetupSysMenu(HWND hwnd)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
|
||||||
HMENU sys;
|
HMENU sys;
|
||||||
int i;
|
int i;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
char *res_name, *res_class;
|
char *res_name, *res_class;
|
||||||
|
|
||||||
hwnd = (HWND) hwndIn;
|
|
||||||
if (!hwnd)
|
if (!hwnd)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -465,11 +456,8 @@ SetupSysMenu(unsigned long hwndIn)
|
||||||
* Possibly add a menu to the toolbar icon
|
* Possibly add a menu to the toolbar icon
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
SetupRootMenu(unsigned long hmenuRoot)
|
SetupRootMenu(HMENU root)
|
||||||
{
|
{
|
||||||
HMENU root;
|
|
||||||
|
|
||||||
root = (HMENU) hmenuRoot;
|
|
||||||
if (!root)
|
if (!root)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -150,16 +150,16 @@ void
|
||||||
LoadPreferences(void);
|
LoadPreferences(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
SetupRootMenu(unsigned long hmenuRoot);
|
SetupRootMenu(HMENU root);
|
||||||
|
|
||||||
void
|
void
|
||||||
SetupSysMenu(unsigned long hwndIn);
|
SetupSysMenu(HWND hwnd);
|
||||||
|
|
||||||
void
|
void
|
||||||
HandleCustomWM_INITMENU(unsigned long hwndIn, unsigned long hmenuIn);
|
HandleCustomWM_INITMENU(HWND hwnd, HMENU hmenu);
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
HandleCustomWM_COMMAND(unsigned long hwndIn, int command);
|
HandleCustomWM_COMMAND(HWND hwnd, int command);
|
||||||
|
|
||||||
int
|
int
|
||||||
winIconIsOverride(HICON hicon);
|
winIconIsOverride(HICON hicon);
|
||||||
|
|
|
@ -46,7 +46,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
|
||||||
PixmapPtr pPixmap = NULL;
|
PixmapPtr pPixmap = NULL;
|
||||||
winPrivPixmapPtr pPixmapPriv = NULL;
|
winPrivPixmapPtr pPixmapPriv = NULL;
|
||||||
HBITMAP hbmpOrig = NULL;
|
HBITMAP hbmpOrig = NULL;
|
||||||
BITMAPINFO bmi;
|
BITMAPINFO *pbmi;
|
||||||
HRGN hrgn = NULL, combined = NULL;
|
HRGN hrgn = NULL, combined = NULL;
|
||||||
int nbox;
|
int nbox;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
|
@ -57,6 +57,8 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
|
||||||
if (!nbox)
|
if (!nbox)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
pbmi = malloc(sizeof(BITMAPINFO) + sizeof(RGBQUAD));
|
||||||
|
|
||||||
combined = CreateRectRgn(pbox->x1, pbox->y1, pbox->x2, pbox->y2);
|
combined = CreateRectRgn(pbox->x1, pbox->y1, pbox->x2, pbox->y2);
|
||||||
nbox--;
|
nbox--;
|
||||||
pbox++;
|
pbox++;
|
||||||
|
@ -86,19 +88,20 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
|
||||||
"failed on pPixmapPriv->hBitmap\n");
|
"failed on pPixmapPriv->hBitmap\n");
|
||||||
|
|
||||||
while (iSpans--) {
|
while (iSpans--) {
|
||||||
ZeroMemory(&bmi, sizeof(BITMAPINFO));
|
ZeroMemory(pbmi, sizeof(BITMAPINFO));
|
||||||
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||||
bmi.bmiHeader.biWidth = *piWidths;
|
pbmi->bmiHeader.biWidth = *piWidths;
|
||||||
bmi.bmiHeader.biHeight = 1;
|
pbmi->bmiHeader.biHeight = 1;
|
||||||
bmi.bmiHeader.biPlanes = 1;
|
pbmi->bmiHeader.biPlanes = 1;
|
||||||
bmi.bmiHeader.biBitCount = pDrawable->depth;
|
pbmi->bmiHeader.biBitCount = pDrawable->depth;
|
||||||
bmi.bmiHeader.biCompression = BI_RGB;
|
pbmi->bmiHeader.biCompression = BI_RGB;
|
||||||
|
|
||||||
/* Setup color table for mono DIBs */
|
/* Setup color table for mono DIBs */
|
||||||
if (pDrawable->depth == 1) {
|
if (pDrawable->depth == 1) {
|
||||||
bmi.bmiColors[1].rgbBlue = 255;
|
RGBQUAD *bmiColors = &(pbmi->bmiColors[0]);
|
||||||
bmi.bmiColors[1].rgbGreen = 255;
|
bmiColors[1].rgbBlue = 255;
|
||||||
bmi.bmiColors[1].rgbRed = 255;
|
bmiColors[1].rgbGreen = 255;
|
||||||
|
bmiColors[1].rgbRed = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
StretchDIBits(pGCPriv->hdcMem,
|
StretchDIBits(pGCPriv->hdcMem,
|
||||||
|
@ -107,7 +110,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
|
||||||
0, 0,
|
0, 0,
|
||||||
*piWidths, 1,
|
*piWidths, 1,
|
||||||
pSrcs,
|
pSrcs,
|
||||||
(BITMAPINFO *) &bmi,
|
(BITMAPINFO *) pbmi,
|
||||||
DIB_RGB_COLORS, g_copyROP[pGC->alu]);
|
DIB_RGB_COLORS, g_copyROP[pGC->alu]);
|
||||||
|
|
||||||
pSrcs += PixmapBytePad(*piWidths, pDrawable->depth);
|
pSrcs += PixmapBytePad(*piWidths, pDrawable->depth);
|
||||||
|
@ -129,19 +132,20 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
|
||||||
combined = NULL;
|
combined = NULL;
|
||||||
|
|
||||||
while (iSpans--) {
|
while (iSpans--) {
|
||||||
ZeroMemory(&bmi, sizeof(BITMAPINFO));
|
ZeroMemory(pbmi, sizeof(BITMAPINFO));
|
||||||
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||||
bmi.bmiHeader.biWidth = *piWidths;
|
pbmi->bmiHeader.biWidth = *piWidths;
|
||||||
bmi.bmiHeader.biHeight = 1;
|
pbmi->bmiHeader.biHeight = 1;
|
||||||
bmi.bmiHeader.biPlanes = 1;
|
pbmi->bmiHeader.biPlanes = 1;
|
||||||
bmi.bmiHeader.biBitCount = pDrawable->depth;
|
pbmi->bmiHeader.biBitCount = pDrawable->depth;
|
||||||
bmi.bmiHeader.biCompression = BI_RGB;
|
pbmi->bmiHeader.biCompression = BI_RGB;
|
||||||
|
|
||||||
/* Setup color table for mono DIBs */
|
/* Setup color table for mono DIBs */
|
||||||
if (pDrawable->depth == 1) {
|
if (pDrawable->depth == 1) {
|
||||||
bmi.bmiColors[1].rgbBlue = 255;
|
RGBQUAD *bmiColors = &(pbmi->bmiColors[0]);
|
||||||
bmi.bmiColors[1].rgbGreen = 255;
|
bmiColors[1].rgbBlue = 255;
|
||||||
bmi.bmiColors[1].rgbRed = 255;
|
bmiColors[1].rgbGreen = 255;
|
||||||
|
bmiColors[1].rgbRed = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
StretchDIBits(pGCPriv->hdc,
|
StretchDIBits(pGCPriv->hdc,
|
||||||
|
@ -150,7 +154,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
|
||||||
0, 0,
|
0, 0,
|
||||||
*piWidths, 1,
|
*piWidths, 1,
|
||||||
pSrcs,
|
pSrcs,
|
||||||
(BITMAPINFO *) &bmi,
|
(BITMAPINFO *) pbmi,
|
||||||
DIB_RGB_COLORS, g_copyROP[pGC->alu]);
|
DIB_RGB_COLORS, g_copyROP[pGC->alu]);
|
||||||
|
|
||||||
pSrcs += PixmapBytePad(*piWidths, pDrawable->depth);
|
pSrcs += PixmapBytePad(*piWidths, pDrawable->depth);
|
||||||
|
@ -166,4 +170,6 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
|
||||||
FatalError("\nwinSetSpansNativeGDI - Unknown drawable type\n\n");
|
FatalError("\nwinSetSpansNativeGDI - Unknown drawable type\n\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(pbmi);
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,7 @@ winHandleIconMessage(HWND hwnd, UINT message,
|
||||||
RemoveMenu(hmenuTray, ID_APP_HIDE_ROOT, MF_BYCOMMAND);
|
RemoveMenu(hmenuTray, ID_APP_HIDE_ROOT, MF_BYCOMMAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetupRootMenu((unsigned long) hmenuTray);
|
SetupRootMenu(hmenuTray);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: This three-step procedure is required for
|
* NOTE: This three-step procedure is required for
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Fake Xinerama extension
|
||||||
|
|
||||||
|
AM_CFLAGS = $(DIX_CFLAGS)
|
||||||
|
|
||||||
|
noinst_LTLIBRARIES = libPseudoramiX.la
|
||||||
|
|
||||||
|
libPseudoramiX_la_SOURCES = pseudoramiX.c pseudoramiX.h
|
Loading…
Reference in New Issue