Commit graph

220 commits

Author SHA1 Message Date
Frederik Carlier
8f0146f50d Update copyright headers
- Use GNU Lesser General Public License
- Streamline attributions in the form of "based on work by:"
- Streamline names of preprocessor variables
2023-10-01 23:01:55 +02:00
Frederik Carlier
e9c633abf7 Add font enumerator, font info, and other classes 2023-09-30 00:23:02 +02:00
Frederik Carlier
f56d4cfce2 Skaffold headless backend 2023-09-30 00:21:14 +02:00
Riccardo Canalicchio
a240d1b4d8 wayland cursor: capture and release methods 2021-12-22 07:50:34 +01:00
Riccardo Canalicchio
54b2b172d8 Wayland backend: cursor icon functions 2021-12-20 00:11:48 +01:00
Riccardo Canalicchio
5db58c071d Wayland backend: window ignoreMouse 2021-12-20 00:11:41 +01:00
Riccardo Canalicchio
00b7183f84 Wayland backend: cursor handlers 2021-12-20 00:11:32 +01:00
Riccardo Canalicchio
79be4acfba WaylandCairoShmSurface: fix memory leak, handling buffer release 2021-12-13 22:27:31 +01:00
Riccardo Canalicchio
317ca762a3 rename WaylandCairoShmSurface 2021-12-13 22:27:22 +01:00
Riccardo Canalicchio
96f07c13f7 Wayland server: remove attach calls from server, surface attach is delegated to cairo surface 2021-12-13 22:23:59 +01:00
Riccardo Canalicchio
91a1479193 Wayland server: code formatting
using clang-format from:
https://github.com/gnustep/libs-base/blob/master/.clang-format
2021-11-23 14:00:01 -05:00
Riccardo Canalicchio
5967015078 wayland backend: window move/resize 2021-11-06 08:09:26 -04:00
Riccardo Canalicchio
502dde25f5 wayland backend: surface roles based on window level 2021-11-06 08:07:44 -04:00
Riccardo Canalicchio
30ceacc90d wayland backend: refactor code, split into categories 2021-10-25 07:38:15 -04:00
Riccardo Canalicchio
7b87b268e3 wayland backend: layer shell 2021-10-25 03:13:35 -04:00
Riccardo Canalicchio
c6ce795898 wayland backend: delayed toplevel creation 2021-10-18 03:37:02 -04:00
Riccardo Mottola
c5990ed022 Fix return value of width to CGFloat 2020-06-18 00:55:50 +02:00
fredkiefer
e929b48e0b * Headers/fontconfig/FCFaceInfo.h: Add instancevariable _patternIsResolved.
* Source/fontconfig/FCFaceInfo.m (-matchedPattern): Cache the
resolved pattern and return this. The method characterSet now uses
this cached pattern.
Patch by Josh Freeman <gnustep_lists@twilightedge.com>
2020-06-10 18:24:51 +02:00
Ivan Vučica
c6e9ee857f
wayland: Support mouse middle click and smooth scroll wheel events. 2020-04-25 18:12:41 +01:00
Ivan Vučica
41b2d294ed
wayland: Checking whether the surface is configured before committing.
This now results in windows being painted on the screen. However, input is
still ending up in all the wrong places, and there is a lot of garbage content
being painted outside the actual windows.

Right clicking on a window seems to trigger rotate behavior, which needs to
be evaluated and likely removed (or prevented, if this is done by Weston).

Interestingly, checking for ->configured on first surface commit also seems to
break the backend.
2020-04-17 01:19:26 +01:00
Ivan Vučica
e8e615548a
wayland: Update license headers and copyright statement.
For contributions, we generally ask that copyright is assigned
to FSF. I believe this has been done by Sergio.
2020-04-15 00:19:53 +01:00
Ladislav Michl
c1cce2ad67 wayland: WIP 2020-04-15 00:00:40 +01:00
Ladislav Michl
05f362d528 wayland: Add wayland integration and use stable protocol.
non functional, all changes just make it compile again. Configure changes
by Ivan Vučica.
2020-04-15 00:00:40 +01:00
Sergio L. Pascual
81456203b2 Dirty Wayland backend implementation. 2020-04-15 00:00:40 +01:00
Sergii Stoian
db1079b5e3 * Headers/x11/XGServer.h,
* Source/x11/XGServer.m (xScreenSize): new primitive method.

