aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
Commit message (Collapse)AuthorAgeFilesLines
* NEWT/OSX: 'Better' child window positioning, still, after reparenting into ↵Sven Gothel2011-09-271-2/+8
| | | | | | | | | parent, a white window rectangle remains. .. we also need to understand the absolute screen position better, ie. when required and when not (at window creation currently).
* NEWT/Threading: MainThread / DefaultEDTUtilSven Gothel2011-09-274-150/+81
| | | | | | | | | | | | | | | | | | | | | | | - MainThread: This class no more implements EDTUtil! This class just provides a main-thread utility, forking of a main java class on another thread while being able to continue doing platform specific things on the main-thread. The latter is essential for eg. MacOSX, where we continue to run NSApp.run(). - DefaultEDTUtil: - if Lock.DEBUG validate that no recursive locks are being hold, where it shall not (EDT: startup and return from task execution) - If task execution's result wasn't waited for (checked), at least dump exeception's stack trace if i happened. - MacDisplay: Just use DefaultEDTUtil - MacWindow: - No more need of special locking -> removed nsViewLock, since: - using proper EDT - capability to run from multiple threads (native Java thread attachment)
* NEWT: Adapt to GlueGen's Lock ChangeSet, all java callbacks for native have ↵Sven Gothel2011-09-279-54/+69
| | | | | | | | | | | | | | 'defer' 1st argument - Adapt to GlueGen's Lock ChangeSet: e4baba27507ce78e64a150ec6f69fb96f5721a34 - All java callbacks for native have 'defer' 1st argument. This allows enqueuing resulting events to the EDT if required, ie. the native thread may not be 'compatible' (MacOSX). - MacOSX-Native: enqueue key/mouse events and defer:=true for all java callbacks Since we are comming from a 3rd-party thread (AWT/NSApp-MainThread) we shall not abuse it.
* NEWT/JOGL: MacOSX UpdateSven Gothel2011-09-255-90/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature related: - Added always-on-top - Added translucency - Child Window Position - AWT parent: manual traverse up the tree and calc position on screen (Problem: the parent view rect is not at the proper position, but covers the whole frame) EDTUtil related: - Works now w/ AWT ot headless (again) - OSX native JNI callbacks gathering JNIEnv properly and attaches/detaches thread. - AWT case: using AWT-Event which properly dispatches our cocoa events - MainThread (headless) case: Fork off thread w/ main class and kick off NSApp run(). This leads to same behavior as w/ AWT case. - Using DefaultEDTUtil - Cleanup MainThread (implements EDTUtil) - Currently not used as EDTUtil (osx), just as launcher - Removed EDTUtil impl code, reuse DefaultEDTUtil - Cleanup AWTEDTUtil (implements EDTUtil) - Currently not used as EDTUtil (osx)
* CreateWindow set visible; lockSurface: lock AWT if availableSven Gothel2011-09-241-11/+15
|
* OSX: Sync MainThread w/ DefaultEDTUtil and proper deledation AWT EDT, ↵Sven Gothel2011-09-241-0/+5
| | | | MacWindow: create/visible at native creation
* Cleanup DefaultEDTUtil: Generics and DEBUGSven Gothel2011-09-241-32/+22
|
* Use new JNILIbLoaderBase addNativeJarLibs(all, atomic) for JOGL, ↵Sven Gothel2011-09-241-1/+7
| | | | NativeWindow and NEWT; no more LD_LIB_.. in setenv.sh for test scripts
* Proper usage of loadLibrarySven Gothel2011-09-211-7/+2
|
* NEWT/WindowImpl: Remove wait for position (keep waitForSize for ↵Sven Gothel2011-09-161-21/+6
| | | | | | reparent/fullscreen) Window position is not deterministic enough and slows down processing while sync on it
* NEWT Cleanup: AWT driver fix, WindowImpl createNative .., minor editsSven Gothel2011-09-162-21/+20
| | | | | | | | | AWT driver fix - setVisible at creation, using reconfigureWindow impl (fixed WindowImpl createNative .., - no double visibility check on creation - visible:=true anyway for later creation, if failed or not available yet
* waitForPosSize/createWindow: exclude 0/0, at creation wait for size as wellSven Gothel2011-09-161-37/+9
| | | | | | | - 0/0 may result in -1/-1, which is impl. specific (X11), might get deleted if causes more harm than ham - waiting for size after creation is actually a good thing todo
* NEWT Window: Allow positionChanged(..) notification for child windowsSven Gothel2011-09-161-1/+1
|
* NEWT/Reparent: Make new local position/size persitent if not promoted ↵Sven Gothel2011-09-161-0/+14
| | | | natively (invisible or recreation)
* NEWT/X11: Fix ABOVE handling, notify Java on reparentNotify, cleanup of ↵Sven Gothel2011-09-161-1/+8
| | | | setFullscreenEWMH
* NEWT/Reparenting: Give Composite WM some slack, sleep(100); Minor edits/fixesSven Gothel2011-09-161-5/+11
|
* NEWT X11/Windows: Fix AlwaysOnTop (startup and change)Sven Gothel2011-09-152-11/+14
|
* NEWT/WindowImpl: Allow fullscreen at window creationSven Gothel2011-09-151-2/+20
|
* NEWT setAlwaysOnTop(): Allow windows to stay permanent on top; TODO: X11/WindowsSven Gothel2011-09-141-14/+68
|
* Relocated VersionAppletSven Gothel2011-09-141-178/+0
|
* NEWT/Window: CreateWindow - Wait for user req. position: Fix about ↵Sven Gothel2011-09-091-8/+20
| | | | window-decoration/insets size
* NEWT: Window default pos ; FullScreenSven Gothel2011-09-093-40/+104
| | | | | | | | | | | | | | | - FullScreen - lock parent window if child - X11: more sophisticated EWMH FS usage - X11: set window 'Above' before FS and at focus - allow window WM default position at window creation - default position { -1, -1 } as hint to native WM to gather a suitable default position - wait until user-pos or WM-pos reached - reconfigureWindow* - allow -1 values for pos/size to mark no-change
* NEWT/ScreenMode: X11 fixes ; Ensure Screen's size is set if screenMode ↵Sven Gothel2011-09-083-168/+211
| | | | | | | | | | | | | | | | | | changed ; Enhanced tests; Catch NV/XRANDR/GL bug X11 fixes - X11Screen properly uses it's display's connection decorated in lock/unlock (for ScreenMode etc) Ensure Screen's size is set if screenMode changed - ScreenImpl's ScreenModeListener updates it's screen size so 'external' changes will be detected. Enhanced tests - Verify more data rel. ScreenMode Catch NV/XRANDR/GL bug - Read TestScreenMode01NEWT/TestScreenMode01bNEWT comments
* Destruction of GLAutoDrawable shall not remove them from AnimatorControl ↵Sven Gothel2011-09-083-91/+60
| | | | | | | | | | | | | | | | | | | (due to recreation) ; NEWT/Window: Remove isValid() API entry - always true! Destruction of GLAutoDrawable shall not remove them from AnimatorControl (due to recreation) - Completes commit b65e1e76d413b70e5593173e6bd36d30675554a6 - WindowImpl: - volatile: windowHandle/visible fields (memeory sync critical) - destroy must set visible := false, to avoid immediate recreation via a display call of another thread, ie an animator. NEWT/Window: Remove isValid() API entry - always true! - NEWT/Window's can always be recreated. - redundancy in API is even worse than redundancy in impl. :)
* Fix commit e1ecd85a9d5877861cde35baababb298d1339898 - send resize eventSven Gothel2011-09-071-4/+17
| | | | | | | Completes fix 2934c9814daf7ae053c3f03957961a2e62125aee Turns out it's more safe to send out the resize events to the listener, since the native event messaging is not reliable in some cases.
* Fix commit e1ecd85a9d5877861cde35baababb298d1339898 - send resize event on ↵Sven Gothel2011-09-071-0/+1
| | | | ScreenMode Change
* ScreenImpl: Debug - drop stack dumpSven Gothel2011-09-071-1/+0
|
* NEWT/Window: Cleanup Actions: Reparenting, Fullscreen and DecorationSven Gothel2011-09-071-61/+80
| | | | | | | | | | | | - don't assume size/pos change - hence don't set window's values, but wait for satisfaction - don't send resize events on our own, just rely on the event mechanism - fullscreen: don't wrap action around invisibility from Java, Win7 flashes otherwise. Clients who benefit from it (X11) impl. it natively. - fullscreen exit: validate pos/size in case of a child window, like reparenting. Otherwise the container might gets confused (eg. AWT).
* NEWT/ScreenMode: setCurrentScreenMode() shall only act if new mode differs; ↵Sven Gothel2011-09-062-9/+23
| | | | | | | | | On X11 use Thread.sleep(), more cooperative. In case newMode == currentMode, this caused an error, since X11 would never receive mode change events. Thread.sleep() is nicer for the X11/WM .. cooperative multitasking :)
* NEWT/X11Window: Remove unused 'windowReparented()' callback; Remove ↵Sven Gothel2011-09-061-12/+0
| | | | redundant DBG_PRINT on _NET_FRAME_EXTENTS
* NEWT Cleanup: Remove DEBUG_WINDOW_EVENT, ..Sven Gothel2011-09-063-4/+8
|
* NEWT: Sync User-LifecycleSven Gothel2011-09-062-10/+15
| | | | | | Sync User-Lifecycle: Display, Screen: createNative(), destroy(), isNativeValid() sync on instance (used by multiple threads)
* NEWT/X11Screen::setCurrentScreenMode: Use device's 'user' Display connection ↵Sven Gothel2011-09-061-6/+7
| | | | instead of on-the-fly temp one
* NEWT/Window/Insets: Implement proper Inset usage ; Cleanup ↵Sven Gothel2011-09-0610-250/+278
| | | | | | | | | | | | | | | | | | | | | | | | | WindowImpl::reconfigureWindowImpl Implement proper Inset usage (window decoration size) - Insets are either polled (updateInsets()) or event driven (insetsChanged()) - Insets are used for size/pos calculations from Java side - Natural size/pos in NEWT is client-area, ie w/o Insets - Adding setTopLevelPosition()/setTopLevelSize() for top-level values, ie including insets WindowImpl::reconfigureWindowImpl - Use flags to pass down the requested action to the native implementation - Impl. all native actions: visible, decoration, reparent, resize, fullscreen - Always use size/pos in client-area space, impl. shall use Insets to tranform them - Remove double-setting of (reparent/fullscreen), which where introduced due to buggy impl. code - Fix return from fullscreen position: Was overwritten with FS position (0/0) - Fix decoration change: Remove visible toggle - not required, and actually disturbing X11Windows/WindowsWindow: Added/Fixed Insets impl. Tests (manual): - TestSharedContextVBOES2NEWT utilizies proper window layout using Insets - TestParenting03bAWT uses window layout for reparenting
* NativeWindow/NEWT: Refine Insets definition for size and position, read and ↵Sven Gothel2011-09-0410-75/+106
| | | | write access
* Revert commit 8dc31bcaa3ee3a2407d1960ab42d094cac642876: Implicit ↵Sven Gothel2011-09-031-2/+1
| | | | setUndecorated(true) if Capabilities !isBackgroundOpaque(). The original manual logic allows better control
* NEWT Window: Implicit setUndecorated(true) if Capabilities !isBackgroundOpaque()Sven Gothel2011-09-031-1/+2
|
* NEWT: Respect 'setUndecorated(true)' before native creation (ie. startup w/ ↵Sven Gothel2011-09-023-5/+11
| | | | undecorated window)
* Fix NEWT/Window/Windows: setSize/setPosition/reconfigure: 'nop size' -1x-1 ↵Sven Gothel2011-09-021-13/+9
| | | | | | | -> 0x0 Windows: setPosition was invoking setSize (new size propagation) even w/ nop size, let WM event wmSize invoke setSize.
* NEWT/X11/Fullscreen: Fix Leaving FullScreenSven Gothel2011-09-011-5/+5
| | | | | | | | | | | | | | | NativeCode: "XChangeProperty( dpy, w, _NET_WM_STATE, XA_ATOM, 32, PropModeReplace, [ FULLSCREEN, ABOVE ] .." shall only be issued if entering FS, otherwise [ FULLSCREEN, ABOVE ] will be set on the client side at leaving FS, which is not intended. This caused a size reset to fullscreen size/mode. WindowImpl: Used WindowImpl.this.width and WindowImpl.this.height, where w and h should be used, the FS and pre-FS values.
* NEWT/X11 Bug 502 regressions: WM_DELETE_ATOM, .. etc couldn't be catched, etc.Sven Gothel2011-09-013-29/+36
| | | | | | | | | | Use EDT X11 Display connection (DPY) for whole display/screen/window lifecycle, but the user utilization (OpenGL, ..). Only using the same DPY for creation and event dispatching allows catching WM_DELETE_ATOM 'ClientMessage's. Sync X11Window.c w/ commit 4dbb8731219212e27c9afb769a1c62b32bd230a6 - remove 'test' code .. use orig lines
* X11Util.createDisplay() -> X11Util.openDisplay(): Better name match to ↵Sven Gothel2011-08-312-3/+3
| | | | XOpenDisplay/XCloseDisplay
* NEWT/X11 Display: CloseDisplay in same order as creation (ATI); Adding ↵Sven Gothel2011-08-311-4/+10
| | | | | | | | | | | | | | DisplayRelease0; Using 'EDT' suffix for display arguments CloseDisplay in same order as creation (ATI) - This enhanced the erroneous bug 515 (b54497155815852744adb657816cb4057948dae2) situation with closing the display connections. However, some SIGSEGV still slipped through. Adding DisplayRelease0 - Intended for cleaning up resources. Currently a NOP. Using 'EDT' suffix for display arguments - To mark the semantics of the display connection, which may be for window or EDT now.
* Fix NEWT regression due to fix of bug 502, commit ↵Sven Gothel2011-08-301-2/+3
| | | | | | | | | | | | 9ed513e9a9616f6028084df4c650c8caf31ea49d In case of exessive destroy/create (the NEWT reparenting test cases), some dpyEDT events are slipping through the event dispatcher. This fix uses issues more XSync on both Display connection in case of 'requestFocus' and 'closeWindow'. 'requestFocus' also uses the dpyEDT to issue the XSetInputFocus(..), since it's EDT related.
* NEWT Window/WindowImpl: Add generics - addChild()/removeChild() return ↵Sven Gothel2011-08-301-42/+52
| | | | boolean, see Collection::add/remove
* Tests: Comment GLProfile.initSingleton(false), which is redundant / implicit.Sven Gothel2011-08-301-1/+1
|
* NEWT: Add comment in API doc ; Use more generics in impl.Sven Gothel2011-08-301-7/+7
|
* Workaround (Fix) for Bug 502: Multithreading issue w/ libX11 1.4.2 and ↵Sven Gothel2011-08-302-13/+40
| | | | | | | | | | | | | | | | | | | | | libxcb 1.7 bug 20708 See https://jogamp.org/bugzilla/show_bug.cgi?id=502 Since the libX11/xcb code doesn't seem to be fixed anytime soon a better usable workaround is required than using a system property to enable 'over locking'. It turns out that the race condition is related to the parallel X11 Display connection usage of GLX/OpenGL and event dispatching. This workaround utilizes 2 X11 Display handles, one for windowing/OpenGL and one for event dispatching. This approach allows us to cont. multithreading use w/o locking the display and works on both implementations, the old bug-free libX11 and the 'new' buggy one. Downside is the little resource overhead of the 2nd X11 Display connection .. well. - Removes the property: 'nativewindow.x11.mt-bug'
* NEWT/ScreenMode: Fix Bug 456 - Reset to orig ScreenMode when exit (normal or ↵Sven Gothel2011-08-242-34/+83
| | | | ctrl-c) ; Generics Coding
* Cleanup: Java Generics Use and Removed Unused MethodsSven Gothel2011-08-241-1/+0
|