aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
Commit message (Collapse)AuthorAgeFilesLines
* Bug 935: NEWT Windows Window-Icon: Use WNDCLASSEX w/ Small/Big Default Icons ↵Sven Gothel2014-01-053-38/+27
| | | | | | | | (NativeWindow GDI / NEWT ) .. this allows using the icon definition of WNDCLASSEX instead of setting them at CreateWindow0(..). - NativeWindow GDIUtil/RegisteredFactory uses WNDCLASSEX and Small/Big Defailt Icons
* Bug 935: NEWT Windows Window-Icon: Fix Window-Icon Visibility after ↵Sven Gothel2014-01-041-0/+4
| | | | | | | Reparenting CHILD -> TOP Hiding the window via 'ShowWindow(.., SW_HIDE)' before reparenting and subsequent style change incl. visibility renders the Window-Icon visible.
* JOGLNewtAppletBase Default Key-Action: Add 'j' for setPointerConfined() .. ↵Sven Gothel2014-01-041-0/+9
| | | | i.e. 'jailed'
* Bug 935: NEWT OSX PointerIcon/Pointer-Visibility: Impl. ↵Sven Gothel2014-01-041-2/+34
| | | | | | | | | | OffscreenLayerSurface (OSX CALayer) w/ JAWTWindow Path Add setCursor(..) and hideCursor() to OffscreenLayerSurface interface, impl. in JAWTWindow w/ AWT. This allows an OSX NEWT Window using CALayer (i.e. NewtCanvasAWT) to have setPointerIcon(..) and setPointerVisible(..) functionality!
* Bug 935: NEWT PointerIcon: Refine Spec and Implementation / Fix OSX Crash ↵Sven Gothel2014-01-0413-681/+924
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and Issues - Refine Display.PointerIcon: Complete type allowing re-creation - Add associated Display reference - Add used IOUtil.ClassResources reference - Add isValid()/validate() methods for recreation - Refine API doc - Move Display.destroyPointerIcon(PointerIcon) -> PointerIcon.destroy() - Move DisplayImpl.PointerIconImpl -> PointerIconImpl (own source file) - Creation/Destruction and setting of PointerIcon happens on EDT - DisplayImpl.shutdownAll() and Display.destroy() calls destroyAllPointerIconFromList - WindowDriver.setPointerIconImpl: Validates PointerIconImpl (i.e. re-creates if required) - Fix 'initial' window.setPointerIcon(..) before createNative(..), tested w/ TestGearsES2NEWT - OSX Native Code: - Move mouse and pointer-state handling from NewtMacWindow -> NewtView class to retain states (pointer handle, pointer visibility, etc) when reparenting. Reparenting will move an exisiting NewtView into a new NewtMacWindow. - Enable all mouse move events: - NewtView::mouseEnter [nsWin makeFirstResponder: nsView]; - NewtView::mouseExited if( !mouseConfined ) { [nsView resignFirstResponder]; } - NewtView::mouseMoved issued [myCurser set] if required, fixing OSX issue not updating NSCursor properly. - MacWindow: - Test NewtMacWindow, NewtView and NSCursor handles before usage - Fix DBG_PRINT(..) warnings
* Bug 935: NEWT PointerIcon PNGIcon: Remove return value 'elem_bytesize[]' ↵Sven Gothel2014-01-031-3/+3
| | | | which is always 4 (RGBA/BGRA
* Bug 935: NEWT PointerIcon PNGIcon: Remove return value 'elem_bytesize[]' ↵Sven Gothel2014-01-035-14/+13
| | | | which is always 4 (RGBA/BGRA)
* Bug 935: NEWT PointerIcon OSX: Safe use of NSCursor handleSven Gothel2014-01-033-16/+42
|
* NewtMacWindow: NSView: Remove unused 'myCursor' fieldSven Gothel2014-01-022-18/+0
|
* MacWindow.m: Add missing NSAutoreleasePool 'decoration'Sven Gothel2014-01-021-3/+17
|
* Bug 935: NEWT PointerIcon: Add size, hotspot 'getter' and String representationSven Gothel2013-12-315-5/+41
| | | | PointerIcon's size and hotspot maybe be useful for certain user-app calculation.
* Bug 935: NEWT: Expose Pointer Icons Feature in JOGLNewtAppletBase TestsSven Gothel2013-12-311-19/+66
|
* Bug 934, Bug 935: NEWT: Add support for custom Application/Window and ↵Sven Gothel2013-12-3120-32/+981
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pointer Icons - Utilizing JOGL's PNG decoder for all icons, if available. - Application/window icons: - Providing default application/window icons in 16x16 and 32x32 size - NewtFactory.setWindowIcons(..) or property 'newt.window.icons' maybe used to override default icons. - Using icons at application/window instantiation - Display.PointerIcons: - NativeWindow Win32 WindowClass no more references a default cursor in favor of fine grained cursor control [in NEWT] - Display provides create/destroy methods, where display destruction also releases open PointerIcon references. - Window.setPointerIcon(..) sets custom PointerIcon - Implemented Platforms - X11 - Windows - OSX - Manual Test: TestGearsES2NEWT (Press 'c')
* NEWT Cleanup - Remove Type Casts and OSX Newt/Fmod Workaround (Early ↵Sven Gothel2013-12-313-28/+7
| | | | WindowImpl initialization)
* NEWT WindowImpl: Add 'final' qualifier where possibleSven Gothel2013-12-311-54/+49
|
* Bug 924: Fullscreen toggle in X11 requires a 'sleep' on sluggish WMs (Unity) ↵Sven Gothel2013-12-201-2/+10
| | | | ; Block insets change while toggling fullscreen mode.
* Bug 924: Make ALWAYS_ON_TOP Persistent when Reparenting (child -> top) (2nd ↵Sven Gothel2013-12-202-4/+4
| | | | | | | | | | | | attempt) Commit c8726ef04b94ad8e66e1191a06ff793b908d130c reinforced ALWAYS_ON_TOP in native reconfig code issued at reparenting call, which might be too early for the WM. Perform ALWAYS_ON_TOP reinforcement from java side when reparenting CHILD -> TOP was successful and visibility is reached. X11 only! NewtAWTReparentingKeyAdapter: Add 'a' alwaysOnTop toggle to test w/o applet code.
* Refine commit c9fcc8cd510abc0cbebb872dc3e457327655e778 (NEWT X11Window.c ↵Sven Gothel2013-12-201-8/+8
| | | | comments)
* Bug 924: Fix X11 Fullscreen ALT-TAB Regression ; Make ALWAYS_ON_TOP ↵Sven Gothel2013-12-191-1/+14
| | | | | | | | | | | | | | | | | | Persistent when Reparenting (child -> top) - X11 Fullscreen ALT-TAB regression (no task-switcher visible) We still need the fast reconfigure path for ALWAYSONTOP only toggle. It was removed w/ commit c9fcc8cd510abc0cbebb872dc3e457327655e778, which disabled toggling FULLSCREEN and ALWAYSONTOP. Note: Another bug in Unity WM's Compiz: 'Unredirect Fullscreen Windows := True' disables the ALT-TAB taskbar/launcher HUD rendering and subsequent task-switch. Hence it shall be disabled .. nothing we can do here. - ALWAYS_ON_TOP not persistent when child -> top WM removes ALWAYS_ON_TOP state when reparenting, hence reinforce it when Child -> Top.
* Bug 924: More robost Fullscreen ExitSven Gothel2013-12-191-24/+26
| | | | | | | | | | | - 'tempInvisible' shall be also performed for top windows, solves Unity-WM background refresh issue - Rename local field 'fullscreen' -> '_fullscreen' to avoid confusion - Proper insets handling: Set 'WindowImpl.this.fullscreen = _fullscreen' only before reconfiguring, otherwise wrong position maybe used due to wrong insets value. Tested w/ WMs: KWin + Unity
* NEWT WindowImpl: Enhance insetsChanged(..) DEBUG outputSven Gothel2013-12-191-4/+5
|
* Bug 924: Remove position criteria from reparent/fullscreen success, WM's ↵Sven Gothel2013-12-191-5/+6
| | | | only regard custom position as a hint (X11).
* Bug 924: X11 WindowDriver: Only perform 'tempFSAlwaysOnTop' toggle @ ↵Sven Gothel2013-12-191-9/+10
| | | | | | focusChanged(..) if isFullscreen() .. otherwise it will be triggered by reconfigure tasks while enabling/disabling fullscreen.
* Bug 924: Ignore reparent when in fullscreen - otherwise may confuse WMSven Gothel2013-12-191-0/+8
|
* Bug 924: Fix 'Unity WM' issue w/ sticky _NET_WM_STATE after Fullscreen ↵Sven Gothel2013-12-191-4/+12
| | | | | | | | | On/Off Cycle Unity WM keeps the _NET_WM_STATE (_NET_WM_STATE_FULLSCREEN, ..) after fullscreen-exit even though _NET_WM_STATE_REMOVE was issued. Add remedy: Reparent Child -> TOP: Reset _NET_WM_STATE (! _NET_WM_STATE_FULLSCREEN, ..).
* NEWT X11Window.c: Cleanup Code - No changes.Sven Gothel2013-12-191-8/+25
|
* Bug 922 (2/2): NEWT Window.reparentWindow(..): Use ↵Sven Gothel2013-12-114-10/+11
| | | | REPARENT_HINT_BECOMES_VISIBLE to ensure GL State Preservation ; Add unit test !
* Bug 922 (1/2): NEWT Window.reparentWindow(..): Provide ↵Sven Gothel2013-12-113-17/+68
| | | | | | | | | | | | REPARENT_HINT_BECOMES_VISIBLE hint via new method variant using hints; Deprecate other reparentWindow(..) variants w/o hints. NEWT Window.reparentWindow(..): Provide REPARENT_HINT_BECOMES_VISIBLE hint via new method variant using hints: - Add REPARENT_HINT_FORCE_RECREATION, covering 'old' forceDestroyCreate boolean argument - Add REPARENT_HINT_BECOMES_VISIBLE, Claim window becomes visible after reparenting, which is important for e.g. preserving the GL-states in case window is invisible while reparenting. Deprecate other reparentWindow(..) variants w/o hints. Use only new variant using hints w/o semantical change.
* Bug 904: 'User Vertical Flip' for GLJPanel w/o vertical flip must be ↵Sven Gothel2013-12-101-1/+1
| | | | considered in AWTTilePainter: 'Origin of GL image is still on Bottom'
* Bug 919 - TestNewtKeyCodesAWT w/ NewtCanvasAWT Fails on Windows Due to ↵Sven Gothel2013-12-041-2/+2
| | | | | | | | | | | | | | Clogged Key-Release Event by AWT Robot Impact: Only unit test code - TestNewtKeyCodesAWT: Fix Bug 919 - Move mouse bacl/forth while waiting for events .. - Use common wait for key timeout/polling using constants in NEWTKeyUtil - InputEventCountAdapter: 'getQueued()' -> 'copyQueue()' - ensuring queue is copied while instance is locked.
* Bug 914: Newt OSX: Reset NSApp's presentationOptions @ windowClose0() / ↵Sven Gothel2013-12-035-63/+84
| | | | | | | | | | | | | | | Assume having focus in fullscreen-mode - Reset NSApp's presentationOptions @ windowClose0() Commit 69c334448cfe8af553fd97689137ecf8f996b378 started using the [NSApp setPresentationOptions: opts] but missed to reset to defaults @ windowClose0(); - Assume having focus in fullscreen-mode NewtMacWindow::windowDidBecomeKey()' is not always called in fullscreen-mode! Note: OSX Fullscreen from a browser still shows the browser title-bar until mouse-click. Don't know how to avoid this. Minor issue..
* Bug 916 - NEWT Fullscreen Mode on Windows ALT-TAB doesn't allow Application ↵Sven Gothel2013-12-031-20/+58
| | | | | | | Switching Remedy for 'some' display drivers, i.e. Intel HD: Explicitly push fullscreen window to BOTTOM when inactive (ALT-TAB)
* NEWT Windows: Rearrange wndProc switch-case: All key/mouse events shall be ↵Sven Gothel2013-12-021-448/+449
| | | | at last
* Bug 914: Newt OSX: Don't use exclusive fullscreen mode (captured display) in ↵Sven Gothel2013-12-023-0/+37
| | | | favor of proper WM incl. ALT-TAB app-switching
* Bug 914 - Don't allow 'alwaysontop' in fullscreen mode, always allow ↵Sven Gothel2013-12-011-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | switching to other applications via ALT-TAB As described @ <http://forum.jogamp.org/Regression-of-alwaysOnTopBug-tp4030735p4030738.html>, we shall not steal the desktop in fullscreen mode via 'alwaysontop'. Latest tests on X11/GNU/Linux and Windows7 - before this patch: With default settings, i.e. alwaysontop (atop) disabled, it works as expected here, i.e.: - ALT-TAB triggers WM dialog, switching between apps. - ALT-TAB can actually switch to other apps. However, with enabled atop: - ALT-TAB triggers WM dialog, switching between apps. - ALT-TAB does _not_ switch to other apps. (*) I consider this a serious issue, since we shall not steal the desktop in fullscreen mode. This patch disables atop in fullscreen mode, i.e. (*) will switch to other apps again!
* Bug 907 - Refine DummyDispatchThread (DDT) Handling: Proper OO integration ↵Sven Gothel2013-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | in RegisteredClass; Safe DDT Post/WaitForReady handling and error cases ; ... Proper OO integration of DDT in RegisteredClass - DDT is optional to RegisteredClass[Factory], i.e. NEWT without DDT and DummyWindow with DDT. - Using native type DummyThreadContext per DDT passed as DDT handle to java referenced in RegisteredClass - Passing DDT handle to related native methods, if not null use DDT - otherwise work on current thread. The latter impacts CreateDummyWindow0 and DestroyWindow0. Safe DDT Post/WaitForReady handling and error cases ; ... - Wait until command it complete using a 3s timeout - Terminate thread if errors occur and throw an exception +++ Discussion: DDT Native Implementation Due to original code, the DDT is implemented in native code. Usually we should favor running the DDT from a java thread. However, since it's main purpose is _not_ to interact w/ java and the native implementation has less footprint (performance and memory) we shall be OK w/ it for now - as long the implementation IS SAFE.
* Workaround Bug 910 (IcedTea-Web): NewtCanvasAWT shall postpone JAWTWindow ↵Sven Gothel2013-11-252-20/+25
| | | | | | | | | | | | | | | | | destruction via explicit set flag. IcedTea-Web_1.5pre+rbc73a1362e9c still issues NewtCanvasAWT.removeNotify() before before Applet.destroy(), i.e. removes NewtCanvasAWT from the Container ahead of time (Applet protocol destroy()). However, it fixes the non AWT-EDT issue, i.e. calls NewtCanvasAWT.removeNotify() from the actual AWT-EDT - good. Since the root cause still exist, we cannot use heuristics as described in Bug 910 comment 9, but need to set a flag in NewtCanvasAWT to skip JAWT destruction and remove it latter within Applet.destroy(). NewtCanvasAWT.removeNotify.0 - isApplet true @ [AWT-EventQueue-0, isAWT-EDT true]
* Bug 672 (NewtCanvasSWT): Reuse SWTAccessor.isOS_TYPE ; Impl ↵Sven Gothel2013-11-251-18/+24
| | | | | | | | | | | | | | | | | | | | | NW.getLocationOnScreen(..) for X11 and Windows ; Allow unit test to run on all platforms. - Reuse SWTAccessor.isOS_TYPE (public now) - Impl NW.getLocationOnScreen(..) for X11 and Windows reusing existing native code - Allow unit test to run on all platforms. Note: NewtCanvasSWT unit tests require a 'wait for realized' while SWT dispatching. Otherwise the 'sash unit test' will fail since realiziation happens later, at least on X11. Hence extended AWTRobotUtil.waitForRealized(..) to use a 'waitAction' which is used here w/ special SWT dispatch Runnable. AWTRobotUtil.waitForRealized(..) operates on time-delta instead of iteration-counter, allowing above 'waitAction' Runnable. AWTRobotUtil.waitForRealized(..) removed 2nd 'glad.isRealized()' loop ..
* Bug 672 (NewtCanvasSWT ignore windowing offset on OSX').Petros Koutsolampros2013-11-241-1/+6
| | | | | | | | | | | The NewtCanvasSWT is now brought into place by the parent SWT Composite and the super SWT Canvas it extends. Also added two test cases. One with a simple SashForm and the NewtCanvasSWT in the second cell, and another with the NewtCanvasSWT in a Composite, that Composite now in the second cell of the SashForm. The second test is necessary because the NewtCanvasSWT does not receive SWT.Resize events in this configuration, but only SWT.Paint ones (a behaviour inherited from the super SWT Canvas)
* Workaround Bug 910 (IcedTea-Web): NewtCanvasAWT shall postpone JAWTWindow ↵Sven Gothel2013-11-231-29/+88
| | | | destruction if removeNotify() is called from non AWT-EDT
* JOGLNewtAppletBase's add/remove 'reparentHome WindowListener' at start()/stop()Sven Gothel2013-11-231-20/+21
|
* JOGLNewtApplet1Run: Perform AWT Operations on AWT-EDT ; Remove redundant ↵Sven Gothel2013-11-231-32/+54
| | | | explicit call to reparentWindow(null) @ destroy
* JOGLNewtAppletBase's windowDestroyNotify(): Double check 'awtParent' before ↵Sven Gothel2013-11-231-12/+13
| | | | reparenting 'back to parent'
* NewtCanvasAWT: Remove useless block in else branchSven Gothel2013-11-181-6/+3
|
* jogl: push other call to clearGlobalFocus to the AWT EDTHarvey Harrison2013-11-181-1/+1
| | | | | | | | | Follow-on to commit: d544c839f6df10f20977c786a446833f3aa7ef13 (jogl: do the clearGlobalFocusOwner() call on the AWT EDT in NewtCanvasAWT) Likely this won't hurt anything. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: do the clearGlobalFocusOwner() call on the AWT EDT in NewtCanvasAWTHarvey Harrison2013-11-181-1/+9
| | | | | | | Otherwise we can deadlock in the native focusrequest calls from the AWT thread, see bug 879 for the details. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: simplify conditional that repeats test for isOnScreenHarvey Harrison2013-11-181-1/+2
| | | | | | | | | | | | if (isOnscreen) else if (!isOnScreen) change to if (isOnscreen) else Signed-off-by: Harvey Harrison <[email protected]>
* jogl: add missing @Override annotation in NewtCanvasAWTHarvey Harrison2013-11-181-0/+2
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Fix Bug 893 - NewtCanvasAWT Lifecycle Race Condition (NPE on shutdown ↵Sven Gothel2013-11-181-162/+185
| | | | | | periodically) As suggested: Employ synchronization on lifecycle actions _and_ perform destroyImpl(..) always on AWT-EDT to avoid a deadlock.
* NEWT WindowImpl: Move consumePointerEvent(..) below doPointerEvent(..) to ↵Sven Gothel2013-11-181-109/+109
| | | | easy editing/review