Merge remote-tracking branch 'jturney/master'
This commit is contained in:
commit
d9fdae5f4a
|
@ -108,10 +108,11 @@ InitInput(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_pwinPointer = AddInputDevice(serverClient, winMouseProc, TRUE);
|
if (AllocDevicePair(serverClient, "Windows",
|
||||||
g_pwinKeyboard = AddInputDevice(serverClient, winKeybdProc, TRUE);
|
&g_pwinPointer, &g_pwinKeyboard,
|
||||||
g_pwinPointer->name = strdup("Windows mouse");
|
winMouseProc, winKeybdProc,
|
||||||
g_pwinKeyboard->name = strdup("Windows keyboard");
|
FALSE) != Success)
|
||||||
|
FatalError("InitInput - Failed to allocate slave devices.\n");
|
||||||
|
|
||||||
mieqInit();
|
mieqInit();
|
||||||
|
|
||||||
|
|
|
@ -271,10 +271,10 @@ ddxGiveUp(enum ExitCode error)
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
|
|
||||||
{
|
{
|
||||||
winDebug("ddxGiveUp - Releasing termination mutex\n");
|
|
||||||
|
|
||||||
int iReturn = pthread_mutex_unlock(&g_pmTerminating);
|
int iReturn = pthread_mutex_unlock(&g_pmTerminating);
|
||||||
|
|
||||||
|
winDebug("ddxGiveUp - Releasing termination mutex\n");
|
||||||
|
|
||||||
if (iReturn != 0) {
|
if (iReturn != 0) {
|
||||||
ErrorF("winMsgWindowProc - pthread_mutex_unlock () failed: %d\n",
|
ErrorF("winMsgWindowProc - pthread_mutex_unlock () failed: %d\n",
|
||||||
iReturn);
|
iReturn);
|
||||||
|
@ -786,6 +786,9 @@ winUseMsg(void)
|
||||||
|
|
||||||
ErrorF("-fullscreen\n" "\tRun the server in fullscreen mode.\n");
|
ErrorF("-fullscreen\n" "\tRun the server in fullscreen mode.\n");
|
||||||
|
|
||||||
|
ErrorF("-hostintitle\n"
|
||||||
|
"\tIn multiwindow mode, add remote host names to window titles.\n");
|
||||||
|
|
||||||
ErrorF("-ignoreinput\n" "\tIgnore keyboard and mouse input.\n");
|
ErrorF("-ignoreinput\n" "\tIgnore keyboard and mouse input.\n");
|
||||||
|
|
||||||
#ifdef XWIN_MULTIWINDOWEXTWM
|
#ifdef XWIN_MULTIWINDOWEXTWM
|
||||||
|
|
|
@ -165,6 +165,12 @@ The maximum dimensions of the screen are the dimensions of the \fIWindows\fP vir
|
||||||
on its own is equivalent to \fB\-resize=randr\fP
|
on its own is equivalent to \fB\-resize=randr\fP
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
.SH OPTIONS FOR MULTIWINDOW MODE
|
||||||
|
.TP 8
|
||||||
|
.B \-hostintitle
|
||||||
|
Add the host name to the window title for X applications which are running
|
||||||
|
on remote hosts, when that information is available and it's useful to do so.
|
||||||
|
|
||||||
.SH OPTIONS CONTROLLING WINDOWS INTEGRATION
|
.SH OPTIONS CONTROLLING WINDOWS INTEGRATION
|
||||||
.TP 8
|
.TP 8
|
||||||
.B \-[no]clipboard
|
.B \-[no]clipboard
|
||||||
|
|
|
@ -1335,9 +1335,6 @@ void
|
||||||
void
|
void
|
||||||
winMWExtWMMoveResizeXWindow(WindowPtr pWin, int x, int y, int w, int h);
|
winMWExtWMMoveResizeXWindow(WindowPtr pWin, int x, int y, int w, int h);
|
||||||
|
|
||||||
void
|
|
||||||
winMWExtWMUpdateIcon(Window id);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
||||||
winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv,
|
winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv,
|
||||||
|
|
|
@ -97,9 +97,9 @@ MitGenerateCookie(unsigned data_length,
|
||||||
static
|
static
|
||||||
XID
|
XID
|
||||||
GenerateAuthorization(unsigned name_length,
|
GenerateAuthorization(unsigned name_length,
|
||||||
char *name,
|
const char *name,
|
||||||
unsigned data_length,
|
unsigned data_length,
|
||||||
char *data,
|
const char *data,
|
||||||
unsigned *data_length_return, char **data_return)
|
unsigned *data_length_return, char **data_return)
|
||||||
{
|
{
|
||||||
return MitGenerateCookie(data_length, data,
|
return MitGenerateCookie(data_length, data,
|
||||||
|
|
|
@ -574,10 +574,7 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
winInitDialog(hwndDialog);
|
winInitDialog(hwndDialog);
|
||||||
|
|
||||||
/* Override the URL buttons */
|
/* Override the URL buttons */
|
||||||
winOverrideURLButton(hwndDialog, ID_ABOUT_CHANGELOG);
|
|
||||||
winOverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE);
|
winOverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE);
|
||||||
winOverrideURLButton(hwndDialog, ID_ABOUT_UG);
|
|
||||||
winOverrideURLButton(hwndDialog, ID_ABOUT_FAQ);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
@ -608,30 +605,10 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0);
|
PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0);
|
||||||
|
|
||||||
/* Restore window procedures for URL buttons */
|
/* Restore window procedures for URL buttons */
|
||||||
winUnoverrideURLButton(hwndDialog, ID_ABOUT_CHANGELOG);
|
|
||||||
winUnoverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE);
|
winUnoverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE);
|
||||||
winUnoverrideURLButton(hwndDialog, ID_ABOUT_UG);
|
|
||||||
winUnoverrideURLButton(hwndDialog, ID_ABOUT_FAQ);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case ID_ABOUT_CHANGELOG:
|
|
||||||
{
|
|
||||||
INT_PTR iReturn;
|
|
||||||
|
|
||||||
const char *pszWinPath = "http://x.cygwin.com/"
|
|
||||||
"devel/server/changelog.html";
|
|
||||||
|
|
||||||
iReturn = (INT_PTR) ShellExecute(NULL,
|
|
||||||
"open",
|
|
||||||
pszWinPath, NULL, NULL, SW_MAXIMIZE);
|
|
||||||
if (iReturn < 32) {
|
|
||||||
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_CHANGELOG - "
|
|
||||||
"ShellExecute failed: %d\n", (int)iReturn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
case ID_ABOUT_WEBSITE:
|
case ID_ABOUT_WEBSITE:
|
||||||
{
|
{
|
||||||
const char *pszPath = __VENDORDWEBSUPPORT__;
|
const char *pszPath = __VENDORDWEBSUPPORT__;
|
||||||
|
@ -647,36 +624,6 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case ID_ABOUT_UG:
|
|
||||||
{
|
|
||||||
const char *pszPath = "http://x.cygwin.com/docs/ug/";
|
|
||||||
INT_PTR iReturn;
|
|
||||||
|
|
||||||
iReturn = (INT_PTR) ShellExecute(NULL,
|
|
||||||
"open",
|
|
||||||
pszPath, NULL, NULL, SW_MAXIMIZE);
|
|
||||||
if (iReturn < 32) {
|
|
||||||
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_UG - "
|
|
||||||
"ShellExecute failed: %d\n", (int)iReturn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
case ID_ABOUT_FAQ:
|
|
||||||
{
|
|
||||||
const char *pszPath = "http://x.cygwin.com/docs/faq/";
|
|
||||||
INT_PTR iReturn;
|
|
||||||
|
|
||||||
iReturn = (INT_PTR) ShellExecute(NULL,
|
|
||||||
"open",
|
|
||||||
pszPath, NULL, NULL, SW_MAXIMIZE);
|
|
||||||
if (iReturn < 32) {
|
|
||||||
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_FAQ - "
|
|
||||||
"ShellExecute failed: %d\n", (int)iReturn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -690,10 +637,7 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0);
|
PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0);
|
||||||
|
|
||||||
/* Restore window procedures for URL buttons */
|
/* Restore window procedures for URL buttons */
|
||||||
winUnoverrideURLButton(hwndDialog, ID_ABOUT_CHANGELOG);
|
|
||||||
winUnoverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE);
|
winUnoverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE);
|
||||||
winUnoverrideURLButton(hwndDialog, ID_ABOUT_UG);
|
|
||||||
winUnoverrideURLButton(hwndDialog, ID_ABOUT_FAQ);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@ Bool g_fNoHelpMessageBox = FALSE;
|
||||||
Bool g_fSoftwareCursor = FALSE;
|
Bool g_fSoftwareCursor = FALSE;
|
||||||
Bool g_fSilentDupError = FALSE;
|
Bool g_fSilentDupError = FALSE;
|
||||||
Bool g_fNativeGl = TRUE;
|
Bool g_fNativeGl = TRUE;
|
||||||
|
Bool g_fHostInTitle = FALSE;
|
||||||
pthread_mutex_t g_pmTerminating = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t g_pmTerminating = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
#ifdef XWIN_CLIPBOARD
|
#ifdef XWIN_CLIPBOARD
|
||||||
|
|
|
@ -54,6 +54,7 @@ extern Bool g_fXdmcpEnabled;
|
||||||
extern Bool g_fNoHelpMessageBox;
|
extern Bool g_fNoHelpMessageBox;
|
||||||
extern Bool g_fSilentDupError;
|
extern Bool g_fSilentDupError;
|
||||||
extern Bool g_fNativeGl;
|
extern Bool g_fNativeGl;
|
||||||
|
extern Bool g_fHostInTitle;
|
||||||
|
|
||||||
extern HWND g_hDlgDepthChange;
|
extern HWND g_hDlgDepthChange;
|
||||||
extern HWND g_hDlgExit;
|
extern HWND g_hDlgExit;
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_XWIN_CONFIG_H
|
||||||
|
#include <xwin-config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -372,13 +372,12 @@ winXIconToHICON(Display * pDisplay, Window id, int iconSize)
|
||||||
unsigned char *mask, *image = NULL, *imageMask;
|
unsigned char *mask, *image = NULL, *imageMask;
|
||||||
unsigned char *dst, *src;
|
unsigned char *dst, *src;
|
||||||
int planes, bpp, i;
|
int planes, bpp, i;
|
||||||
int biggest_size = 0;
|
unsigned int biggest_size = 0;
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
ICONINFO ii;
|
ICONINFO ii;
|
||||||
XWMHints *hints;
|
XWMHints *hints;
|
||||||
HICON hIcon = NULL;
|
HICON hIcon = NULL;
|
||||||
uint32_t *biggest_icon = NULL;
|
uint32_t *biggest_icon = NULL;
|
||||||
|
|
||||||
static Atom _XA_NET_WM_ICON;
|
static Atom _XA_NET_WM_ICON;
|
||||||
static int generation;
|
static int generation;
|
||||||
uint32_t *icon, *icon_data = NULL;
|
uint32_t *icon, *icon_data = NULL;
|
||||||
|
@ -405,10 +404,25 @@ winXIconToHICON(Display * pDisplay, Window id, int iconSize)
|
||||||
(icon_data != NULL)) {
|
(icon_data != NULL)) {
|
||||||
for (icon = icon_data; icon < &icon_data[size] && *icon;
|
for (icon = icon_data; icon < &icon_data[size] && *icon;
|
||||||
icon = &icon[icon[0] * icon[1] + 2]) {
|
icon = &icon[icon[0] * icon[1] + 2]) {
|
||||||
/* Find an exact match to the size we require... */
|
winDebug("winXIconToHICON: %u x %u NetIcon\n", icon[0], icon[1]);
|
||||||
|
|
||||||
|
/* Icon data size will overflow an int and thus is bigger than the
|
||||||
|
property can possibly be */
|
||||||
|
if ((INT_MAX/icon[0]) < icon[1]) {
|
||||||
|
winDebug("winXIconToHICON: _NET_WM_ICON icon data size overflow\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Icon data size is bigger than amount of data remaining */
|
||||||
|
if (&icon[icon[0] * icon[1] + 2] > &icon_data[size]) {
|
||||||
|
winDebug("winXIconToHICON: _NET_WM_ICON data is malformed\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Found an exact match to the size we require... */
|
||||||
if (icon[0] == iconSize && icon[1] == iconSize) {
|
if (icon[0] == iconSize && icon[1] == iconSize) {
|
||||||
winDebug("winXIconToHICON: found %lu x %lu NetIcon\n", icon[0],
|
winDebug("winXIconToHICON: selected %d x %d NetIcon\n",
|
||||||
icon[1]);
|
iconSize, iconSize);
|
||||||
hIcon = NetWMToWinIcon(bpp, icon);
|
hIcon = NetWMToWinIcon(bpp, icon);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -421,7 +435,7 @@ winXIconToHICON(Display * pDisplay, Window id, int iconSize)
|
||||||
|
|
||||||
if (!hIcon && biggest_icon) {
|
if (!hIcon && biggest_icon) {
|
||||||
winDebug
|
winDebug
|
||||||
("winXIconToHICON: selected %lu x %lu NetIcon for scaling to %u x %u\n",
|
("winXIconToHICON: selected %u x %u NetIcon for scaling to %d x %d\n",
|
||||||
biggest_icon[0], biggest_icon[1], iconSize, iconSize);
|
biggest_icon[0], biggest_icon[1], iconSize, iconSize);
|
||||||
|
|
||||||
hIcon = NetWMToWinIcon(bpp, biggest_icon);
|
hIcon = NetWMToWinIcon(bpp, biggest_icon);
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
|
#include "winglobals.h"
|
||||||
|
|
||||||
#ifdef XWIN_MULTIWINDOWEXTWM
|
#ifdef XWIN_MULTIWINDOWEXTWM
|
||||||
#include <X11/extensions/windowswmstr.h>
|
#include <X11/extensions/windowswmstr.h>
|
||||||
|
@ -69,6 +70,10 @@
|
||||||
#define WINDOWSWM_NATIVE_HWND "_WINDOWSWM_NATIVE_HWND"
|
#define WINDOWSWM_NATIVE_HWND "_WINDOWSWM_NATIVE_HWND"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HOST_NAME_MAX
|
||||||
|
#define HOST_NAME_MAX 255
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void winDebug(const char *format, ...);
|
extern void winDebug(const char *format, ...);
|
||||||
extern void winReshapeMultiWindow(WindowPtr pWin);
|
extern void winReshapeMultiWindow(WindowPtr pWin);
|
||||||
extern void winUpdateRgnMultiWindow(WindowPtr pWin);
|
extern void winUpdateRgnMultiWindow(WindowPtr pWin);
|
||||||
|
@ -430,7 +435,10 @@ GetWindowName(Display * pDisplay, Window iWin, char **ppWindowName)
|
||||||
{
|
{
|
||||||
int nResult;
|
int nResult;
|
||||||
XTextProperty xtpWindowName;
|
XTextProperty xtpWindowName;
|
||||||
|
XTextProperty xtpClientMachine;
|
||||||
char *pszWindowName;
|
char *pszWindowName;
|
||||||
|
char *pszClientMachine;
|
||||||
|
char hostname[HOST_NAME_MAX + 1];
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
ErrorF("GetWindowName\n");
|
ErrorF("GetWindowName\n");
|
||||||
|
@ -450,6 +458,41 @@ GetWindowName(Display * pDisplay, Window iWin, char **ppWindowName)
|
||||||
|
|
||||||
pszWindowName = Xutf8TextPropertyToString(pDisplay, &xtpWindowName);
|
pszWindowName = Xutf8TextPropertyToString(pDisplay, &xtpWindowName);
|
||||||
XFree(xtpWindowName.value);
|
XFree(xtpWindowName.value);
|
||||||
|
|
||||||
|
if (g_fHostInTitle) {
|
||||||
|
/* Try to get client machine name */
|
||||||
|
nResult = XGetWMClientMachine(pDisplay, iWin, &xtpClientMachine);
|
||||||
|
if (nResult && xtpClientMachine.value && xtpClientMachine.nitems) {
|
||||||
|
pszClientMachine =
|
||||||
|
Xutf8TextPropertyToString(pDisplay, &xtpClientMachine);
|
||||||
|
XFree(xtpClientMachine.value);
|
||||||
|
|
||||||
|
/*
|
||||||
|
If we have a client machine name
|
||||||
|
and it's not the local host name
|
||||||
|
and it's not already in the window title...
|
||||||
|
*/
|
||||||
|
if (strlen(pszClientMachine) &&
|
||||||
|
!gethostname(hostname, HOST_NAME_MAX + 1) &&
|
||||||
|
strcmp(hostname, pszClientMachine) &&
|
||||||
|
(strstr(pszWindowName, pszClientMachine) == 0)) {
|
||||||
|
/* ... add '@<clientmachine>' to end of window name */
|
||||||
|
*ppWindowName =
|
||||||
|
malloc(strlen(pszWindowName) +
|
||||||
|
strlen(pszClientMachine) + 2);
|
||||||
|
strcpy(*ppWindowName, pszWindowName);
|
||||||
|
strcat(*ppWindowName, "@");
|
||||||
|
strcat(*ppWindowName, pszClientMachine);
|
||||||
|
|
||||||
|
free(pszWindowName);
|
||||||
|
free(pszClientMachine);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* otherwise just return the window name */
|
||||||
*ppWindowName = pszWindowName;
|
*ppWindowName = pszWindowName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1618,10 +1661,10 @@ winDeinitMultiWindowWM(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Windows window styles */
|
/* Windows window styles */
|
||||||
#define HINT_NOFRAME (1l<<0)
|
#define HINT_NOFRAME (1L<<0)
|
||||||
#define HINT_BORDER (1L<<1)
|
#define HINT_BORDER (1L<<1)
|
||||||
#define HINT_SIZEBOX (1l<<2)
|
#define HINT_SIZEBOX (1L<<2)
|
||||||
#define HINT_CAPTION (1l<<3)
|
#define HINT_CAPTION (1L<<3)
|
||||||
#define HINT_NOMAXIMIZE (1L<<4)
|
#define HINT_NOMAXIMIZE (1L<<4)
|
||||||
#define HINT_NOMINIMIZE (1L<<5)
|
#define HINT_NOMINIMIZE (1L<<5)
|
||||||
#define HINT_NOSYSMENU (1L<<6)
|
#define HINT_NOSYSMENU (1L<<6)
|
||||||
|
|
|
@ -316,6 +316,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
static Bool s_fTracking = FALSE;
|
static Bool s_fTracking = FALSE;
|
||||||
Bool needRestack = FALSE;
|
Bool needRestack = FALSE;
|
||||||
LRESULT ret;
|
LRESULT ret;
|
||||||
|
static Bool hasEnteredSizeMove = FALSE;
|
||||||
|
|
||||||
#if CYGDEBUG
|
#if CYGDEBUG
|
||||||
winDebugWin32Message("winTopLevelWindowProc", hwnd, message, wParam,
|
winDebugWin32Message("winTopLevelWindowProc", hwnd, message, wParam,
|
||||||
|
@ -837,7 +838,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
/* Removep AppUserModelID property */
|
/* Remove AppUserModelID property */
|
||||||
winSetAppUserModelID(hwnd, NULL);
|
winSetAppUserModelID(hwnd, NULL);
|
||||||
/* Branch on if the window was killed in X already */
|
/* Branch on if the window was killed in X already */
|
||||||
if (pWinPriv->fXKilled) {
|
if (pWinPriv->fXKilled) {
|
||||||
|
@ -872,7 +873,9 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
case WM_MOVE:
|
case WM_MOVE:
|
||||||
/* Adjust the X Window to the moved Windows window */
|
/* Adjust the X Window to the moved Windows window */
|
||||||
winAdjustXWindow(pWin, hwnd);
|
if (!hasEnteredSizeMove)
|
||||||
|
winAdjustXWindow(pWin, hwnd);
|
||||||
|
/* else: Wait for WM_EXITSIZEMOVE */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_SHOWWINDOW:
|
case WM_SHOWWINDOW:
|
||||||
|
@ -1005,6 +1008,16 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_ENTERSIZEMOVE:
|
||||||
|
hasEnteredSizeMove = TRUE;
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case WM_EXITSIZEMOVE:
|
||||||
|
/* Adjust the X Window to the moved Windows window */
|
||||||
|
hasEnteredSizeMove = FALSE;
|
||||||
|
winAdjustXWindow(pWin, hwnd);
|
||||||
|
return 0;
|
||||||
|
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
/* see dix/window.c */
|
/* see dix/window.c */
|
||||||
#if CYGWINDOWING_DEBUG
|
#if CYGWINDOWING_DEBUG
|
||||||
|
@ -1029,8 +1042,11 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
(int) (GetTickCount()));
|
(int) (GetTickCount()));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Adjust the X Window to the moved Windows window */
|
if (!hasEnteredSizeMove) {
|
||||||
winAdjustXWindow(pWin, hwnd);
|
/* Adjust the X Window to the moved Windows window */
|
||||||
|
winAdjustXWindow(pWin, hwnd);
|
||||||
|
}
|
||||||
|
/* else: wait for WM_EXITSIZEMOVE */
|
||||||
return 0; /* end of WM_SIZE handler */
|
return 0; /* end of WM_SIZE handler */
|
||||||
|
|
||||||
case WM_STYLECHANGING:
|
case WM_STYLECHANGING:
|
||||||
|
|
|
@ -1074,6 +1074,11 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IS_OPTION("-hostintitle")) {
|
||||||
|
g_fHostInTitle = TRUE;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,6 @@
|
||||||
#define ID_APP_ALWAYS_ON_TOP 202
|
#define ID_APP_ALWAYS_ON_TOP 202
|
||||||
#define ID_APP_ABOUT 203
|
#define ID_APP_ABOUT 203
|
||||||
|
|
||||||
#define ID_ABOUT_UG 300
|
|
||||||
#define ID_ABOUT_FAQ 301
|
|
||||||
#define ID_ABOUT_CHANGELOG 302
|
|
||||||
#define ID_ABOUT_WEBSITE 303
|
#define ID_ABOUT_WEBSITE 303
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include <winuser.h>
|
#include <winuser.h>
|
||||||
#define _WINDOWSWM_SERVER_
|
#define _WINDOWSWM_SERVER_
|
||||||
#include <X11/extensions/windowswmstr.h>
|
#include <X11/extensions/windowswmstr.h>
|
||||||
#include "dixevents.h"
|
|
||||||
#include "winmultiwindowclass.h"
|
#include "winmultiwindowclass.h"
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
|
|
|
@ -955,11 +955,11 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
wShift = (GetKeyState(VK_SHIFT) & 0x8000) ? MK_SHIFT : 0;
|
wShift = (GetKeyState(VK_SHIFT) & 0x8000) ? MK_SHIFT : 0;
|
||||||
wCtrl = (GetKeyState(VK_CONTROL) & 0x8000) ? MK_CONTROL : 0;
|
wCtrl = (GetKeyState(VK_CONTROL) & 0x8000) ? MK_CONTROL : 0;
|
||||||
lPos = MAKELPARAM(point.x, point.y);
|
lPos = MAKELPARAM(point.x, point.y);
|
||||||
if (g_fButton[0] & !wL)
|
if (g_fButton[0] && !wL)
|
||||||
PostMessage(hwnd, WM_LBUTTONUP, wCtrl | wM | wR | wShift, lPos);
|
PostMessage(hwnd, WM_LBUTTONUP, wCtrl | wM | wR | wShift, lPos);
|
||||||
if (g_fButton[1] & !wM)
|
if (g_fButton[1] && !wM)
|
||||||
PostMessage(hwnd, WM_MBUTTONUP, wCtrl | wL | wR | wShift, lPos);
|
PostMessage(hwnd, WM_MBUTTONUP, wCtrl | wL | wR | wShift, lPos);
|
||||||
if (g_fButton[2] & !wR)
|
if (g_fButton[2] && !wR)
|
||||||
PostMessage(hwnd, WM_RBUTTONUP, wCtrl | wL | wM | wShift, lPos);
|
PostMessage(hwnd, WM_RBUTTONUP, wCtrl | wL | wM | wShift, lPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user