Commit graph

481 commits

Author SHA1 Message Date
Wolfgang Lux
78fb85fbcf Fix management of windows whose hide on deactivate attribute is set.
In particular, such windows remain ordered out when the application
orders them out while it is not active and then is activated again.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33213 72102866-910b-0410-8b05-ffd578937521
2011-05-31 09:59:48 +00:00
David Chisnall
b4e3915c33 Turn release messages sent to autorelease pools into drain messages. No
functionality change in non-GC mode, in GC mode it invokes a quick GC pass to
try to delete the short-lived objects.

Also deleted some [pool release] lines just before exit() or return-from-main
statements.  These cause objects to be swapped in and destructors to be run to
no benefit (the OS will reclaim this memory without requiring stuff to be
swapped in when the process exits).



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33146 72102866-910b-0410-8b05-ffd578937521
2011-05-27 12:42:37 +00:00
Eric Wasylishen
346f604cb7 * Source/NSWindow.m: Remove unnecessary FIXMEs related to
user space scale factor
* Source/NSAppliation.m: Correct app icon sizing which was
mixing up window frame coordinates and user space coordinates
* Source/NSCachedImageRep.m: Add NSUnscaledWindowMask to the
window used internally


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32897 72102866-910b-0410-8b05-ffd578937521
2011-04-19 08:23:01 +00:00
Fred Kiefer
a953d2bda0 Release the key value binding as it will be
retained in the binding table.
Leak found by static code analyser.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32484 72102866-910b-0410-8b05-ffd578937521
2011-03-07 13:35:37 +00:00
Fred Kiefer
1e34733d4a * Source/GSNibLoading.m (NSCustomView): Correct implementation of
-initWithCoder: and remove -awakeAfterUsingCoder:.
* Source/NSSound.m: Remove method -awakeAfterUsingCoder:.
* Source/NSWindow.m (-_captureMouse:, -_releaseMouse:) Add some
  debug log code here to simplify debugging these methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32460 72102866-910b-0410-8b05-ffd578937521