* Source/x11/XGDragView.m (XY): use new primitive method to get Xlib
  screen height. Fixes broken DnD on vertically aligned monitors.
2020-03-03 01:59:04 +02:00
Sergii Stoian
2a0e305a4f * Headers/x11/XGServerWindow.h (_gswindow_device_t): new structure
memeber was added - `osframe`. This member intended to hold cached frame
  of windows in OpenStep coordinate system. This makes backend more
  reliable to the cases when gui changes NSWindow's _frame ivar before
  call to backend methods which make windows placement.

* Source/x11/XGServerWindow.m (placewindow::): use `osframe` structure
  member to decide if window change position or size. Removed usage of
  temporary `frame` (used only for making desicion).
2020-02-26 01:53:01 +02:00
Sergii Stoian
638940fb28 * Headers/x11/XGServer.h (GSDisplayServer): added new ivar xScreenSize
to hold Xlib screen size dimensions.

* Source/x11/XGServerWindow.m: 
  (_OSFrameToXFrame:for:): use xScreenSize instead of DisplayHeight.
  (_OSFrameToXHints:for:): ditto.
  (_XFrameToOSFrame:for:): ditto.
  (movewindow::): ditto.
  (_screenSize): new static function to get dimensions of Xlib screen from
  root window.
  (screenList): use xScreenSize instead of DisplayHeight/DisplayWidth.
2020-02-20 19:13:06 +02:00
Sergii Stoian
c1ab242c9e * gswindow_device_t structure element screen was renamed to
`screen_id`; `monitor_id` element was added. Made use of
  `screen_id` and `monitor_id` where it's appropriate.

* Removed `screen` parameter from methods which contains it in name.
  Methods were renamed to remove `Screen` and `FromScreen`.

* Source/x11/XGServerWindow.m (screenList): change with assumption
  that Xlib screen is one per application.
  Failback code to RandR-related always creates arrays with one element
  (no enumeration needed). Create `monitor` structure in failback (non-RandR)
  code. Use `screen_id` MonitorDevice structure element to hold	Xlib screen
  ID.
  (windowDepthForScreen:): assume that `screen` parameter is a Xlib screen ID,
  simplify code - `screen` will be used with RandR or not.
  (availableDepthsForScreen:): changed with assumption that `screen` is a index
  of element in `monitors` structure.

* Source/x11/XGServer.m (_initXContext): initialize `monitors` array
  early here before first use (calls to XGServerWindow methods).
2020-02-03 01:21:52 +02:00
Sergii Stoian
62bef72ac0 * Headers/x11/XGServer.h: monitorsCount ivar was added to hold
`monitors` array items.
* Source/x11/XGServerWindow.m: use `monitorsCount` instead of local
  variable `count` or ScreenCount() value.
* ChangeLog: update to the latest changes.
Mark methods where usage of X Screen as parameter is correct and where isn't.
2020-01-30 01:27:11 +02:00
Sergii Stoian
7ebd2468b1 * Headers/x11/XGServer.h,
* Source/x11/XGServer.m,
* Source/x11/XGServerWindow.m: hold the cache of connected monitor devices
  parameters - `monitors` - a an array structures.
2020-01-29 19:23:52 +02:00
Sergii Stoian
6947c49951 * Headers/x11/XGServer.h: split RandR variables defintion into separate
lines.
2020-01-28 11:52:24 +02:00
Sergii Stoian
64335397b5 * Headers/x11/XGServer.h (GSDisplayServer): RandR event and error base
ivars were added.
* Source/x11/XGServer.m (_initXContext): get RandR event and error base.
* Source/x11/XGServerEvent.m (processEvent:): pack several RandR events
  into one notification post.
