mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
Applied first part of WIN32 patch by MA Garcias.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@19285 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
305b8d6074
commit
bd0bd21d94
4 changed files with 20 additions and 9 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-05-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/win32/WIN32Geometry.h: (GSWindowOriginToMS) corrected computation.
|
||||
* Source/win32/WIN32Server.m (-orderwindow:::) Removed obsolte
|
||||
"return" in non-NSWindowOut case and use flag SWP_NOACTIVATE.
|
||||
(-placewindow::, -movewindow::) Don't use flag SWP_NOREDRAW.
|
||||
Patch by MA Garcias <lists@tragnarion.com>.
|
||||
* Source/win32/WIN32ServerEvent.m Corrected definition of the
|
||||
GET_X_LPARAM and GET_Y_LPARAM macros.
|
||||
|
||||
2004-03-30 01:49 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/x11/XGGLFormat.m (-initWithAttributes:): Fix handling of
|
||||
|
|
|
@ -125,7 +125,7 @@ POINT GSWindowOriginToMS(HWND hwnd, NSPoint p)
|
|||
h = rect.bottom - rect.top;
|
||||
|
||||
p1.x = p.x;
|
||||
p1.y = screen_height - p.y + h;
|
||||
p1.y = screen_height - p.y - h;
|
||||
return p1;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,6 +157,7 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
|||
return NO;
|
||||
}
|
||||
|
||||
// FIXME: The following methods wont work for multiple screens
|
||||
/* Screen information */
|
||||
- (NSSize) resolutionForScreen: (int)screen
|
||||
{
|
||||
|
@ -428,10 +429,10 @@ DWORD windowStyleForGSStyle(unsigned int style)
|
|||
if (op != NSWindowOut)
|
||||
{
|
||||
int flag = SW_SHOW;
|
||||
|
||||
if (IsIconic((HWND)winNum))
|
||||
flag = SW_RESTORE;
|
||||
ShowWindow((HWND)winNum, flag);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (op)
|
||||
|
@ -444,7 +445,7 @@ DWORD windowStyleForGSStyle(unsigned int style)
|
|||
if (otherWin == 0)
|
||||
otherWin = (int)HWND_BOTTOM;
|
||||
SetWindowPos((HWND)winNum, (HWND)otherWin, 0, 0, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOMOVE);
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
|
||||
break;
|
||||
case NSWindowAbove:
|
||||
if (otherWin <= 0)
|
||||
|
@ -455,7 +456,7 @@ DWORD windowStyleForGSStyle(unsigned int style)
|
|||
winNum = (int)HWND_TOP;
|
||||
}
|
||||
SetWindowPos((HWND) otherWin, (HWND)winNum, 0, 0, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOMOVE);
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -469,7 +470,7 @@ DWORD windowStyleForGSStyle(unsigned int style)
|
|||
p = GSWindowOriginToMS((HWND)winNum, loc);
|
||||
|
||||
SetWindowPos((HWND)winNum, NULL, p.x, p.y, 0, 0,
|
||||
SWP_NOZORDER | SWP_NOSIZE | SWP_NOREDRAW);
|
||||
SWP_NOZORDER | SWP_NOSIZE);
|
||||
}
|
||||
|
||||
- (void) placewindow: (NSRect)frame : (int) winNum
|
||||
|
@ -484,7 +485,7 @@ DWORD windowStyleForGSStyle(unsigned int style)
|
|||
GetWindowRect((HWND)winNum, &r2);
|
||||
|
||||
SetWindowPos((HWND)winNum, NULL, r.left, r.top, r.right - r.left, r.bottom - r.top,
|
||||
SWP_NOZORDER | SWP_NOREDRAW);
|
||||
SWP_NOZORDER);
|
||||
|
||||
if ((win->useHDC) &&
|
||||
(r.right - r.left != r2.right - r2.left) &&
|
||||
|
@ -613,7 +614,7 @@ DWORD windowStyleForGSStyle(unsigned int style)
|
|||
- (void) setinputfocus: (int) winNum
|
||||
{
|
||||
NSDebugLLog(@"WTrace", @"setinputfocus: %d", winNum);
|
||||
NSDebugLLog(@"Focus", @"Setting input focus to %d");
|
||||
NSDebugLLog(@"Focus", @"Setting input focus to %d", winNum);
|
||||
if (winNum == 0)
|
||||
{
|
||||
NSDebugLLog(@"Focus", @" invalid focus window");
|
||||
|
|
|
@ -48,10 +48,10 @@
|
|||
here is almost correct, but will fail for multi monitor systems
|
||||
*/
|
||||
#ifndef GET_X_LPARAM
|
||||
#define GET_X_LPARAM(p) LOWORD(p)
|
||||
#define GET_X_LPARAM(p) ((int)(short)LOWORD(p))
|
||||
#endif
|
||||
#ifndef GET_Y_LPARAM
|
||||
#define GET_Y_LPARAM(p) HIWORD(p)
|
||||
#define GET_Y_LPARAM(p) ((int)(short)HIWORD(p))
|
||||
#endif
|
||||
|
||||
static NSEvent *process_key_event(HWND hwnd, WPARAM wParam, LPARAM lParam,
|
||||
|
|
Loading…
Reference in a new issue