aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1222 - NEWT OSX: setAlwaysOnTop() and setAlwaysOnBottom() not workingSven Gothel2015-09-264-62/+26
| | | | | | | | | | | | - The NSWindow level must be set at window creation - Levels are - aontop: kCGMaximumWindowLevel - aonbottom: kCGDesktopIconWindowLevel (w/ input) - normal: NSNormalWindowLevel - Hence we need to recreate the NSWindow if toggling the state, similar to opaque .. etc.
* NEWTDemoListener: Fix 'v' modifier collision of ctrl, use shift.Sven Gothel2015-09-261-1/+1
|
* Bug 1188: Fix setMaximized(..) isReconfigureMaskSupported(..) querySven Gothel2015-09-261-2/+2
| | | | | | | setMaximized(..) isReconfigureMaskSupported(..) was using the state bit-number instead of the state bit-mask! Fixed.
* Bug 1214: Fix Deadlock in screenPositionChanged(..); Use ↵Sven Gothel2015-09-264-146/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | screenPositionChanged(..) in size[Screen]PosInsetsChanged(..) on OSX; Cleanup OSX Code - Fix Deadlock in screenPositionChanged(..) Defer requires to spawn whole child-window action to another thread since we may come from native 'NewtWindow::windowDidMove()' on MainThread. - Use screenPositionChanged(..) in size[Screen]PosInsetsChanged(..) on OSX Move callback WindowImpl::sizePosInsetsChanged(..) to OSX's WindowDriver::sizeScreenPosInsetsChanged(..), since we need to use screenPositionChanged(..) to calculate child window relative position to parent. I.e. we receive the location on screen. - Cleanup OSX Code - Native JNI entries shall handle NULL windowHandle -> return - Clarify usage of 'getWindowHandle()' and use 'isNativeValid()' if appropriate. - Don't re-use cached getWindowHandle() for non-blocking off-thread actions, since handle may become invalid. - Clarify getLocationOnScreen*(..) implementation code, i.e. separate getLocationOnScreenByParent(..) semantics.
* Bug 1214 - NEWT MacOSX: Detect auto-resize of Window when it is larger than ↵Sven Gothel2015-09-255-33/+93
| | | | | | | | | | | screen - On OSX (similar to X11) a created window with size > screen will get resized to fit screen size implicitly. - Fix detects insets, position and size after onscreen window creation. - Patch also merges insets and size change java callback
* NEWTDemoListener: Double-Mouse-Click Fullscreen only w/ 3 pointers involvedSven Gothel2015-09-191-1/+1
|
* TestGearsES2*AWT / NewtDemoListener: Show pixel-scale in title bar.Sven Gothel2015-09-181-1/+9
|
* Unit Tests: NEWTDemoListener: Less verbose; GraphUI-Demos: Show DPI and ↵Sven Gothel2015-09-171-11/+12
| | | | Pixel-Scale in GLEventListener.init(...)
* NEWT Window Maximize: re-gain focus after maximize action (maybe lost on ↵Sven Gothel2015-09-151-0/+5
| | | | platforms, i.e. OSX)
* Fix NEWT DisplayImpl.createPointerIcon: Pass through Exceptions, as required ↵Sven Gothel2015-09-151-10/+24
| | | | by API doc.
* Bug 1211: Refine NEWTDemoListener, JOGLNewtAppletBaseSven Gothel2015-09-152-48/+72
| | | | | | | | | | | - NEWTDemoListener.createPointerIcons(..) - Use Display instance - Simplify PointerIcon creation using a list, skipping all non-found resources. - JOGLNewtAppletBase - Bring back reparent action via key 'r' - Drop redundant PointerIcon, using NEWTDemoListener
* Bug 1211: Hardening Condition-Wait from Spurious-Wakeups and unintended ↵Sven Gothel2015-09-1511-154/+604
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InterruptedException(s) Below is an updated list of Condition-Wait classifications as described in Bug 1211. This list includes recent changes on GlueGen regarding this Bug 1211. A followup commit will address the unit tests. - Noncancelable + Persistent-Wait - GLMediaPlayerImpl.StreamWorker thread (changed) - pauses thread in case of intr - Cancelable + Persistent-Wait: - LFRingbuffer.getImpl(..) - LFRingbuffer.waitForFreeSlots(int) - SyncedRingbuffer.getImpl(..) - SyncedRingbuffer.waitForFreeSlots(int) - FunctionTask.invokeOnNewThread(..) (changed) - RunnableTask.invokeOnNewThread(..) (changed) - SharedResourceRunner.run() - SharedResourceRunner.doAndWait() (changed) - SharedResourceRunner.start() (changed) - SharedResourceRunner.stop() (changed) - GLMediaPlayerImpl.StreamWorker ctor (changed) - GLMediaPlayerImpl caller thread actions do*() (changed) - AndroidGLMediaPlayerAPI14.getNextTextureImpl(..) (changed) - DisplayImpl.enqueueEvent(..) (changed) -> Persistent-Wait -> Cancels wait and NEWTEvent -> dispatchMessage(NEWTEventTask): always notifyCaller! - GLDrawableHelper.invoke(..) (changed) - DefaultEDTUtil.waitUntilIdle() (changed) - DefaultEDTUtil.waitUntilStopped() (changed) - DefaultEDTUtil.invokeImpl(..) (changed) - DefaultEDTUtil.NEDT.run(..) (changed) - AWTEDTUtil.waitUntilStopped(..) (changed) - AWTEDTUtil.invokeImpl(..) (changed) - AWTEDTUtil.NEDT.run(..) (changed) - SWTEDTUtil.invokeImpl(..) (changed) - SWTEDTUtil.waitUntilStopped(..) (changed) - SWTEDTUtil.NEDT.run(..) (changed) - GLWorkerThread.invokeAndWait(..) - GLWorkerThread.start() (changed) - GLWorkerThread.WorkerRunnable.run() (changed) - Animator.run() (changed) - AnimatorBase.finishLifecycleAction() (changed) - OSXUtil.RunOnMainThread(..) (changed) - SingletonInstanceServerSocket.Server.shutdown() (changed) - SingletonInstanceServerSocket.Server.start() (changed) - com.jogamp.audio.windows.waveout.Mixer.shutdown() (changed) - Extending/Using InterruptSource.Thread (changed) - DefaultEDTUtil.NEDT - AWTEDTUtil.NEDT - SWTEDTUtil.NEDT - GLWorkerThread.thread - Mixer.FillerThread - Mixer.MixerThread - Using InterruptSource.Thread (changed) - TempFileCache - LauncherTempFileCache - Animator.thread - SingletonInstanceServerSocket.Server.serverThread Deprecated: - FunctionTask.invoke(..) (changed) -> on current thread, no wait -> deprecated - RunnableTask.invoke(..) (changed) -> on current thread, no wait -> deprecated
* Bug 1205 - NEWT Security: Clear framebuffer after creation and before ↵Sven Gothel2015-08-311-10/+9
| | | | | | | | | | | | | | | | visibility (X11 Onscreen) X11Window.c: Adding CWBackPixel BlackPixel(..) resulting in an initial black window (zero). com.jogamp.opengl.test.junit.newt.TestWindows02NEWT shows the content w/ opaque background and transparent one. Note: To be able to receive a transparent background, one needs to utilize a compositor WM (e.g. KWin w/ effects enabled). Due to commit cf9e2f2cb8ead7efd7751dcbfaecb36ed06cf9d6 (Bug 1210) this works in pure NEWT mode w/o utilizing GLX.
* Bug 1208 - NEWT: Window: Consider avoiding operations if not supported, see ↵Sven Gothel2015-08-311-28/+84
| | | | | | | | | | getSupportedStateMask() - Skip operation if not supported - Fix skip operation if isFullscreen() && !isNativeValid(): We have to store the state w/o action, so the state can be picked up at native creation.
* Fix Bug 1209 - Regression of Bug 1188 Patches: Parented Fullscreen Issues ↵Sven Gothel2015-08-311-51/+94
| | | | | | | | | | | | | | | | | (X11, Windows) The regression was caused by WindowImpl changes: (1) Not ignoring maximizedChanged(..) during fullscreen. X11 windows may promote maximized state, which will be passed in reconfigure -> non-fullscreen and hinders reseting the original size. (2) getReconfigureMask(..) was wrongly translated to state-mask, i.e. special handling of STATE_MASK_UNDECORATED and STATE_MASK_CHILDWIN was removed. - Issues above were corrected - Replace PSTATE_MASK_FULLSCREEN_NFS* w/ own stateMaskNFS for simplification
* Bug 1188: Refine getSupportedStateMask() semantics and minimum requirements ↵Sven Gothel2015-08-318-20/+18
| | | | | | | | | (adding STATE_MASK_FULLSCREEN) Refine getSupportedStateMask(): - always for _after_ native creation, i.e. first visibility - removed STATE_MASK_AUTOPOSITION - adding STATE_MASK_FULLSCREEN to minimum requirements
* Bug 1202 - Add support of Adaptive Vsync via [GLX|WGL]_EXT_swap_control_tearSven Gothel2015-08-273-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [GLX|WGL]_EXT_swap_control_tear extensions support asynchronous buffer swaps, i.e. adaptive Vsync. <https://www.opengl.org/wiki/SwapInterval_aka_vsync#Adaptive_Vsync> <https://www.opengl.org/registry/specs/EXT/wgl_swap_control_tear.txt> <https://www.opengl.org/registry/specs/EXT/glx_swap_control_tear.txt> <http://keithp.com/blogs/async_flip/> The extensions utilizes a negative interval value, enabling late swaps to occur without synchronization to the video frame. Hence '-1' has new semantics, previously it was the 'default value' of 'untouched vsync interval'. New default is: - 0 for unrealized context - 1 for realized context +++ It requires [GLX|WGL]_EXT_swap_control, hence we shall ensure to use use this extension in the implementation of GLContext.setSwapInterval(..). +++ Mesa3D seems to support GLX_SGI_swap_control only. +++ Implemented on Windows and X11. +++ On GNU/Linux using NVidia driver w/ my setup(*), sadly the query GLX.glXQueryDrawable(displayHandle, drawable.getHandle(), GLX.GLX_LATE_SWAPS_TEAR_EXT, val); always returns zero here, indicating async vsync is not supported. (Queried the attribute for every frame in windowed or fullscreen mode) Fullscreen (*) - Debian 8 - Kernel 3.16 - KDE/Kwin - GL Version 4.5 (Core profile, arb, compat[ES2, ES3, ES31], FBO, hardware) - 4.5.0 NVIDIA 355.06 [GL 4.5.0, vendor 355.6.0 (NVIDIA 355.06)] - GL_RENDERER GeForce GTX 660/PCIe/SSE2 - Samsung U28D590 (DFP-4): Internal DisplayPort +++
* Merge branch 'Bug1178' of https://github.com/xranby/joglSven Gothel2015-08-261-14/+44
|\
| * Bug 1178: X11UnderlayTracker: Resend identical KeyCode, KeySymbol and KeyCharXerxes Rånby2015-08-251-6/+2
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * Bug 1178: Fix cc3: Set position using LocationOnScreen coordinates.Xerxes Rånby2015-08-251-8/+42
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
* | Bug 1188: NEWT WindowsWindow.c: Better support for 'isOnBottom' on Windows ↵Sven Gothel2015-08-261-14/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Fullscreen on Bottom not working though) - Terminology - ALWAYSONBOTTOM -> isOnBottom - ALWAYSONTOP -> isOnTop - Better support for 'isOnBottom' on Windows - Refine 'SetWindowPos(..)' calls to handle isOn[Top|Bottom] - Refine 'ShowWindow(..)' calls to handle isOnBottom - Intercept WM_WINDOWPOSCHANGING to enforce isOn[Top|Bottom], i.e. change params (hwndInsertAfter and flags). - Fullscreen on Bottom not working - While we change all flags appropriately (NOACTIVATE, ..) and don't issue CDS_FULLSCREEN is on bottom, Windows seems to enforce the window to be on top if it is sized to the screen maximum.
* | Bug 1188: Fix API doc of getSupportedStateMask(); Misc Changes (see below)Sven Gothel2015-08-253-31/+29
| | | | | | | | | | | | | | | | - Fix STATE_MASK_CREATENATIVE - Simplify resetStateMask() - Windows WindowDriver: Remove STATE_MASK_STICKY from supported states - TestGearsNEWT: Use NEWTDemoListener
* | NEWT WindowsWindow.c: Fix return value; Add tracking of inOn[Bottom|Top]Sven Gothel2015-08-251-4/+24
| |
* | Bug 1188: Introduce getSupportedStateMask() implemented via WindowDriver's ↵Sven Gothel2015-08-2114-59/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | getSupportedReconfigMaskImpl() - See getSupportedStateMask() for semantics - getSupportedReconfigMaskImpl() result now used for isReconfigureMaskSupported() - getSupportedReconfigMaskImpl() implementations: - Full featured: X11, Windows and OSX - X11: Use WindowManager Atoms for certain features (dynamic) - Others: Use fixed features. - TODO: Consider avoiding actions if not supported.
* | Bug 1188: Refine reconfig state bitsSven Gothel2015-08-202-8/+8
| |
* | Bug 1196: Fix Unresolved strncpy_s (MSVCRT) on WinXPSven Gothel2015-08-201-2/+8
| | | | | | | | | | | | | | | | | | | | Unresolved strncpy_s (MSVCRT) on WinXP, as shown w/ dependency walker (red module, red unresolved line). Mapped: _tcsncpy_s -> strncpy_s (!UNICODE). On WinXP MSVCRT has no strncpy_s. _tcsncpy_s(sOut, sOutLen, s, len) -> bound-check + _tcsncpy(sOut, s, len)
* | Bug 1188: Cleanup public/private[reconfig, non-reconfig] state bitsSven Gothel2015-08-193-17/+19
|/ | | | | | | | | - STATE_BIT_FULLSCREEN_SPAN is private and used for reconfigure, hence STATE_BIT_COUNT_RECONFIG is needed. - STATE_BIT_FULLSCREEN_SPAN is added at the end of public state bits - PSTATE_BIT_MINMAXSIZE_SET is unused.
* Bug 1188: Add @since 2.3.2 tagSven Gothel2015-08-182-14/+86
|
* Merge branch 'Bug1183' of https://github.com/xranby/joglSven Gothel2015-08-181-0/+8
|\
| * Bug 1183: X11RandR13 XRRGetScreenResourcesCurrent _occasionally_ reports ↵Xerxes Rånby2015-08-161-0/+8
| | | | | | | | empty data
* | Bug 1192: NEWT native/X11Display.c Cleanup JNI signatures in commentsXerxes Rånby2015-08-131-6/+6
|/
* Bug 1188: Windows: Implement unresizable using appropriate windows stylesSven Gothel2015-08-122-115/+51
| | | | | | | - to avoid resizing when toggling resizable (change of window border) we maintain 'RECT insets' in our WindowUserData struct and fix the client -> top position late in NewtWindow_setVisiblePosSize(..) after any style change.
* Bug 1188: Refine Maximized on X11 / Impl. Maximized and Iconify on WindowsSven Gothel2015-08-127-176/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | WindowImpl - remove updateMinMaxSize(..) - unused info - fix appendStateToString: show all maximized state changes if reconfig - add sizePosMaxInsetsChanged(..) and sendMouseEventRequestFocus(..) accumulating multiple callbacks from impl. - add: maximizedChanged(..) notification from native impl. - refine manual maximized mode used for OSX and Windows (single extent) - reconfigMaximizedManual(..) - resetMaximizedManual(..) X11 WindowDriver: - Update maximized at xreconfig, read from _NET_WM_STATE - Use less Java callbacks from JNI Windows WindowDriver: - Use native maximized, if HORZ && VERT, otherwise use manual maximized for single extent. - Invisible of top-window -> MINIMIZED/ICONIFY showing the app in task-bar.
* NEWT WindowImpl + WindowDriver: Remove updateInsetsImpl(Insets insets) and ↵Sven Gothel2015-08-1111-64/+5
| | | | | | rely solely on insetsChanged(..) (event driven) Only affected WindowDriver is AWT, which now updates the insets when setVisible(true).
* NEWT OSX WindowDriver: Must wait for resize on main-thread (Related to Bug 1188)Sven Gothel2015-08-111-1/+1
| | | | | | If not waiting for resize on main-thread, corruption may happen at continued rendering. This has been experienced w/ maximize-horizontally (Bug 1188).
* NEWY WindowImpl appendStateBits(..): Refine maximized; Refine WindowDriver's ↵Sven Gothel2015-08-114-7/+14
| | | | reconfig DEBUG
* Bug 1188: OSX: Add maximize horz/vert, implemented manuallySven Gothel2015-08-111-4/+44
|
* Merge branch 'master' of https://github.com/xranby/joglSven Gothel2015-08-111-2/+16
|\
| * Bug 1178: Fix cc10 regression caused by the fix for cc7.Xerxes Rånby2015-08-101-2/+16
| | | | | | | | | | | | | | | | | | | | | | Bug 1178 cc10: We no longer throw an ExceptionInInitializerError when X11 is not available. Fix 1178 cc10: We need to use an X11 resource in the constructor in order to throw an ExceptionInInitializerError if X11 is not available. We can resolve this by query for the X11 display and screen inside the constructor. Signed-off-by: Xerxes Rånby <[email protected]>
* | NEWT WindowDriver's reconfig DEBUG: Add end-of-method dump of current ↵Sven Gothel2015-08-113-6/+13
| | | | | | | | states, dump current and new states upfront.
* | Bug 1188: Fix regression on OSX setVisible: in-visibility never reached on ↵Sven Gothel2015-08-111-5/+5
| | | | | | | | | | | | | | | | | | | | child windows / Fix [Un}Resizable style - Fix regression on OSX setVisible: in-visibility never reached on child windows - Fix 'typo' while porting to bit-mask, i.e. '!=' -> '=='. - Fix [Un}Resizable style - Use NSResizableWindowMask only for !Undecorated and if STATE_MASK_RESIZABLE is set.
* | WindowImpl appendStateBits(..): Fix POINTER* representationSven Gothel2015-08-111-1/+3
| |
* | Bug 1188: Fix regression on X11 setVisible: in-visibility never reached on ↵Sven Gothel2015-08-112-6/+10
|/ | | | | | | | | child windows It has been experienced that UnmapNotify is not sent for child windows when using IconicState! Hence the visible:=false event never reaches the Window, causing an error. This patch only uses IconicState for top-level windows and if requested.
* Bug 1183: Cleanup x11/RandR javadoc and native/X11RandR13 signature commentsXerxes Rånby2015-08-102-3/+3
|
* Bug 1188, Bug 1186: NEWT Window: Support non-resizable, minimize, maximize, ↵Sven Gothel2015-08-1021-715/+2001
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | alwaysOnBottom and sticky/all-desktop (Part 1) Change also implements Bug 1186: 'NEWT Window: Use a Bitfield holding all state flags and expose it accordingly', since it is essential for an efficient implementation. Part 1: - Bug 1186 - Using Bitfield, holding public (Window) and private state bits/mask - Bug 1188 - Window adds: - [is|set]AlwaysOnBottom(..), - [is|set]Resizable(..), - [is|set]Sticky(..), - [is|set]Maximized(..), - isChildWindow(), - Full implementation for X11 - TODO: Implement for OSX and Windows - Manual tests: - TestGearsES2NEWT, TestGearsES2NEWTSimple and TestGearsES2NewtCanvasAWT utilize new NewtDemoListener, which has a key-listener to perform all [new] actions. See source code of NewtDemoListener.
* Bug 1183: Handle NULL return values for native RandR13 calls, which suppose ↵Sven Gothel2015-08-052-6/+13
| | | | | | | | | | | | | | to return 'int[]' Certain native RandR13 functions shall return 'int[]', but will bail out early in case of an error or lack of resources. The latter is true for getMonitorDeviceIds(..) where 'XRRScreenResources->ncrtc <= 0', causing return value NULL. This patch handles the NULL return values, however, the root cause of having 'XRRScreenResources->ncrtc <= 0' _occasionally_ lies within the Raspi X11 driver I am afraid?!
* Fix commit 24b646d387b3d85467bb22763b016a556d665707: Add missing semicolonSven Gothel2015-08-021-1/+1
|
* NEWT.WindowImpl: Adopt synchronized Bitfield for state flags (replacing 11 ↵Sven Gothel2015-08-024-100/+111
| | | | booleans)
* Adapt to GlueGen's Bitfield Changes (commit ↵Sven Gothel2015-08-022-4/+4
| | | | 047e9adaf2a5f51f7acfa194a744c99b6bfadaea)
* Use GlueGen's Bitfield instead of IntBitfieldSven Gothel2015-07-304-15/+15
|