2011-03-05 16:10:43 +00:00
Fred Kiefer
6daffd89d7 Fix memory leaks found by analyser.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32255 72102866-910b-0410-8b05-ffd578937521
2011-02-20 22:36:49 +00:00
Fred Kiefer
d83fb0774b Remove direct usage of isa.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32248 72102866-910b-0410-8b05-ffd578937521
2011-02-20 18:24:44 +00:00
Fred Kiefer
466714c847 Bug fix to last commit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32177 72102866-910b-0410-8b05-ffd578937521
2011-02-15 21:48:00 +00:00
Fred Kiefer
ca944f1dfa Revert Wolfgangs change and add a different solution as explained in his mail.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32176 72102866-910b-0410-8b05-ffd578937521
2011-02-15 19:50:54 +00:00
Wolfgang Lux
e8de70e645 Add user default to allow placing app icons and mini windows at normal
window level. This is particularly convenient with some window
managers (*cough*, kwin) where application and pop up menus would be
obscured by dock level windows.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32165 72102866-910b-0410-8b05-ffd578937521
2011-02-14 22:25:57 +00:00
Wolfgang Lux
92da3e62d0 Fix bug where a stray view could leak when changing the content view
of a window. This view then could make the title bar buttons
inaccessible when -gui handles window decorations.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32163 72102866-910b-0410-8b05-ffd578937521
2011-02-14 22:11:26 +00:00
Fred Kiefer
906201acf6 Remove dead assignments found by static code analysis.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32022 72102866-910b-0410-8b05-ffd578937521
2011-02-09 22:20:00 +00:00
Wolfgang Lux
1a887c7645 Improve last but one commit by not including an in-window menu in a
window's saved frame as well. Also avoid a redundant cast from float
to int and back.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31941 72102866-910b-0410-8b05-ffd578937521
2011-01-24 13:19:30 +00:00
Wolfgang Lux
89715a53c1 Merge change from the testplant_1 branch:
Do not include the toolbar in a window's saved frame. Makes saving and
restoring window frame sizes independent of whether the toolbar is
present at the time when the frame is saved or restored.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31939 72102866-910b-0410-8b05-ffd578937521
2011-01-24 08:59:10 +00:00
Germán Arias
f999016f34 Applied changes in menuInWindow.patch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31895 72102866-910b-0410-8b05-ffd578937521
2011-01-16 00:32:54 +00:00
Wolfgang Lux
ab919f8fba Rename color (list) change notifications to match Cocoa (and OpenStep).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31893 72102866-910b-0410-8b05-ffd578937521
2011-01-15 19:28:24 +00:00
Germán Arias
bf270ebcfb Fixed the behaviour of menu in window when hide the app
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31859 72102866-910b-0410-8b05-ffd578937521
2011-01-09 06:10:02 +00:00
Wolfgang Lux
fb66e35ad6 Don't show a toolbar customization palette for a toolbar when user
customization is disabled.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31799 72102866-910b-0410-8b05-ffd578937521
2010-12-30 18:58:12 +00:00
Nicola Pero
f80e259048 Explicitly encode/decode enumerated types as 'int' which is what all
the existing archives use (even if it is incorrect as in many cases
the types are actually 'unsigned int')


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31785 72102866-910b-0410-8b05-ffd578937521
2010-12-27 11:57:04 +00:00
Wolfgang Lux
879c4b2af4 Allow any window that responds YES to -worksWhenModal to become key in
a modal session.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31714 72102866-910b-0410-8b05-ffd578937521
2010-12-07 07:55:48 +00:00
Wolfgang Lux
449c4f8af6 Do not discard close requests for a window in a modal session when the
window has -worksWhenModal==YES.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31653 72102866-910b-0410-8b05-ffd578937521
2010-11-26 16:07:19 +00:00
Fred Kiefer
b8abcc62ea * Source/NSWindow.m (-validRequestorForSendType:returnType:):
Don't forward this method if the delegate is a NSResponder.
Patch by Georg Fleischmann <G.Fleischmann@vhf.de>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31586 72102866-910b-0410-8b05-ffd578937521
2010-11-03 20:06:00 +00:00
Eric Wasylishen
26fcda321b Replace sel_eq with sel_isEqual
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31285 72102866-910b-0410-8b05-ffd578937521
2010-09-09 23:50:38 +00:00
Fred Kiefer
f5eb73e8da Correction of last changes as pointed out by Derek Fawcus
<dfawcus@employees.org>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31032 72102866-910b-0410-8b05-ffd578937521
2010-07-26 11:05:07 +00:00
Fred Kiefer
ad9ddfe0ea Add support for backtab character.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31026 72102866-910b-0410-8b05-ffd578937521
2010-07-25 20:51:40 +00:00
Wolfgang Lux
b59b4e7e32 Avoid a race with some lame window managers, which could lead to a
crash when a window is closed and deallocated while a tool tip is
visible.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30513 72102866-910b-0410-8b05-ffd578937521
2010-05-31 21:55:33 +00:00
Fred Kiefer
99e273a57d few compiler warning fixes plus a lot of #import replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30448 72102866-910b-0410-8b05-ffd578937521
2010-05-24 10:48:14 +00:00
Wolfgang Lux
fb7e725344 Fix a rather long standing incompatibility between GNUstep and Cocoa
and make -initWithContentRect:styleMask:backing:defer: the designated
initializer of NSWindow.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30368 72102866-910b-0410-8b05-ffd578937521
2010-05-12 14:47:10 +00:00
Fred Kiefer
da7fd680fb Make dealloc of NSWindow a tiny bit saver.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30321 72102866-910b-0410-8b05-ffd578937521
2010-05-08 20:18:14 +00:00
Doug Simons
3c4b83960f Handle nil view passed to _checkTrackingRectangles:forEvent:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30233 72102866-910b-0410-8b05-ffd578937521
2010-04-24 17:21:22 +00:00
Doug Simons
34f7052ac2 fix problems with overlaps between toolbars, window contents, and in-window menus
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30206 72102866-910b-0410-8b05-ffd578937521
2010-04-20 19:37:10 +00:00
Riccardo Mottola
2a52aa187c removed c99-ism
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30144 72102866-910b-0410-8b05-ffd578937521
2010-04-13 22:54:33 +00:00
Eric Wasylishen
fa1db26477 Fix for delivery of rightMouseDragged: and otherMouseDragged: which were not working
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30120 72102866-910b-0410-8b05-ffd578937521
2010-04-11 00:31:59 +00:00
Doug Simons
6e85413971 Fix crash caused by close being called recursively
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30087 72102866-910b-0410-8b05-ffd578937521
2010-04-05 16:07:46 +00:00
Wolfgang Lux
82253d5cd7 Remove a stray semicolon, which made NSWindow ignore all GSAppKitWindowLeave
events. This was the cause for, e.g., somewhat too sticky tooltips.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30075 72102866-910b-0410-8b05-ffd578937521
2010-03-30 07:28:05 +00:00
David Chisnall
a9ba2e5e77 Removed all uses of @defs() from -gui, so it now compiles cleanly with the non-fragile ABI. All ivars that must be accessed from other classes are now wrapped in PACKAGE_SCOPE. With clang, this expands to @package, with GCC it expands to @public.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30045 72102866-910b-0410-8b05-ffd578937521
2010-03-27 00:01:03 +00:00
Fred Kiefer
60c81d02b6 Add two Cocoa debug helper methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29924 72102866-910b-0410-8b05-ffd578937521
2010-03-13 15:17:21 +00:00
Jonathan Gillaspie
d5cc2fce52 Fix to prevent restoring an NSWindowFrame to a completely off-screen location.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29747 72102866-910b-0410-8b05-ffd578937521
2010-02-25 18:30:10 +00:00
Gregory John Casamento
2247065684 * Source/NSWindow.m: Remove private menu - (void) _menuUpdate, since
it was causing performance issue on windows as the menu was updating
	each time through the runloop.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29668 72102866-910b-0410-8b05-ffd578937521
