xserver: Branch 'master' - 12 commits
Jon TURNEY
jturney at kemper.freedesktop.org
Thu Feb 12 04:10:30 PST 2009
hw/xwin/InitOutput.c | 2 +-
hw/xwin/win.h | 7 +++++++
hw/xwin/winclipboardinit.c | 4 ++--
hw/xwin/winclipboardthread.c | 32 +++++++++++++++++---------------
hw/xwin/winclipboardwndproc.c | 22 +++++++++++++++-------
hw/xwin/winclipboardwrappers.c | 31 +++++++++++++++++++------------
hw/xwin/winclipboardxevents.c | 12 ++++++++----
hw/xwin/winconfig.c | 8 +++-----
hw/xwin/winengine.c | 4 ++--
hw/xwin/winkeybd.c | 4 ++--
hw/xwin/winkeyhook.c | 4 ++--
hw/xwin/winlayouts.h | 21 ++++++++++++++++++---
hw/xwin/winmultiwindowicons.c | 6 +++---
hw/xwin/winmultiwindowwindow.c | 2 --
hw/xwin/winmultiwindowwm.c | 2 +-
hw/xwin/winprefs.c | 16 ++++++++--------
hw/xwin/winprefs.h | 8 ++++----
hw/xwin/winprefslex.l | 2 +-
hw/xwin/wintrayicon.c | 2 +-
hw/xwin/winwin32rootless.c | 3 ---
hw/xwin/winwin32rootlesswindow.c | 2 +-
hw/xwin/winwndproc.c | 4 ----
22 files changed, 115 insertions(+), 83 deletions(-)
New commits:
commit 0065896e1ae6d419a42b318b66d6e4d5f17a40ca
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Sun Nov 2 20:46:37 2008 +0000
Xming: Update keyboard layouts mapping table
An update to the keyboard layout mapping table which updates some no longer valid keyboard layout names
(e.g. de_CH -> ch -variant de) and adds a few more reported layouts
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winlayouts.h b/hw/xwin/winlayouts.h
index cc07524..dabd5e0 100644
--- a/hw/xwin/winlayouts.h
+++ b/hw/xwin/winlayouts.h
@@ -38,34 +38,49 @@ typedef struct
char *layoutname;
} WinKBLayoutRec, *WinKBLayoutPtr;
+/*
+ This table is sorted by low byte of winlayout, then by next byte, etc.
+*/
+
WinKBLayoutRec winKBLayouts[] =
{
+ { 0x404, -1, "pc105", "zh_TW", NULL, NULL, "Chinese (Taiwan)"},
{ 0x405, -1, "pc105", "cz", NULL, NULL, "Czech"},
{0x10405, -1, "pc105", "cz_qwerty", NULL, NULL, "Czech (QWERTY)"},
{ 0x406, -1, "pc105", "dk", NULL, NULL, "Danish"},
{ 0x407, -1, "pc105", "de", NULL, NULL, "German (Germany)"},
{0x10407, -1, "pc105", "de", NULL, NULL, "German (Germany, IBM)"},
- { 0x807, -1, "pc105", "de_CH", NULL, NULL, "German (Switzerland)"},
+ { 0x807, -1, "pc105", "ch", "de", NULL, "German (Switzerland)"},
{ 0x409, -1, "pc105", "us", NULL, NULL, "English (USA)"},
{0x10409, -1, "pc105", "dvorak", NULL, NULL, "English (USA, Dvorak)"},
{0x20409, -1, "pc105", "us_intl", NULL, NULL, "English (USA, International)"},
{ 0x809, -1, "pc105", "gb", NULL, NULL, "English (United Kingdom)"},
{ 0x1809, -1, "pc105", "ie", NULL, NULL, "Irish"},
{ 0x40a, -1, "pc105", "es", NULL, NULL, "Spanish (Spain, Traditional Sort)"},
+ { 0x80a, -1, "pc105", "la", NULL, NULL, "Latin American"},
{ 0x40b, -1, "pc105", "fi", NULL, NULL, "Finnish"},
{ 0x40c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"},
{ 0x80c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"},
- { 0xc0c, -1, "pc105", "ca_enhanced", NULL, NULL, "French (Canada)"},
- { 0x100c, -1, "pc105", "fr_CH", NULL, NULL, "French (Switzerland)"},
+ { 0xc0c, -1, "pc105", "ca", "fr", NULL, "French (Canada)"},
+ { 0x100c, -1, "pc105", "ch", "fr", NULL, "French (Switzerland)"},
{ 0x40e, -1, "pc105", "hu", NULL, NULL, "Hungarian"},
+ { 0x40f, -1, "pc105", "is", NULL, NULL, "Icelandic"},
{ 0x410, -1, "pc105", "it", NULL, NULL, "Italian"},
+ {0x10410, -1, "pc105", "it", NULL, NULL, "Italian (142)"},
+ {0xa0000410,-1, "macbook79","it", "mac",NULL, "Italiano (Apple)"},
{ 0x411, 7, "jp106", "jp", NULL, NULL, "Japanese"},
+ { 0x413, -1, "pc105", "nl", NULL, NULL, "Dutch"},
{ 0x813, -1, "pc105", "be", NULL, NULL, "Dutch (Belgian)"},
{ 0x414, -1, "pc105", "no", NULL, NULL, "Norwegian"},
+ { 0x415, -1, "pc105", "pl", NULL, NULL, "Polish (Programmers)"},
{ 0x416, -1, "pc105", "br", NULL, NULL, "Portuguese (Brazil, ABNT)"},
{0x10416, -1, "abnt2", "br", NULL, NULL, "Portuguese (Brazil, ABNT2)"},
{ 0x816, -1, "pc105", "pt", NULL, NULL, "Portuguese (Portugal)"},
+ { 0x41a, -1, "pc105", "hr", NULL, NULL, "Croatian"},
{ 0x41d, -1, "pc105", "se", NULL, NULL, "Swedish (Sweden)"},
+ { 0x424, -1, "pc105", "si", NULL, NULL, "Slovenian"},
+ { 0x425, -1, "pc105", "ee", NULL, NULL, "Estonian"},
+ { 0x452, -1, "pc105", "gb", "intl", NULL, "United Kingdom (Extended)"},
{ -1, -1, NULL, NULL, NULL, NULL, NULL}
};
commit d7c27bfe553235e55eb48799129ff9f8e7e0d4f6
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Tue Feb 3 15:57:29 2009 +0000
Xming: Check clipboard selection ownership after taking it
When you take ownership of a selection you should always check you got
it (X11 ICCCM gospel).
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c
index c1e8e13..9040f40 100644
--- a/hw/xwin/winclipboardthread.c
+++ b/hw/xwin/winclipboardthread.c
@@ -273,7 +273,8 @@ winClipboardProc (void *pvNotUsed)
/* PRIMARY */
iReturn = XSetSelectionOwner (pDisplay, XA_PRIMARY,
iWindow, CurrentTime);
- if (iReturn == BadAtom || iReturn == BadWindow)
+ if (iReturn == BadAtom || iReturn == BadWindow ||
+ XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow)
{
ErrorF ("winClipboardProc - Could not set PRIMARY owner\n");
pthread_exit (NULL);
@@ -282,7 +283,8 @@ winClipboardProc (void *pvNotUsed)
/* CLIPBOARD */
iReturn = XSetSelectionOwner (pDisplay, atomClipboard,
iWindow, CurrentTime);
- if (iReturn == BadAtom || iReturn == BadWindow)
+ if (iReturn == BadAtom || iReturn == BadWindow ||
+ XGetSelectionOwner (pDisplay, atomClipboard) != iWindow)
{
ErrorF ("winClipboardProc - Could not set CLIPBOARD owner\n");
pthread_exit (NULL);
diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c
index 7aa6889..04c0c58 100644
--- a/hw/xwin/winclipboardwndproc.c
+++ b/hw/xwin/winclipboardwndproc.c
@@ -385,7 +385,8 @@ winClipboardWindowProc (HWND hwnd, UINT message,
XA_PRIMARY,
iWindow,
CurrentTime);
- if (iReturn == BadAtom || iReturn == BadWindow)
+ if (iReturn == BadAtom || iReturn == BadWindow ||
+ XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow)
{
winErrorFVerb (1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - "
"Could not reassert ownership of PRIMARY\n");
@@ -403,7 +404,12 @@ winClipboardWindowProc (HWND hwnd, UINT message,
False),
iWindow,
CurrentTime);
- if (iReturn == BadAtom || iReturn == BadWindow)
+
+ if (iReturn == BadAtom || iReturn == BadWindow ||
+ XGetSelectionOwner (pDisplay,
+ XInternAtom (pDisplay,
+ "CLIPBOARD",
+ False)) != iWindow)
{
winErrorFVerb (1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - "
"Could not reassert ownership of CLIPBOARD\n");
commit cb6315072ff23740bdc5fc2f95dd960601df5664
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Tue Feb 3 15:54:31 2009 +0000
Xming: Fix a memory leak in clipboard integration code
Free the memory allocated for ReturnData in FlushXEvents().
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c
index 28a8cd2..95e86b1 100644
--- a/hw/xwin/winclipboardxevents.c
+++ b/hw/xwin/winclipboardxevents.c
@@ -713,6 +713,8 @@ winClipboardFlushXEvents (HWND hwnd,
hGlobal = GlobalAlloc (GMEM_MOVEABLE, iConvertDataLen);
}
+ free (pszReturnData);
+
/* Check that global memory was allocated */
if (!hGlobal)
{
commit d54d24dd5f25188b951b82b1c95eb9d36b5be970
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Tue Feb 3 15:53:43 2009 +0000
Xming: Fix prototype for winProcessXEventsTimeout() in clipboard integration code
Function 'winProcessXEventsTimeout()' is declared 'static Bool' and
defined 'static int' (correct) in 'winclipboardwndproc.c'. This has been
wrong since dot, but luckily was of no significance
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c
index d2b1b2f..7aa6889 100644
--- a/hw/xwin/winclipboardwndproc.c
+++ b/hw/xwin/winclipboardwndproc.c
@@ -65,7 +65,7 @@ extern HWND g_hwndClipboard;
* Local function prototypes
*/
-static Bool
+static int
winProcessXEventsTimeout (HWND hwnd, int iWindow, Display *pDisplay,
Bool fUseUnicode, int iTimeoutSec);
commit d8bae80305057acfb8e82341f68090eac0dccb90
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Tue Feb 3 15:52:57 2009 +0000
Xming: Improve clipboard integration startup in XDMCP mode
Improve clipboard integration startup in XDMCP mode
Stop the "Clipboard not yet started, aborting" message from spamming the log.
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c
index c57d1e6..14f76cd 100755
--- a/hw/xwin/winclipboardwrappers.c
+++ b/hw/xwin/winclipboardwrappers.c
@@ -42,6 +42,7 @@
* Constants
*/
+#define CLIP_NUM_CALLS 4
#define CLIP_NUM_SELECTIONS 2
#define CLIP_OWN_PRIMARY 0
#define CLIP_OWN_CLIPBOARD 1
@@ -87,6 +88,8 @@ winProcQueryTree (ClientPtr client)
{
int iReturn;
+ ErrorF ("winProcQueryTree - Hello\n");
+
/*
* This procedure is only used for initialization.
* We can unwrap the original procedure at this point
@@ -186,7 +189,7 @@ winProcEstablishConnection (ClientPtr client)
static int s_iCallCount = 0;
static unsigned long s_ulServerGeneration = 0;
- ErrorF ("winProcEstablishConnection - Hello\n");
+ if (s_iCallCount == 0 || s_iCallCount == CLIP_NUM_CALLS) ErrorF ("winProcEstablishConnection - Hello\n");
/* Do nothing if clipboard is not enabled */
if (!g_fClipboard)
@@ -214,13 +217,15 @@ winProcEstablishConnection (ClientPtr client)
/* Increment call count */
++s_iCallCount;
- /* Wait for second call when Xdmcp is enabled */
+ /* Wait for CLIP_NUM_CALLS when Xdmcp is enabled */
if (g_fXdmcpEnabled
&& !g_fClipboardLaunched
- && s_iCallCount < 4)
+ && s_iCallCount < CLIP_NUM_CALLS)
{
- ErrorF ("winProcEstablishConnection - Xdmcp enabled, waiting to "
- "start clipboard client until fourth call.\n");
+ if (s_iCallCount == 1) ErrorF ("winProcEstablishConnection - Xdmcp, waiting to "
+ "start clipboard client until %dth call", CLIP_NUM_CALLS);
+ if (s_iCallCount == CLIP_NUM_CALLS - 1) ErrorF (".\n");
+ else ErrorF (".");
return (*winProcEstablishConnectionOrig) (client);
}
@@ -277,7 +282,7 @@ winProcEstablishConnection (ClientPtr client)
* 8) Unfortunately, there is another problem.
* 9) XDM walks the list of windows with XQueryTree,
* killing any client it finds with a window.
- * 10)Thus, when using XDMCP we wait until the second call
+ * 10)Thus, when using XDMCP we wait until CLIP_NUM_CALLS
* to ProcEstablishCeonnection before we startup the clipboard
* client. This should prevent XDM from finding the clipboard
* client, since it has not yet created a window.
@@ -337,8 +342,8 @@ winProcSetSelectionOwner (ClientPtr client)
/* Abort if clipboard not completely initialized yet */
if (!g_fClipboardStarted)
{
- ErrorF ("winProcSetSelectionOwner - Clipboard not yet started, "
- "aborting.\n");
+ /* ErrorF ("winProcSetSelectionOwner - Clipboard not yet started, "
+ "aborting.\n"); */
goto winProcSetSelectionOwner_Done;
}
commit 7cb1622ce44754d9dcd6f405fb8403bd79c3e7e4
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Tue Feb 3 15:51:02 2009 +0000
Xming: Select events correctly in clipboard integration code
The clipboard should only select PropertyChange events and do this on
the correct window, the messaging window for the clipboard not the root
window!
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c
index 19aa7ea..c1e8e13 100644
--- a/hw/xwin/winclipboardthread.c
+++ b/hw/xwin/winclipboardthread.c
@@ -233,15 +233,6 @@ winClipboardProc (void *pvNotUsed)
iMaxDescriptor = iConnectionNumber + 1;
#endif
- /* Select event types to watch */
- if (XSelectInput (pDisplay,
- DefaultRootWindow (pDisplay),
- SubstructureNotifyMask |
- StructureNotifyMask |
- PropertyChangeMask) == BadWindow)
- ErrorF ("winClipboardProc - XSelectInput generated BadWindow "
- "on RootWindow\n\n");
-
/* Create atoms */
atomClipboard = XInternAtom (pDisplay, "CLIPBOARD", False);
atomClipboardManager = XInternAtom (pDisplay, "CLIPBOARD_MANAGER", False);
@@ -260,6 +251,13 @@ winClipboardProc (void *pvNotUsed)
pthread_exit (NULL);
}
+ /* Select event types to watch */
+ if (XSelectInput (pDisplay,
+ iWindow,
+ PropertyChangeMask) == BadWindow)
+ ErrorF ("winClipboardProc - XSelectInput generated BadWindow "
+ "on messaging window\n");
+
/* Save the window in the screen privates */
g_iClipboardWindow = iWindow;
commit b997b3849d902894dd5b38673b73a23a47edf502
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Tue Feb 3 15:48:04 2009 +0000
Xming: Add Colin Harrison to copyright and authors list for clipboard integration files
Add Colin Harrison to copyright and authors list
Adjust license text for multiple authors
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c
index 081abd5..19aa7ea 100644
--- a/hw/xwin/winclipboardthread.c
+++ b/hw/xwin/winclipboardthread.c
@@ -1,5 +1,6 @@
/*
*Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
+ *Copyright (C) Colin Harrison 2005-2008
*
*Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -20,12 +21,13 @@
*CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
*WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- *Except as contained in this notice, the name of Harold L Hunt II
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from Harold L Hunt II.
+ *Except as contained in this notice, the name of the copyright holder(s)
+ *and author(s) shall not be used in advertising or otherwise to promote
+ *the sale, use or other dealings in this Software without prior written
+ *authorization from the copyright holder(s) and author(s).
*
* Authors: Harold L Hunt II
+ * Colin Harrison
*/
#ifdef HAVE_XWIN_CONFIG_H
diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c
index 802a740..d2b1b2f 100644
--- a/hw/xwin/winclipboardwndproc.c
+++ b/hw/xwin/winclipboardwndproc.c
@@ -1,5 +1,6 @@
/*
*Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
+ *Copyright (C) Colin Harrison 2005-2008
*
*Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -20,12 +21,13 @@
*CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
*WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- *Except as contained in this notice, the name of Harold L Hunt II
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from Harold L Hunt II.
+ *Except as contained in this notice, the name of the copyright holder(s)
+ *and author(s) shall not be used in advertising or otherwise to promote
+ *the sale, use or other dealings in this Software without prior written
+ *authorization from the copyright holder(s) and author(s).
*
* Authors: Harold L Hunt II
+ * Colin Harrison
*/
#ifdef HAVE_XWIN_CONFIG_H
diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c
index 2cfe0ff..c57d1e6 100755
--- a/hw/xwin/winclipboardwrappers.c
+++ b/hw/xwin/winclipboardwrappers.c
@@ -1,5 +1,6 @@
/*
*Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
+ *Copyright (C) Colin Harrison 2005-2008
*
*Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -20,12 +21,13 @@
*CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
*WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- *Except as contained in this notice, the name of Harold L Hunt II
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from Harold L Hunt II.
+ *Except as contained in this notice, the name of the copyright holder(s)
+ *and author(s) shall not be used in advertising or otherwise to promote
+ *the sale, use or other dealings in this Software without prior written
+ *authorization from the copyright holder(s) and author(s).
*
* Authors: Harold L Hunt II
+ * Colin Harrison
*/
#ifdef HAVE_XWIN_CONFIG_H
diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c
index d4c617b..28a8cd2 100644
--- a/hw/xwin/winclipboardxevents.c
+++ b/hw/xwin/winclipboardxevents.c
@@ -1,5 +1,6 @@
/*
*Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
+ *Copyright (C) Colin Harrison 2005-2008
*
*Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -20,12 +21,13 @@
*CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
*WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- *Except as contained in this notice, the name of Harold L Hunt II
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from Harold L Hunt II.
+ *Except as contained in this notice, the name of the copyright holder(s)
+ *and author(s) shall not be used in advertising or otherwise to promote
+ *the sale, use or other dealings in this Software without prior written
+ *authorization from the copyright holder(s) and author(s).
*
* Authors: Harold L Hunt II
+ * Colin Harrison
*/
#ifdef HAVE_XWIN_CONFIG_H
commit 5ff289834d7445cc6f60dbb1cf18423e7236311a
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Mon Jan 19 17:42:54 2009 +0000
Cygwin/X: Place prototype for winSelectIcons() in a header file
Fixes warning as prototype is now in scope for the definition
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 32d3b02..8005d5b 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -1218,6 +1218,8 @@ winSetShapeRootless (WindowPtr pWindow);
HICON
winXIconToHICON (WindowPtr pWin, int iconSize);
+void
+winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon);
#ifdef XWIN_MULTIWINDOW
/*
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index 18dba23..f4f61a8 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -46,8 +46,6 @@
extern HWND g_hDlgDepthChange;
-extern void winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon);
-
/*
* Prototypes for local functions
*/
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index 26d5977..a17c219 100755
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -74,9 +74,6 @@ winMWExtWMSetNativeProperty (RootlessWindowPtr pFrame);
Bool g_fNoConfigureWindow = FALSE;
-
-extern void winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon);
-
/*
* Internal function to get the DIB format that is compatible with the screen
* Fixme: Share code with winshadgdi.c
commit ab2c98b86f1c3968581dfdad8b67432082feec78
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Mon Jan 19 17:36:58 2009 +0000
Cygwin/X: Place prototypes for winCheckKeyPressed() and winFixShiftKeys() in a header file
Fixes warnings as they are now in scope at the definition
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 999c719..32d3b02 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -957,6 +957,11 @@ winKeybdReleaseKeys (void);
void
winSendKeyEvent (DWORD dwKey, Bool fDown);
+BOOL
+winCheckKeyPressed(WPARAM wParam, LPARAM lParam);
+
+void
+winFixShiftKeys (int iScanCode);
/*
* winkeyhook.c
diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index a942fb3..d72a5f1 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -42,10 +42,6 @@
#include "winmsg.h"
#include "inputstr.h"
-extern BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam);
-extern void winFixShiftKeys (int iScanCode);
-
-
/*
* Global variables
*/
commit cc7a4c7c6e051fceacb32997740d83fc0655414e
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Mon Jan 19 17:29:28 2009 +0000
cygwin/X: Remove an unused variable to fix a warning
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index a9c4c46..3e1908c 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -563,8 +563,6 @@ winConfigFiles ()
Bool
winConfigFiles (void)
{
- MessageType from;
-
/* Fontpath */
if (g_cmdline.fontPath)
{
commit 7c2fb098b206c0fb97c18cce8f88387cd0c0e82a
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Mon Jan 19 17:22:59 2009 +0000
Cygwin/X: Fix several prototypes to return HICON
Fix prototypes of winOverrideIcon(), winTaskbarIcon() and winOverrideDefaultIcon() to return HICON
Also use HICON type in WINPREFS stucture
Remove various casts these changes make unnecessary
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winmultiwindowicons.c b/hw/xwin/winmultiwindowicons.c
index 9645718..88416bb 100644
--- a/hw/xwin/winmultiwindowicons.c
+++ b/hw/xwin/winmultiwindowicons.c
@@ -368,7 +368,7 @@ winUpdateIcon (Window id)
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
if (!pWin) return;
- hIcon = (HICON)winOverrideIcon ((unsigned long)pWin);
+ hIcon = winOverrideIcon ((unsigned long)pWin);
if (!hIcon)
hIcon = winXIconToHICON (pWin, GetSystemMetrics(SM_CXICON));
@@ -410,8 +410,8 @@ void winInitGlobalIcons (void)
/* Load default X icon in case it's not ready yet */
if (!g_hIconX)
{
- g_hIconX = (HICON)winOverrideDefaultIcon(sm_cx);
- g_hSmallIconX = (HICON)winOverrideDefaultIcon(sm_cxsm);
+ g_hIconX = winOverrideDefaultIcon(sm_cx);
+ g_hSmallIconX = winOverrideDefaultIcon(sm_cxsm);
}
if (!g_hIconX)
diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c
index 0c48bfe..8152064 100644
--- a/hw/xwin/winprefs.c
+++ b/hw/xwin/winprefs.c
@@ -529,7 +529,7 @@ SetupRootMenu (unsigned long hmenuRoot)
/*
* Check for and return an overridden default ICON specified in the prefs
*/
-unsigned long
+HICON
winOverrideDefaultIcon(int size)
{
HICON hicon;
@@ -541,7 +541,7 @@ winOverrideDefaultIcon(int size)
ErrorF ("winOverrideDefaultIcon: LoadImageComma(%s) failed\n",
pref.defaultIconName);
- return (unsigned long)hicon;
+ return hicon;
}
return 0;
@@ -551,7 +551,7 @@ winOverrideDefaultIcon(int size)
/*
* Return the HICON to use in the taskbar notification area
*/
-unsigned long
+HICON
winTaskbarIcon(void)
{
HICON hicon;
@@ -575,7 +575,7 @@ winTaskbarIcon(void)
GetSystemMetrics (SM_CYSMICON),
0);
- return (unsigned long)hicon;
+ return hicon;
}
@@ -650,7 +650,7 @@ LoadImageComma (char *fname, int sx, int sy, int flags)
* Check for a match of the window class to one specified in the
* ICONS{} section in the prefs file, and load the icon from a file
*/
-unsigned long
+HICON
winOverrideIcon (unsigned long longWin)
{
WindowPtr pWin = (WindowPtr) longWin;
@@ -686,8 +686,8 @@ winOverrideIcon (unsigned long longWin)
ErrorF ("winOverrideIcon: LoadImageComma(%s) failed\n",
pref.icon[i].iconFile);
- pref.icon[i].hicon = (unsigned long)hicon;
- return (unsigned long)hicon;
+ pref.icon[i].hicon = hicon;
+ return hicon;
}
}
diff --git a/hw/xwin/winprefs.h b/hw/xwin/winprefs.h
index 996b02a..6d641da 100644
--- a/hw/xwin/winprefs.h
+++ b/hw/xwin/winprefs.h
@@ -105,7 +105,7 @@ typedef struct ICONITEM
{
char match[MENU_MAX+1]; /* What string to search for? */
char iconFile[PATH_MAX+NAME_MAX+2]; /* Icon location, WIN32 path */
- unsigned long hicon; /* LoadImage() result */
+ HICON hicon; /* LoadImage() result */
} ICONITEM;
/* To redefine styles for certain window types */
@@ -172,15 +172,15 @@ HandleCustomWM_COMMAND (unsigned long hwndIn,
int
winIconIsOverride (unsigned hiconIn);
-unsigned long
+HICON
winOverrideIcon (unsigned long longpWin);
unsigned long
winOverrideStyle (unsigned long longpWin);
-unsigned long
+HICON
winTaskbarIcon(void);
-unsigned long
+HICON
winOverrideDefaultIcon(int size);
#endif
diff --git a/hw/xwin/wintrayicon.c b/hw/xwin/wintrayicon.c
index d1a7b4d..895b47c 100755
--- a/hw/xwin/wintrayicon.c
+++ b/hw/xwin/wintrayicon.c
@@ -51,7 +51,7 @@ winInitNotifyIcon (winPrivScreenPtr pScreenPriv)
nid.uID = pScreenInfo->dwScreen;
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
nid.uCallbackMessage = WM_TRAYICON;
- nid.hIcon = (HICON)winTaskbarIcon ();
+ nid.hIcon = winTaskbarIcon ();
/* Save handle to the icon so it can be freed later */
pScreenPriv->hiconNotifyIcon = nid.hIcon;
diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c
index dedcd7a..3f521d6 100755
--- a/hw/xwin/winwin32rootlesswindow.c
+++ b/hw/xwin/winwin32rootlesswindow.c
@@ -165,7 +165,7 @@ winMWExtWMUpdateIcon (Window id)
HICON hIcon, hiconOld;
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
- hIcon = (HICON)winOverrideIcon ((unsigned long)pWin);
+ hIcon = winOverrideIcon ((unsigned long)pWin);
if (!hIcon)
hIcon = winXIconToHICON (pWin, GetSystemMetrics(SM_CXICON));
commit 19b3e44ce51cc2f74ba388cb2cd3a26467848e9a
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Mon Jan 19 17:03:23 2009 +0000
Cygwin/X: Fix -Wold-style-definition warnings
Fix old-style definition warnings caused by definitions with empty
parameter lists "()", which should be "(void)" to indicate the function
takes no parameters, rather than unspecified parameters
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 1b37bb7..2d17aaf 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -1052,7 +1052,7 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
*/
static Bool
-winCheckDisplayNumber ()
+winCheckDisplayNumber (void)
{
int nDisp;
HANDLE mutex;
diff --git a/hw/xwin/winclipboardinit.c b/hw/xwin/winclipboardinit.c
index 6a0cbaf..3e73bc6 100644
--- a/hw/xwin/winclipboardinit.c
+++ b/hw/xwin/winclipboardinit.c
@@ -59,7 +59,7 @@ extern HWND g_hwndClipboard;
*/
Bool
-winInitClipboard ()
+winInitClipboard (void)
{
ErrorF ("winInitClipboard ()\n");
@@ -90,7 +90,7 @@ winInitClipboard ()
*/
HWND
-winClipboardCreateMessagingWindow ()
+winClipboardCreateMessagingWindow (void)
{
WNDCLASS wc;
HWND hwnd;
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index 13b8b3a..a9c4c46 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -561,7 +561,7 @@ winConfigFiles ()
}
#else
Bool
-winConfigFiles ()
+winConfigFiles (void)
{
MessageType from;
@@ -578,14 +578,14 @@ winConfigFiles ()
Bool
-winConfigOptions ()
+winConfigOptions (void)
{
return TRUE;
}
Bool
-winConfigScreens ()
+winConfigScreens (void)
{
return TRUE;
}
diff --git a/hw/xwin/winengine.c b/hw/xwin/winengine.c
index f0bc671..fb9aed8 100644
--- a/hw/xwin/winengine.c
+++ b/hw/xwin/winengine.c
@@ -48,7 +48,7 @@ extern const GUID _IID_IDirectDraw4;
*/
void
-winDetectSupportedEngines ()
+winDetectSupportedEngines (void)
{
OSVERSIONINFO osvi;
@@ -285,7 +285,7 @@ winSetEngine (ScreenPtr pScreen)
*/
Bool
-winGetDDProcAddresses ()
+winGetDDProcAddresses (void)
{
Bool fReturn = TRUE;
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index 5e9c4e3..611ea5d 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -311,7 +311,7 @@ winInitializeModeKeyStates (void)
*/
void
-winRestoreModeKeyStates ()
+winRestoreModeKeyStates (void)
{
DWORD dwKeyState;
BOOL processEvents = TRUE;
@@ -499,7 +499,7 @@ winIsFakeCtrl_L (UINT message, WPARAM wParam, LPARAM lParam)
*/
void
-winKeybdReleaseKeys ()
+winKeybdReleaseKeys (void)
{
int i;
diff --git a/hw/xwin/winkeyhook.c b/hw/xwin/winkeyhook.c
index 53d91e6..2d6ed18 100755
--- a/hw/xwin/winkeyhook.c
+++ b/hw/xwin/winkeyhook.c
@@ -149,7 +149,7 @@ winKeyboardMessageHookLL (int iCode, WPARAM wParam, LPARAM lParam)
*/
Bool
-winInstallKeyboardHookLL ()
+winInstallKeyboardHookLL (void)
{
OSVERSIONINFO osvi = {0};
@@ -186,7 +186,7 @@ winInstallKeyboardHookLL ()
*/
void
-winRemoveKeyboardHookLL ()
+winRemoveKeyboardHookLL (void)
{
if (g_hhookKeyboardLL)
UnhookWindowsHookEx (g_hhookKeyboardLL);
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index ca9460a..ea9dfca 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -1428,7 +1428,7 @@ CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen)
*/
void
-winDeinitMultiWindowWM ()
+winDeinitMultiWindowWM (void)
{
ErrorF ("winDeinitMultiWindowWM - Noting shutdown in progress\n");
g_shutdown = TRUE;
diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c
index 73d543a..0c48bfe 100644
--- a/hw/xwin/winprefs.c
+++ b/hw/xwin/winprefs.c
@@ -730,7 +730,7 @@ winIconIsOverride(unsigned hiconIn)
* Load it into prefs structure for use by other functions
*/
void
-LoadPreferences ()
+LoadPreferences (void)
{
char *home;
char fname[PATH_MAX+NAME_MAX+2];
diff --git a/hw/xwin/winprefslex.l b/hw/xwin/winprefslex.l
index ee2478b..9a384a2 100644
--- a/hw/xwin/winprefslex.l
+++ b/hw/xwin/winprefslex.l
@@ -105,7 +105,7 @@ SILENTEXIT { return SILENTEXIT; }
* Run-of-the mill requirement for yacc
*/
int
-yywrap ()
+yywrap (void)
{
return 1;
}
More information about the xorg-commit
mailing list