Commit graph

140 commits

Author SHA1 Message Date
Marcian Lytwyn
643bedc834 Cairo win32 fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35372 72102866-910b-0410-8b05-ffd578937521
2012-08-08 22:26:52 +00:00
Marcian Lytwyn
999c436296 Added Win32 multi-screen support lookup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35240 72102866-910b-0410-8b05-ffd578937521
2012-06-27 17:59:11 +00:00
Eric Wasylishen
337ce46bba * Source/win32/WIN32Server.m (-resolutionForScreen:):
Scale the result by 0.75 so the Windows default of 96 DPI is
mapped to the GNUstep default of 72 DPI. While this sounds wrong,
72 and 96 are just "virtual" DPI's; both mean 1 point = 1 pixel,
so it's actually the right thing to do.
* Source/x11/XGServerWindow.m (-resolutionForScreen:):
Comment out the implementation and just return 72 for now,
because I'm not sure if we can trust the value the X server
gives us.

NOTE: Currently -gui ignores these methods and only looks at the
GSScaleFactor user default. I'm going to make -gui use the server
values now, because it's safe to do so on Windows (the system
DPI is set by the user, and affects all applications.)

NOTE: We might consider refactoring these methods to be called
scaleFactorForScreen: to make it clearer what they do.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33658 72102866-910b-0410-8b05-ffd578937521
2011-07-30 20:39:10 +00:00
Fred Kiefer
8913452ffc Change the way the image for the cursor gets passed on to the backend.
The old way could only work for 8 bit data.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32492 72102866-910b-0410-8b05-ffd578937521
2011-03-07 19:45:20 +00:00
Fred Kiefer
5125141980 Implement the ne cursor backend methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32180 72102866-910b-0410-8b05-ffd578937521
2011-02-15 22:54:51 +00:00
Jonathan Gillaspie
15f3adb397 * Source/win32/WIN32Server.m: Added better logging on Window create and destroy errors.
Added a secondary call to get current mouse position if the first call fails.	
* Source/win32/w32_text_focus.m: Cast parameter to appropriate (HWND) type.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31718 72102866-910b-0410-8b05-ffd578937521
2010-12-08 22:59:05 +00:00
Eric Wasylishen
282a590ad5 core/back: replace objc_{malloc/free} with malloc/free
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31629 72102866-910b-0410-8b05-ffd578937521
2010-11-18 20:28:15 +00:00
Eric Wasylishen
1c986457b5 back/win32: revert r31206
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31324 72102866-910b-0410-8b05-ffd578937521
2010-09-10 22:45:12 +00:00
Eric Wasylishen
d41e797bfd * Source/win32/WIN32Server.m: Only show taskbar buttons for windows
which satisfy both:

- style mask isn't NSBorderlessWindowMask
- style mask don't have NSUtilityWindowMask set

Should fix bug 30911

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31212 72102866-910b-0410-8b05-ffd578937521
2010-08-30 22:00:09 +00:00
Eric Wasylishen
24eff104fa * Source/win32/w32_activate.m: Call -[NSApp deactivate] in response
to a WM_ACTIVEAPPP message reporting that the app lost focus.

This delivers NSApplicationWillResignActiveNotification
and NSApplicationDidResignActiveNotification, hides panels, etc.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31206 72102866-910b-0410-8b05-ffd578937521
2010-08-30 05:53:30 +00:00
Eric Wasylishen
bdc97710e0 * Source/win32/WIN32Server.m: Handle Page Down and Page Up keys,
as well as adding a few others.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31200 72102866-910b-0410-8b05-ffd578937521
2010-08-25 17:03:38 +00:00
Eric Wasylishen
b7ff3b2973 * Headers/win32/WIN32Server.h:
* Source/win32/WIN32Server.m:
* Source/win32/w32_movesize.m:
Fix a rather serious error where the extra window data was allocated
in two places (allocated with objc_malloc in the WM_CREATE handler,
and also allocated by Windows using the cbWndExtra field of the window
class structure). Sometimes the window level was accessed from one
memory area and sometimes from the other.
	
This is a quick fix that leaves the level and ordered properties
in the cbWndExtra area, and the rest is left in the WIN_INTERN
structure. 

This fixes the problem where window ordering was broken when running
apps in gdb.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31198 72102866-910b-0410-8b05-ffd578937521
2010-08-25 04:20:45 +00:00
Eric Wasylishen
d963ba552d Source/win32/WIN32Server.m (-setmaxsize::): Remove the maximize box when a maximum size is set on a window.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31197 72102866-910b-0410-8b05-ffd578937521
2010-08-24 23:20:01 +00:00
Eric Wasylishen
a2716081f5 back/win32:
Only look at NSUtilityWindowMask to decide whether to use a thin-
style title bar (WS_EX_TOOLWINDOW).

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31080 72102866-910b-0410-8b05-ffd578937521
2010-08-04 04:57:04 +00:00
Fred Kiefer
5d8d6e9138 * Source/win32/WIN32Server.m,
* Source/x11/XGServerEvent.m: Use NSDeleteCharacter instead of
        NSBackSpaceCharacter for the backspace key. This is what Cocoa