2020-01-23 19:03:34 +02:00
Fred Kiefer
8691c48537
Merge pull request #5 from Deek/deek
Font system revamp
2019-05-19 18:06:46 +02:00
Sergii Stoian
b492ac87cd Added support for WindowMaker's WMFHideApplication action. 2019-04-05 14:46:05 +03:00
Sergii Stoian
233c129a5c WM_IGNORE_FOCUS_EVENTS atom was added. Use new atom in orderwindow::: code added in last commit. 2019-04-03 19:13:30 +03:00
Jeff Teunissen
016f5eda25 Cairo: Reduce the hilarity of the font panel
Use many more weights and widths when generating the (still extremely
stupid) synthetic PostScript font names.
2019-03-26 03:58:18 -04:00
fredkiefer
b9e9f461ab Restructure Atom handling to get all atoms at once.
Add new method on XGServer to get the name of the window manager.
2018-05-01 23:08:35 +02:00
fredkiefer
1a15d0393e Replace xlib specific font enumerator with the shared one for fontconfig.
Add glyph cache for GSXftFontInfo.
2018-02-05 20:50:48 +01:00
Daniel Ferreira
720a56dcf3 opal/context: allow the client to supply a graphics port
In Quartz, the "graphics port" bound to an NSGraphicsContext (subclassed
by OpalContext) is a CGContext. We currently initialize one in
OpalSurface if it does not exist, however we do not allow the client to
initialize a graphics context with a custom graphics port, which should
be allowed. This commit enables this feature.
2017-07-25 11:59:52 +10:00
Fred Kiefer
9f84d3e7fc * Headers/x11/XGGeneric.h: Remove obsolte atom.
* Source/x11/XGServerWindow.m: Clean up code.
	* Source/x11/XGServerWindow.m (-setwindowlevel::): Try to set
	better level for tool tip windows.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@40295 72102866-910b-0410-8b05-ffd578937521
2017-01-17 22:01:52 +00:00
Ivan Vučica
a4a2d8dcd3 Partially applying r39615 from testplant branch to fix a build error on MinGW.
Patch by Seong-Gu Lee <sgleehd@gmail.com>.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@39707 72102866-910b-0410-8b05-ffd578937521
2016-04-28 22:32:38 +00:00
Richard Frith-MacDonald
f1dac4e9b7 tweak for compilation on 64bit by sgleehd@gmail.com
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@39431 72102866-910b-0410-8b05-ffd578937521
2016-03-01 08:27:40 +00:00
Riccardo Mottola
cc7fa76c5e Enable Sync only on explicit presence of sync.h, not just Xext.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@39198 72102866-910b-0410-8b05-ffd578937521
2015-11-24 23:47:25 +00:00
Fred Kiefer
0f3d255824 * Headers/gsc/GSGState.h
* Source/gsc/GSContext.m
        * Source/gsc/GSGState.m
        * Source/cairo/CairoGState.m
        Implement per gstate methods for antialias, patternPhase and
        compositingOperation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@39026 72102866-910b-0410-8b05-ffd578937521
2015-10-03 21:49:35 +00:00
Sebastian Reitenbach
23b53d84c0 * Source/cairo/CairoGState.m
abs -> fabs
        * Source/x11/XGGLContext.m
          format string fix
        * Headers/x11/XGOpenGL.h
          glxminorversion is int, not long int

Looks good, Ivan Vucica



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@38554 72102866-910b-0410-8b05-ffd578937521
2015-05-26 12:00:49 +00:00
Fred Kiefer
59723d8e42 * Headers/x11/XGGeneric.h
* Source/x11/XGServerWindow.m: Correct name for atom
        net_wm_state_modal_atom. Use this atom to try to set the sate
        for dialog windows to modal.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@38417 72102866-910b-0410-8b05-ffd578937521
2015-03-21 18:53:46 +00:00
Fred Kiefer
c5ef196157 * Headers/opal/OpalSurface.h
* Source/opal/OpalSurface.m: Make the -device method public.
        * Headers/opal/OpalContext.h: Remove method definitions.
        * Source/opal/OpalContext.m: Limit the accepted image types.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37172 72102866-910b-0410-8b05-ffd578937521
2013-09-29 20:11:38 +00:00
Fred Kiefer
1c35214821 * Headers/opal/OpalSurface.h
* Source/opal/OpalSurface.m: Remove compiler warnings.
        * Source/opal/OpalContext.m: Move -flushGraphics method to here.
        * Source/opal/OpalGState.m: Simplify -DPSimage. Evaluate CGCTX
        only once per method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37170 72102866-910b-0410-8b05-ffd578937521
2013-09-29 17:10:26 +00:00
Fred Kiefer
78b3ef9b31 Started cleanup of opal backend.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37167 72102866-910b-0410-8b05-ffd578937521
2013-09-29 07:30:20 +00:00
Ivan Vučica
595cc19471 Fixes for doublebuffering. (Nearly?) correct implementation of -compositeGState: and -drawGState:. Temporarily fixed image drawing issues by lying about drawing to screen.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37142 72102866-910b-0410-8b05-ffd578937521
2013-09-23 18:04:06 +00:00