2010-02-18 22:19:27 +00:00
Riccardo Mottola
c572836773 revert accidental commit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29544 72102866-910b-0410-8b05-ffd578937521
2010-02-11 11:22:52 +00:00
Riccardo Mottola
56ceebba48 do not draw form background
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29534 72102866-910b-0410-8b05-ffd578937521
2010-02-10 11:14:21 +00:00
Quentin Mathe
03f98ad1ba Fixed button actions which were sent to the button itself when the target is
the first responder. We don't give anymore the first responder status to a 
button on a click.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29471 72102866-910b-0410-8b05-ffd578937521
2010-02-03 19:12:02 +00:00
Gregory John Casamento
b9bbc50a11 * Source/NSWindow.m: Uncomment updateMenu:.. method call in
-[NSWindow update] method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29383 72102866-910b-0410-8b05-ffd578937521
2010-01-24 08:05:45 +00:00
Gregory John Casamento
15de26b03c Update menu code and set menu on window creation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29373 72102866-910b-0410-8b05-ffd578937521
2010-01-23 23:41:07 +00:00
Riccardo Mottola
16ffbb80ae do not process GSAppKitWindowLeave events for closed windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29332 72102866-910b-0410-8b05-ffd578937521
2010-01-20 14:58:59 +00:00
Gregory John Casamento
b8d262c293 * Source/NSWindow.m: Temporarily revert previous change for debugging.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29302 72102866-910b-0410-8b05-ffd578937521
2010-01-17 06:01:58 +00:00
Gregory John Casamento
6a9dfe8d61 * Source/NSWindow.m: Don't use the flags for key/main window tracking.
These flags are getting out of sync due to different behavior on
	different backends.  Also, it's better to keep the state in one place
	instead of keeping them in sync.  I changed all of the instances of
	_f.is_key to [self isKeyWindow] and all of the instances of _f.is_main
	to [self isMainWindow] and those methods now check with NSApp to 
	determine if the current window is main.   I realize this is slower
	than the previous method of using flags, but it is also more resilient
	and reliable when the backend sends extra events.  This corrects the
	issue on Windows where we were losing the main window and had two 
	windows marked as "main".


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29295 72102866-910b-0410-8b05-ffd578937521
2010-01-16 19:56:27 +00:00
Doug Simons
6b20840967 Raise an exception instead of crashing (at least on Windows) when we fail to obtain a window from the back end.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29284 72102866-910b-0410-8b05-ffd578937521
2010-01-14 23:57:11 +00:00
Gregory John Casamento
ebebc38558 * Headers/Additions/GNUstepGUI/GSTheme.h: Added methods
to support adding menus and processing commands from windows, if
       appropriate.
       * Headers/Additions/GNUstepGUI/GSWindowDecorationView.h: Added
       new methods for menu and toolbar flags.
       * Headers/AppKit/NSInterfaceStyle.h: Added new interface style.
       * Source/GNUmakefile: Added header.
       * Source/GSStandardWindowDecorationView.m: Change include
       to include header in new location.
       * Source/GSThemeMenu.m: Default theme implementation for
       Menus.
       * Source/GSWindowDecorationView.m: Add the setHasMenu:/setHasToolbar:
       flags.
       * Source/NSWindow.m: Use the theme to set the menu instead of
       setting it directly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29271 72102866-910b-0410-8b05-ffd578937521
2010-01-13 20:51:30 +00:00
Wolfgang Lux
126f60f6db Use the first responder's undo manager in an NSWindow's undo: and
redo: actions if available. Avoids the need for overriding these
methods in any responder class which supports undo/redo and is
compatible with OS X.
Generalize user interface validation for NSWindow.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29158 72102866-910b-0410-8b05-ffd578937521
2009-12-22 00:14:16 +00:00