and
        OpenStep have been doing all the time.
        Also use NSBackTabCharacter on X11 when XK_ISO_Left_Tab is
        pressed, but don't convert shift-tab into NSBackTabCharacter.
        Patch by Derek Fawcus <dfawcus@employees.org>.


M    ChangeLog
M    Source/win32/WIN32Server.m
M    Source/x11/XGServerEvent.m


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31034 72102866-910b-0410-8b05-ffd578937521
2010-07-26 12:46:35 +00:00
Eric Wasylishen
8a96326e26 * Source/win32/WIN32Server.m:
Fix accidental integer division intended to be float division when
setting the timestamp on events. This was causing all timestamps
to be rounded to the nearest second.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31031 72102866-910b-0410-8b05-ffd578937521
2010-07-26 01:55:24 +00:00
Eric Wasylishen
440de8d9b2 * Source/win32/w32_GLContext.m:
* Source/x11/XGGLContext.m:
Apply fix for bug 29705: OpenGL subwindow positioning error
(OpenGL subwindow position was incorrectly calculated when
the window content view was flipped)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31029 72102866-910b-0410-8b05-ffd578937521
2010-07-26 01:41:55 +00:00
Eric Wasylishen
f336cf20af back/win32: When ordering out a window, use the SWP_NOACTIVATE flag on SetWindowPos
so Windows doesn't activate/deactivate any windows when hiding a window.
  
This fixes the bug where when a tooltip disappeared, it would deactivate
the window the tooltip was over.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31024 72102866-910b-0410-8b05-ffd578937521
2010-07-25 07:35:42 +00:00
Eric Wasylishen
a27ce98ff1 back/win32: Fix for bug #29709: Windows: Maximize button in a window title bar is always grayed out
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30933 72102866-910b-0410-8b05-ffd578937521
2010-07-07 06:00:51 +00:00
Eric Wasylishen
6ebad82029 back/win32: Tweak the conditions for incrementing the clickCount when handling mouse clicks: (i.e. double click detection)
- Require a click to be within a distance (retrieved from Windows)
of the last click to count (previously there was no proximity check)
- Allow clicks separated by the Windows double click time interval
to count (e.g. if the Windows double click time interval is n,
clicking at times 0, n, 2n, 3n would produce events with click counts
1, 2, 3, and 4. This matches OS X behaviour. Previously, all clicks
had to be within the windows double click time interval to count as
one group.)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30932 72102866-910b-0410-8b05-ffd578937521
2010-07-07 05:49:13 +00:00
Gregory John Casamento
c79a73ea90 Reactivate the theme when the *Windows* theme is changed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30402 72102866-910b-0410-8b05-ffd578937521
2010-05-16 21:32:56 +00:00
Doug Simons
7d826fbd3c fix problems with key window status on Windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30207 72102866-910b-0410-8b05-ffd578937521
2010-04-20 19:52:22 +00:00
Eric Wasylishen
a5b5c4f6b8 Use default icon size when reading ico file for windows app icon
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30170 72102866-910b-0410-8b05-ffd578937521
2010-04-15 19:02:20 +00:00
Jonathan Gillaspie
8c4d1d251e * Source/win32/WIN32Server.m: Have non-key, non-main windows
that order front not become active.  Also don't bring windows
  that are ordering out to the foreground first.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30142 72102866-910b-0410-8b05-ffd578937521
