c1cc476094
source/Platform/Win32/Win32Display.cpp: Tab indentation fix.
2023-02-18 14:03:14 +01:00
869b41c38a
source/Platform/Unix/UnixMisc.cpp: tab indentation fix.
2023-02-18 13:08:03 +01:00
9c4c6152c9
source/Platform/Win32/Win32Display.cpp: Whitespace fix.
2022-10-08 17:29:27 +02:00
0a5eb397c7
Platform/Unix/X11Display: Adding stub for enterFullscreen and exitFullscreen
2022-10-02 23:31:46 +02:00
84f0a83bee
source/Platform/Unix/X11Display.cpp: Whitespace fix.
2022-10-02 17:11:27 +02:00
605e0df902
source/Platform/Unix/X11Display.cpp: call setDecoration() in create()
2022-10-02 17:07:14 +02:00
36c6024649
Platform/Unix/X11Display: remove setIcon(const std::string&) as this exists in Generic Display class.
2022-10-02 17:06:02 +02:00
a8fa3981f4
source/Platform/Unix/Xlib.cpp: assert _priv::display in shutdown()
2022-10-02 17:02:10 +02:00
b78ddba11e
Platform/Unix/X11Display: implement setDecoration()
2022-10-02 17:01:40 +02:00
c20c79cfd3
Adding source/Platform/Unix/wm_hints.h
2022-10-02 17:00:45 +02:00
1c7cc31b52
source/Platform/Unix/X11Display.cpp: Fix getPosition() as it did not take border width into account.
2022-10-01 16:09:43 +02:00
46bc8eb5d8
Platform/Unix/Xlib: Adding getParentWindow()
2022-10-01 16:09:43 +02:00
f2fc9d46b8
Revert "include/Spectre/Display/DisplayDescription.h: change Empty to None"
...
This reverts commit 7c23f5dfd9 .
`None` is defined in X11.
2022-10-01 16:09:42 +02:00
3a7f91cb07
Merge branch 'fullscreen-api-nonrecreate' into dev
2022-09-13 20:39:02 +02:00
7c23f5dfd9
include/Spectre/Display/DisplayDescription.h: change Empty to None
2022-09-13 19:43:26 +02:00
3c6a842c9d
Platform/Win32/Win32Display.cpp: remove fullscreen stuff in create()
2022-09-12 22:44:51 +02:00
c7d380c4b0
source/Platform/PlatformApplication: rename create() to get() and just return a statically allocated implementation.
...
As we just this throughout the whole program. and platform can be determined at compile time. we might as well allocate it statically.
2022-09-12 21:12:32 +02:00
9621ea19bb
source/Platform/Win32/Win32Display.cpp: on x64, windows headers undefine GWL_USERDATA, So we define it again.
2022-09-10 14:02:58 +02:00
8d57b3a72c
source/Platform/Win32/Win32Display.cpp: Use SetWindowLongPtr/GetWindowLongPtr as LONG_PTR supports 64bit addresses.
2022-09-10 13:59:40 +02:00
46af40bbb7
source/Platform/PlatformApplication.h: extend NonCopyable
2020-12-29 19:54:49 +01:00
b984f30968
Platform/Win32/Win32Display.cpp: for WM_SIZE event we can use lParam variable to get the size.
2020-12-29 17:45:32 +01:00
d48cc650a8
source/Platform/PlatformApplication.cpp: ApplicationType is defined by some Win32 headers.
2020-12-28 18:41:51 +01:00
845b93fb48
source/Platform/Win32/Win32Display.cpp: DisplayDecorate::None has changed to DisplayDecorate::Empty
2020-12-28 18:38:27 +01:00
f6aa0246d3
source/Platform/Unix/X11Mouse.cpp: implement hack for XButton1 and 2.
2020-12-28 18:20:55 +01:00
c082700891
include/Spectre/Input/Mouse.h rename Button1,Button2 to XButton1 and XButton2
...
Button1 and Button2 are defined by Xlib. So lets change our ones to avoid headache.
2020-12-28 18:20:55 +01:00
81c7e34c58
Use SPECTRE_PLATFORM_* defines instead of raw compiler ones.
2020-12-26 17:25:25 +01:00
b91b9f3768
Platform/PlatformApplication: adding create() method.
2020-12-26 17:20:05 +01:00
090646b61a
Platform/Unix: Rename X11SharedDisplay to Xlib, and remove Display member variable from all classes.
...
We now initialize/destroy the display in Xlib::init/shutdown that is called in UnixApplication::init/shutdown and
therefore is valid through the whole lifetime. So no need for classes to keep references.
2020-12-26 15:37:56 +01:00
197b4df87f
Unix: Remove unnecessary includes of Spectre/Display/DisplayDescription.h
2020-12-23 14:36:52 +01:00
080c4f77c3
Platform/Unix/X11Keyboard: only update state and signal key down if we have a focused window.
2020-12-20 16:29:12 +01:00
6c96a3d9a1
Platform/Unix/X11Mouse.cpp: in isButtonDown() check if we have a focused window.
2020-12-20 16:28:25 +01:00
f71cfa86f2
Platform/Unix/X11Mouse: use X11Display::getFocused() to get the coordinates relative to the focused window.
2020-12-20 16:09:16 +01:00
227d58725d
Platform/Unix/X11Display.cpp: Set and unset focused_display variable when the display receives FocusIn/Out events.
2020-12-20 16:03:05 +01:00
d9f54b08ca
Platform/Unix/X11Display: Adding getFocused()
2020-12-20 16:01:37 +01:00
d971cd6cb2
Platform/Unix/X11Display.cpp: Capture input focus events (just log for now).
2020-12-20 13:55:56 +01:00
56c24f7118
Platform/Unix/X11Display: Implement missing interface functions.
...
* getPosition
* setVisible
* minimize
* maximize
* grabCursor (only stub. to get the code to compile)
2020-12-20 13:43:35 +01:00
40e4f95452
Platform/Unix/X11Display.cpp: minor stuff.
2020-12-19 18:55:12 +01:00
0c76864b40
Platform/Unix/X11Display: in setSize() check if width or height is zero before calling XResizeWindow()
2020-12-19 18:55:12 +01:00
50439a58bd
source/Platform/Unix/X11Display.cpp: in destroy() make sure m_disp is valid before calling functions that needs it.
2020-12-19 18:55:12 +01:00
0d029817fe
source/Platform/Unix/X11Display.cpp: in destroy() call XDestroyWindow()
2020-12-19 18:55:12 +01:00
61b233f708
Platform/Unix/X11Display.cpp: Minor cleanup.
2020-12-19 18:55:12 +01:00
f5d80aa46f
Platform/Unix/X11Display: Implement setIcon()
2020-12-19 18:55:12 +01:00
3d9dda64ca
Platform/Unix/X11Display: Implement showCursor()
2020-12-19 18:55:12 +01:00
d73c787f40
Platform/Unix/X11SharedDisplay: pass a pointer to the display to XReleaseDisplay() just to be sure client code has a valid pointer
2020-12-19 18:55:11 +01:00
dfe29acc1e
Platform/Unix/UnixMisc.cpp: implement display mode lookups using xrandr extension.
2020-12-19 18:55:11 +01:00
03186ebea0
Platform/Unix/X11EventQueue.cpp: pass ButtonPress/ButtonRelease/MotionNotify events to X11Mouse
2020-12-19 18:55:11 +01:00
816cf3a072
Platform/Unix/X11Mouse: adding a basic implementation to get things going.
2020-12-19 18:55:11 +01:00
cfe064f02c
Platform/Unix/X11Keyboard: implement isKeyDown()
2020-12-19 18:55:11 +01:00
7356bdebdd
Platform/Unix/X11EventQueue: Fix bug where messeges where not flushed to the event queue.
...
XEventsQueued(disp, QueuedAlready) only returns the number of events currently in the queue and
does not flush new events. So this must happen elsewhere and if it does not we
will never see any events. i noticed this bug when removing the call to glXSwapBuffers().
Fix this by using XPending() instead as this flushes new events
if the queue is empty before returning the length.
see https://tronche.com/gui/x/xlib/event-handling/XEventsQueued.html
and https://tronche.com/gui/x/xlib/event-handling/XPending.html
2020-12-19 18:55:11 +01:00
4193b3b719
Platform/Unix/X11EventQueue: send KeyPress and KeyRelease events to X11Keyboard::handleMessage()
2020-12-19 18:55:11 +01:00