| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- NEWT/WindowImpl:
- 'void windowDestroyNotify()' -> 'boolean windowDestroyNotify(boolean force)', allowing to signal a forced close,
as well as replying whether the window has been closed. (called by native code)
- destroy(): set states before releasing the window lock
- NEWT/X11: Pass windowDeleteAtom for reconfigure window, in case of reparenting child to top-level
- NEWT/OSX:
- Add 'BOOL windowShouldClose()' impl., ie. having a chance to reject the close attempt
- Common impl. for 'windowShouldClose' and 'windowWillClose' -> 'windowClosingImpl'
utilizing new 'windowDestroyNotify' code (see above).
Fixes bug 560.
- NEWT/JOGLNewtApplet1Run: Refine out-of browser window behavior for window-close button
- default: move NEWT window back to browser parent
- closeable: close NEWT window
- jogl-test-applets: Add NApplet-Closeable test (Applet out-of browser window is closable)
|
|
|
|
|
|
|
|
| |
case it's already in destruction (destroyNotifySend via windowWillClose())
This fixes the double release crash of the NSWindow, at the end of an application.
Tested on OSX 10.6.8 and 10.7.3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
framework, NEWT)
- Fix Bug 516 (Determine Java Version).
See gluegen: 64639b805a32338385421f168e12c1ef7f749d00
- Fix OS X 10.5 linkage (weak framework, NEWT)
- Use weak framework linkage for all modules and frameworks:
AppKit, QuartzCore, Cocoa, OpenGL, JavaNativeFoundation
- NEWT: Handle NS exception while calling OS X >= 10.6 only methods:
- 'setAllowsConcurrentViewDrawing()'
- 'setCanDrawConcurrently()'
|
|
|
|
| |
event is pending
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lostFocus (resignKeyWindow) when in fullscreen mode; Ignore invalid key release/type events.
- Cleanup 'javaWindowObject' @ window-close & avoid NPE
Ensure that the direct window.close() impl. removes the global reference
and that all use cases check for NULL pointer.
- Disable lostFocus (resignKeyWindow) when in fullscreen mode
Similar to the X11 KDE bug, OS X delivers a lostFocus event
which we prevent from being processed in fullscreen mode.
- Ignore invalid key release/type events
In case of offscreen/onscreen switching (fullscreen/reparenting) via destroy/create,
the still pressed key would be send to the new window and repeat the action (key typed).
State validation discards the double processing.
|
|
|
|
| |
Remove warning of unused var
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
focus/isInside
On OS X 10.6.8 the lack of responder method declarations (mouseEntered, ..)
lead to ignore the impl. callbacks.
'isMouseInside' cannot rely on 'mouseExit'/'mouseEntered' when
setMouseInvisible() is being called, deduce it manually.
focusLost == mouseExit (OS X behavior), hence focusGained needs
to set mouse invisible/visible in case it's requested.
|
|
|
|
|
|
|
| |
ridiculous slow
Each call to CGDisplayScreenSize() took around 6ms (5ms .. 20ms, avrg 6ms)
which added up to ~2s for ~400 Screen modes.
|
|
|
|
|
|
|
|
|
|
|
| |
Closing:
- Java: Set handle to null
- Native:
- Don't release the NSView explicit, but rely on NSWindow's release
- Don't use NSWindow close() but simply call release() instead.
The latter doesn't produce a crash SIGSEGV on exit in some cases.
OSX 10.7.2, NV GPU
|
|
|
|
|
|
|
| |
rotation! (How to ?)
Get/Set ScreenMode impl on OSX.
Set is limited to resolution and size, since I don't know how to change the rotation.
|
|
|
|
| |
c26d6005e1fe74e9aee01d9d72942f566884fcd2
|
| |
|
|
|
|
| |
deadlocks and simplify call-tree
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'NSThemeFrame lockFocus' NSView.m:6053
- surfaceLock/Unlock: Use NewtView softLock
- createWindow:
- enable lock/unlockFocus to force realization of view
- add retainCount in dbg-msg
- clarify changeContentView
|
| |
|
|
|
|
| |
incl. native focus request (X11, Windows, OSX)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
windowRepaint() callback
- act on positionChanged(..) only for realized windows,
otherwise we could end in an AWT deadlock (AWT parent window).
- add view parenting calls (addSubView/removeFromSuperview)
- attachToParent after view configuration
- allow concurrently view draw
- add windowRepaint() callback (native -> java)
- add more debug tracing
|
|
|
|
| |
lockFocus(), deadlocks since we render separate to focus mgmt.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
behavior/tests)
- Old code was just requesting the focus and made the window upfront
and notifying a gained focus to WindowImpl. (hack)
- Using proper requestFocus impl. issuing focusAction() and utilizing native
focus gained/lost messages. This distinguish between 'makeKey' and 'orderFront'.
Also requesting and accepting (view) first responder role, which is a precursor
to proper gained/lost focus handling on OSX.
- NEWTCanvasAWT: Adding 'steal AWT focus':
+++
void requestFocus() {
super.requestFocus(); // AWT
< steal AWT focus >
NEWTChild.requestFocus()
}
+++
Helps make the focus traversal between NEWT/AWT more reliable.
Happend on OSX that AWT (NewtCanvasAWT instance) didn't release the focus
after NEWT child gained the same.
We are not able to use the 'focusAction()' here (disabled in this code path)
due to AWT-EDT blocking and recursive focus changes. The latter is also
intendend to request the AWT focus first ..
- AWT/NEWT focus test 01 passes on OSX
|
| |
|
|
|
|
| |
warp) - cleanup pos/coord translations
|
|
|
|
|
|
|
|
|
|
|
|
| |
(client-space/top-level, child/parent)
At resizing a perent window w/ a NEWT OSX child,
the window position needs to be updated since it's absolute.
Re-adding sending *Changed notifications via the appropriate WindowImpl methods.
Turns out they are missing in some parent/child situations (fullscreen for example).
Native getLocationOnScreen0(..) queries totalHeight by it's own to have correct values.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
pos/size notifications
Newt/MacWindow
- remove redundant manual window-move/set-size code
- Use local getLocationOnScreen(..), fixes positionChanged(..)
- setFrameTopLeftPoint(..) use totalHeight (w/ insets)
- create: don't 'retain' the window reference (ref counter)
- close: release view,
- cache insets - to be used @ create
|
|
|
|
| |
bottom-left to our top-left origin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Regardless whether the window is a top-level or child window,
we set it's position w/ absolut left-bottom coordinated.
To do so even for an AWT parent component, we retrieve the screen position
by traversing through the AWT tree and adding up each parent's rel. position,
since the native view only reflects the AWT frame.
Note: OSX does not use native views for each AWT component.
- In case we reparent child -> top, we cannot orderOut() the ex parent,
but need to just call orderBack(..), otherwise the whole ex-parent frame
gets hidden.
- In case we close a child window (and reparent child -> top),
we need to remove the parent/child relation and orderOut(..)
before close(..), otherwise the window artifact is left behind.
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
separation ; android cleanup
remaining all-in-one jnlp's / jars:
jogl-all-awt.jnlp -> jogl.all.jar
jogl-all-noawt.jnlp -> jogl.all-noawt.jar
jogl-all-mobile.jnlp -> jogl.all-mobile.jar
native for all above: jogl-all-natives-linux-amd64.jar
jogl.all-android.apk jogl.all-android.jar
more may follow for each supported platfrom
++++
- newt: proper 'driver' separation
- all drivers reside now in jogamp.newt.driver.*
- remove intptr.cfg / use gluegen's
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jogamp.<module> (2/2) - edit files
- com.jogamp.opengl.impl -> jogamp.opengl
- com.jogamp.opengl.util.glsl.fixedfunc.impl -> jogamp.opengl.util.glsl.fixedfunc
- com.jogamp.nativewindow.impl -> jogamp.nativewindow
- com.jogamp.newt.impl -> jogamp.newt
This sorts implementation details from the top level, ie skipping the public 'com',
allowing a better seperation of public classes and implementation details
and also reduces strings.
This approach of public/private seperation is also used in the OpenJDK.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issueing 'requestFocus' via the native EDT dispatch loop may cause a deadlock,
due to a possible implicite AWT requestFocus call (NewtCanvasAWT).
Approach:
RequestFocus issued directly,
by Window.requestFocus() and the native EDT dispatch loop,
is queued for later execution by EDT.
This shall decouple a possible native windowing TK resource collision.
- X11Windows.c: Add missing 'reparented' param for requestFocus
to force requestFocus after reparenting.
- AWTWindow.java: Add requestFocusImpl()
+++
NEWT: Cleanup
- Remove Event Type Bits in:
- EventListener.h
- NEWTEventListener.java
- Remove InputEvent 'consume' status
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Misc.
Due to incapabilities of the previous AWT/NEWT reparenting
the implementation and spec had to be changed to support this feature.
See the first 2 comments below.
- Tested on GNU/Linux (OK), Windows (a few bugs left)
-
TODO:
- Clarify the size/layout issue, ie who is responsible etc
In the test, incl AWT/NEWT, we set the size on the GLWindow
and ie pack the AWT Frame.
- Fix remaining [Windows] bugs ..
- Fix/Implement MacOSX port ..
Fix AWT/NEWT reparenting:
===========================
- Now NewtFactory's createWindow() method for parenting handles NativeWindow only
and is no more responsible for creating a child window upon an AWT Component.
See class com.jogamp.newt.awt.NewtCanvasAWT for NEWT/AWT parenting.
- New com.jogamp.newt.awt.NewtCanvasAWT, responsible for handling
AWT's reparent events via addNotify/removeNotify.
Reparenting is implemented via the new NEWT Window's reparentWindow() method.
Also sets the background erase to false, if supported.
- Fix zero size semantics in Window (setSize/setVisible)
Since a zero size window is not supported by many compoenent (Windowing system, OpenGL, ..)
we use the visibility methodology to not show a 0x0 window. See Javadoc.
AWT components may start with zero size.
- New NEWT Window: reparentWindow(NativeWindow newParent, Screen newScreen)
Allowing to change the parent of a window. Similar with the fullscreen toggle,
but without size/position change.
Native reparenting allows to keep alive the native
window while changing the container, hence it is preferred to a destroy/create cycle.
To benefit from the native reparenting, a NEWT implementation has to implement
'protected boolean reparentWindowImpl(long newWindowHandle)'
and return true, otherwise reparenting will be 'emulated' via
the expensive destroy/create cycle.
- NEWT's Window references all of it's children, if any
- NEWT's Window propagates setVisible/destroy actions to it's children.
- Fix NEWT's destroy() semantics.
A call of destroy() or destroy(false) shall only result in the destruction of the
native window (handle) nothing more. A subsequent setVisible(true) shall allow
the complete recreation of the Window into a usable state.
A call of destroy(true) destroys all resources the Window holds,
may include Screen/Display and OpenGL resources in case of GLWindow.
This is necessary to allow proper reparenting, where a native window may become
destroyed, but should be recreated via setVisible(true) later on.
- Fix NEWT set[Size|Position|Fullscreen|Visible] synchronization.
Use a recursive lock instead of the Window instance, otherwise arbitrary Window access
via AWT's EDT, NEWT's EDT or other threads can block.
Also removed a use pattern like:
key.lock()
try {
EDT.invoke(action());
} finally {
key.unlock();
}
Where action() itself uses the same lock object (here key), the result is a deadlock.
NativeWindow Changes:
======================
- We can use XInitThreads() now (concurrent threading support)
in combination with AWT.
Might have been some async in our NEWT locking in regards to AWT (sync()),
and the X11 Display changes made in c787f50d77e2491eb0d8201d534a6fa4885a929e.
- NativeWindow's window handle is _not_ transient like surface handle,
fixed documentation.
JOGL Changes:
=============
- New 'isRealized()' method in GLDrawable.
-
Misc Fixes
============
- Fix NEWT set[Size|Position|Fullscreen|Visible] duplicate code
Due to pure abstract signatures, the set[Size|Position|Fullscreen|Visible]
implementations of X11, OSX, .. contained duplicate code and state handling (size, pos, ..).
These are now decoupled, ie generic set[Size|Position|Fullscreen|Visible] implementations
calling simple set[Size|Position|Fullscreen|Visible]Impl implementations.
- Fix NEWT: Renamed setAutoDrawableClient(boolean) to setHandleDestroyNotify(boolean)
The semantic of
setAutoDrawableClient(boolean) defaults to false
was too complicated and specific, hence changed to
setHandleDestroyNotify(boolean) defaults to true
since its more clear and the name refers the window itself..
- Fix NEWT: Removed GLWindow's unused global window list
- Fix NEWT: Remove Window's unused event mask
- Rename com.jogamp.newt.impl.awt.AWTNewtFactory -> com.jogamp.newt.awt.NewtFactoryAWT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
+++++
Changed NEWT NativeWindow creation contract
Original contract:
(1) A native window was created as soon as possible,
ie when NEWTFactory.createWindow(..) was called - if possible.
(2) A valid native window has to be created at least after setVisible(true)
has been called.
Problems:
Not all implementation are able to create the native window that early,
but at setVisible(true) only (e.g: KD and EGL).
Due to window parenting especially the new AWT/NEWT parenting,
the native window can only be created in case the parent native window is valid.
New contract:
(1) A native window is created at setVisible(true),
if it's a top level window or the native parent window is valid.
(2) A valid native window may not be created after setVisible(true)
has been called.
Subsequent setVisible(true) calls shall be made in case
the creation has not been done yet.
This is demonstrated in GLWindow.display() for example.
The new contract implements a lazy native window creation.
+++++
AWT/NEWT Parenting
- HierarchyListener and ComponentListener ensure that the NEWT child window
will be setVisible according to the AWT parent window.
- Lazy native window creation relaxes requirements to the parent window's state.
- Attachment of the child window and setVisible() may be called
after NEWT child window creation.
- GLWindow supports NEWT child window creation directly
The test case TestParenting01AWT.java reflect this new contract
and demonstrates more simplified and more flexible use cases.
+++++
NEWT Fixes:
- All NEWT implementation's native code method names end with 0.
- GLWindow: don't issue the actual 'init'/'display' call to GLEventListeners
in case the window is not visible.
- NEWT setSize/setPosition:
if native-window
call native-window action and let the attributes being set by
the feedback call, which issues more action, ie RESIZE.
else
set the attributes directly, no feedback call/action is necessary.
+++++
X11 Fixes:
- X11GLContext MakeContextCurrent:
Use MakeCurrent in case write and read drawable are equal,
otherwise SEGV happens on ATI with heavy multithreading involved!
Even XLockDisplay and XSync didn't help here ..
- X11GLXDrawableFactory shared resource:
Removed the resource holder thread to simplify code,
hence proper release is no more desired and it could become a cause for deadlock.
- Moved XInitThreads() from NEWT X11Window -> NativeWindow X11Util,
since NativeWindow is loaded first (essential for XInitThreads())
and it is the more basic lib.
- Made call to XInitThreads() conditional, ie it's spared if
AWT could be used - which causes SEGV .. (AWT bug). See X11Util.java
+++++
JOGL Fixes:
- GLProfile.isAWTAvailable() -> NativeWindowFactory.isAWTAvailable()
- GLProfile.isAWTJOGLAvailable() -> GLProfile.isAWTAvailable()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- X11GLXDrawableFactory:
- Move shared resource creation/destruction into it's own thread
- Remove the ATI hack (no XDisplay closing) for every Display,
this is only necessary for the shared XDisplay and in case of AWT.
- Newt
- Display: Only pumpMessages if device is ready.
- X11Display: Verify handle not null at DispatchMessage.
- Common recursive ToolkitLock implementation, from
src/nativewindow/classes/com/jogamp/nativewindow/impl/LockingNativeWindowFactory.java and
src/newt/classes/com/jogamp/newt/Window.java,
-> com.jogamp.nativewindow.impl.RecursiveToolkitLock
- Unique XLockDisplay/XUnlockDisplay call via X11Util to simplify debugging.
X11Util: Added debug code for XLockDisplay/XUnlockDisplay.
Added fast LongObjectHashMap
Added static lib loading and initialization.
Removed active and passive list, as well as unused methods,
to easy maintenance. Possible since the only 'uncloseable' Display
might be the shareable one.
- X11Lib: Added static initialization via X11Util
Test:
junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGears*
- Add WindowListener for quit ..
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Moved all implementation details (awt/x11/windows/macosx/..)
to com.jogamp.newt.impl
- Moved awt event handling
com.jogamp.newt.awt.event -> com.jogamp.newt.event.awt
- NEWTEvent extends java.util.EventObject
- NEWTEventListener extends java.util.EventListener
- Added Trace*Adapter, logging the event, incl. the time lag
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
JOGL-JAR-BUNDELING.txt
A first FAQ about the (new) JAR partitioning.
lstjars/lstjars.linux_amd64-20100406.log
A first deployment payload measurement in kBytes :)
New JAR Partitioning:
All-In-One (*all*):
- with AWT
- without AWT
See JOGL-JAR-BUNDELING.txt
Atomic:
See JOGL-JAR-BUNDELING.txt
- Removed property setup.noall, since the *all* targets are mandatory now.
Currently
- Added gl4 part (still empty)
- Fixed make/lstjars.sh and etc/profile.jogl (new JAR bundles)
- Fixed make/lstjars.sh to produce JAR and PACK200 numbers,
and using the *all* bundles if possible.
MacOsX:
- Fix missing refactoring in src/newt/native/MacWindow.m
- Adding missing NSWindowDelegate protocol to NewtMacWindow
as mandatory since 10.3.6
Misc:
- Applied: 'gluegen.cpptasks.striplibs' to all native libraries.
- Use path.seperator (ant) and system.env.library.path (gluegen),
for junit runs.
|
| |
|
| |
|
|
|
|
| |
X11: windowResize event handled
|
|
|
|
| |
create functions, ie with Window and Capabilities arguments
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add: NEWT pumpMessages/dispatchMessages
- Handled by the Display implementation for all windows
- Windows .. OK
- MacOSX .. OK
- X11 .. OK
- Added Atom Property handling to attach java window object to window
- Removed the eventMask for dispatching messages,
since dispatching is for all windows now.
(Wasn't impl. for all platforms anyways)
- All init static code will funnel in the Display.initSingletion(),
to ensure a proper init order for all platforms.
- Display creation is unique for (name,thread).
Handling a TLS mapping of display-names to Displays.
- GLWindow: autoSwapBufferMode and eventHandlerMode are static members
- Tested with experimental tagged
GLWindow.setRunPumpMessages()/runCurrentThreadPumpMessage(),
1 thread - 4 windows, etc ..
java demos.es2.RedSquare -1thread -onepump -GL2 -GL2 -GL2 -GL2
No benefit ..
However .. the implementation is more correct now,
due to the display/current-thread message pumping.
- Fix: Window.sendMouseEvent() bounds check
- Fix: MacWindow has proper nsView locking now,
local to the window instance. locked in lockSurface
besides general window manipulation.
- Fix: JAWT utilized JAWTUtil.init() to
init libraries - NativeLibLoaderBase.loadNativeWindow("awt")
call was missing. (Visible on MacOSX + AWT)
- Fix: GLXUtil proper locking
- Fix: X11Util proper locking
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1976 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1959 232f8b59-042b-4e1e-8c03-345bb8c30851
|