2010-04-13 19:11:40 +00:00
Doug Simons
208545437d Ignore duplicate mouse down events generated by first click in a window.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30031 72102866-910b-0410-8b05-ffd578937521
2010-03-24 22:12:08 +00:00
Eric Wasylishen
18d408be09 back/win32: update windows while resizing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30008 72102866-910b-0410-8b05-ffd578937521
2010-03-20 06:42:17 +00:00
Eric Wasylishen
370945d7af back/win32: record deltaX and deltaY for mouse move/drag events, matching OS X
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30007 72102866-910b-0410-8b05-ffd578937521
2010-03-20 05:13:28 +00:00
Eric Wasylishen
9894eb2943 back/win32: fix handling of alt key
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30006 72102866-910b-0410-8b05-ffd578937521
2010-03-20 02:18:18 +00:00
Eric Wasylishen
aa8d797eb6 back/win32: fix for mouse/keyboard events on NSOpenGLView
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29957 72102866-910b-0410-8b05-ffd578937521
2010-03-15 07:19:22 +00:00
Eric Wasylishen
1561ba0aec back/win32: Fix for multiple NSOpenGLView's
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29940 72102866-910b-0410-8b05-ffd578937521
2010-03-14 06:50:31 +00:00
Eric Wasylishen
36260d2295 back/win32: horizontal mousewheel support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29933 72102866-910b-0410-8b05-ffd578937521
2010-03-13 21:38:23 +00:00
Eric Wasylishen
1e8806424e back/win32: fix mousewheel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29932 72102866-910b-0410-8b05-ffd578937521
2010-03-13 21:00:02 +00:00
Doug Simons
c3004129ed capture the mouse to get mouse moved events outside of window
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29912 72102866-910b-0410-8b05-ffd578937521
2010-03-12 21:29:37 +00:00
Doug Simons
c3cdc8ebba Prevent generating mouseMoved events when the mouse hasn't moved
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29905 72102866-910b-0410-8b05-ffd578937521
2010-03-11 22:44:53 +00:00
Doug Simons
9978707706 removed extraneous 'u' that got in by mistake
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29884 72102866-910b-0410-8b05-ffd578937521
2010-03-08 19:34:31 +00:00
Doug Simons
908e8b663e When the shift key is down, charactersIgnoringModifiers should be uppercase
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29883 72102866-910b-0410-8b05-ffd578937521
2010-03-08 17:54:00 +00:00
Gregory John Casamento
588ae69c45 Changes to prevent inconsistent main/key state and move alphablend to a separate function call.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29722 72102866-910b-0410-8b05-ffd578937521
2010-02-24 21:50:20 +00:00
Gregory John Casamento
77565aaad0 * Headers/win32/WIN32Server.h: Remove HOTKEY method.
* Source/win32/w32_general.m: Remove HOTKEY method.
	* Source/win32/WIN32Server.m: Remove call to HOTKEY method.  Added
	function "mask_for_keystate(..)" to implement modifier mappings
	on Windows.   Also changed process_key_event to use the new function
	and changed the call to ToUnicode to use a blank array instead of
	modifying the existing keyState array since this was returning the
	characters with the modifiers still applied.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29498 72102866-910b-0410-8b05-ffd578937521
2010-02-07 08:37:04 +00:00
Gregory John Casamento
3c9e989f25 * Headers/win32/WIN32Server.h: Added declaration for decodeWM_HOTKEY:...
* Source/win32/WIN32Server.m: Added call to method decodeWM_HOTKEY:...
        * Source/win32/w32_general.m: Added method decodeWM_HOTKEY:...



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29490 72102866-910b-0410-8b05-ffd578937521
2010-02-05 21:32:42 +00:00
Fred Kiefer
2f9772ccde Solve the window focus bug by no longer activating the window on each
resize.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29414 72102866-910b-0410-8b05-ffd578937521
2010-01-26 19:05:35 +00:00
Gregory John Casamento
817a5d654f * Source/win32/w32_create.m: (-decodeWM_CREATEParams:::) add
code to load and set the HICON into the window.  Currently, 
	an .ico file with the same name as the image specified in 
	NSIcon or CFBundleIconName needs to be provided in the 
	resources. 

	NOTE: An enhancement to generate this from the app icon will
	follow shortly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29396 72102866-910b-0410-8b05-ffd578937521
2010-01-25 09:14:55 +00:00
Gregory John Casamento
89e0508bbb 2010-01-21 15:45-EST Riccardo Mottola <rmottola@users.sf.net>
Committed by: Gregory John Casamento <greg.casamento@gmail.com>

	* Source/win32/w32_text_focus.m: Correction for extra event which 
	was causing main/key windows to get out of sync in the backend and 
	gui.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29349 72102866-910b-0410-8b05-ffd578937521
2010-01-21 20:43:46 +00:00
Gregory John Casamento
19150c94d0 * Headers/win32/WIN32Server.h: Added decodeWM_MOUSEACTIVATE:..
* Source/win32/w32_general.m: Added call to decodeWM_COMMAND:
	to -[GSTheme processCommand:] the theme callback which handles 
	native menus, 


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29279 72102866-910b-0410-8b05-ffd578937521
2010-01-14 10:40:29 +00:00
Riccardo Mottola
a520fd608c generate the window leave event only for WM_INACTIVE
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29256 72102866-910b-0410-8b05-ffd578937521
2010-01-10 18:34:30 +00:00
Riccardo Mottola
f126c3ced8 generate GSAppKitWindowLeave leave events
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29253 72102866-910b-0410-8b05-ffd578937521
2010-01-10 11:29:36 +00:00
Fred Kiefer
938a6dd65a Send an event directly to the window on focus in, instead of handling
this here ourselves.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29240 72102866-910b-0410-8b05-ffd578937521
2010-01-08 20:46:35 +00:00
Riccardo Mottola
50ced01cf2 Remove left-over call to a mouse down event in a mouse-up
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29025 72102866-910b-0410-8b05-ffd578937521
2009-11-16 22:49:29 +00:00
Richard Frith-MacDonald
43eaa1d512 fix for missing mouse down events
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28989 72102866-910b-0410-8b05-ffd578937521
2009-11-10 14:45:50 +00:00
Richard Frith-MacDonald
76b8a13298 ensure GSTheme is initialialised before determining whether to decorate windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28982 72102866-910b-0410-8b05-ffd578937521
2009-11-09 12:14:31 +00:00
Richard Frith-MacDonald
5286906961 fixup for consistency with X11 backend
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28978 72102866-910b-0410-8b05-ffd578937521
2009-11-09 09:34:09 +00:00