Compare commits

..

8 commits

Author SHA1 Message Date
rfm
e59d923e90 New release
Some checks failed
/ ci (push) Has been cancelled
2025-02-11 18:52:08 +00:00
Fred Kiefer
e63ad3c1d2 Update news.texi for upcoming release
Some checks are pending
/ ci (push) Waiting to run
2025-02-10 22:40:35 +01:00
rfm
b9038250e6 Fix use of deallocated memory 2024-12-31 08:42:22 +00:00
Frederik Carlier
03a2e7e152
Enable default interpolation due to pixelated screen drawing (#53)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@40163 72102866-910b-0410-8b05-ffd578937521

Co-authored-by: Marcian Lytwyn <gna@advcsi.com>
2024-11-05 18:30:47 +01:00
Riccardo
4e3ca27c0b
instead of just getting Latin1 we practically see getting 2 or 3 bytes (even for characters that representable in Latin1) so try our best to interpret them (#50) 2024-09-19 08:32:46 +02:00
Frederik Carlier
ba1c582024
Define WINBOOL on non-MinGW platforms (#52)
The Windows SDK declares BOOL as an int.  Objective C defines BOOl as a char.
Those two types clash.  MinGW's implementation of the Windows SDK uses the WINBOOL
type to avoid this clash.  When compiling natively on Windows, we need to manually
define WINBOOL.
MinGW will define _DEF_WINBOOL_ if it has defined WINBOOL so we can use the same trick
here.
See https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-headers/include/ntdef.h#L355
2024-09-17 21:19:25 +02:00
Frederik Carlier
6e05e1e65e
Support building natively on Windows (#51)
When building for Windows using a native toolchain (i.e. not MinGW or MSYS), `<unistd.h>` is not available.  Include `<io.h>` instead and define `strcasecmp`.
2024-09-14 00:23:01 +02:00
Joe Maloney
d27af6af10
Fix build errors with Wayland on Debian 13 (trixie) using Clang 16 (#48)
* Solve an undelcared close function

* Fix xdgshell protocol handling and resolve compile errors

* Fixing build errors in WaylandServer+Cursor

* Revert changes except wl_cursor_destroy to fix build and avoid regressions

* Fix selector warnings and method call type issues

* Use window parameter directly

* Comments removed

* Include NSGraphics to eliminate redundant declaration.

* Remove NSWindow include that was replaced by NSGraphics
2024-08-28 23:03:03 +02:00
18 changed files with 216 additions and 122 deletions

View file

@ -1,7 +1,7 @@
1 Announcement
**************
This is version 0.31.0 of the GNUstep GUI Backend (gnustep-back).
This is version 0.32.0 of the GNUstep GUI Backend (gnustep-back).
1.1 What is the GNUstep GUI Backend?
====================================
@ -17,30 +17,30 @@ system without any changes to the application, and the library can be
easily ported to other display systems.
The GNUstep GUI Backend is for platforms using the X-Window System or
Windows Systems. It works via a DPS emulation engine to emulate the
Window's Systems. It works via a DPS emulation engine to emulate the
DPS functions required by the front-end system.
1.2 Noteworthy changes in version 0.31.0
1.2 Noteworthy changes in version 0.32.0
==========================================
The release includes mostly improvements for pasteboard handling and a
few bug fixes.
The release includes mostly bug fixes.
• Improve font name creation.
• Add headless backend.
• Add CI pipeline.
• Make window termination saver.
• Use default interpolation in Cairo.
• Allow UTF-8 input from XLookupString.
• Improve building on MS Windows.
1.3 Where can you get it? How can you compile it?
=================================================
The gnustep-back-0.31.0.tar.gz distribution file has been placed at
The gnustep-back-0.32.0.tar.gz distribution file has been placed at
<ftp://ftp.gnustep.org/pub/gnustep/core>.
It is accompanied by gnustep-back-0.31.0.tar.gz.sig, a PGP signature
It is accompanied by gnustep-back-0.32.0.tar.gz.sig, a PGP signature
which you can validate by putting both files in the same directory and
using:
gpg --verify gnustep-back-0.31.0.tar.gz.sig
gpg --verify gnustep-back-0.32.0.tar.gz.sig
Signature has been created using the key with the following
fingerprint:

View file

@ -1,3 +1,12 @@
2025-02-11 Richard Frith-Macdonald <rfm@gnu.org>
* ANNOUNCE:
* INSTALL:
* NEWS:
* README:
* Version: bump to 0.32.0
New release
2024-05-26 Fred Kiefer <FredKiefer@gmx.de>
* ChangeLog: Update for new release

View file

@ -7,6 +7,19 @@
@include version.texi
@end ifset
@section Noteworthy changes in version @samp{0.32.0}
The release includes mostly bug fixes.
@itemize @bullet
@item Make window termination saver.
@item Use default interpolation in Cairo.
@item Allow UTF-8 input from XLookupString.
@item Improve building on MS Windows.
@end itemize
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{0.31.0}
The release includes mostly improvements for pasteboard handling and a few bug fixes.
@ -17,7 +30,6 @@ The release includes mostly improvements for pasteboard handling and a few bug f
@item Add CI pipeline.
@end itemize
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{0.30.0}

12
INSTALL
View file

@ -5,7 +5,7 @@
================
This file documents the installation of the GNUstep Backend Library,
'gnustep-back'. If you are installing this package as part of the
gnustep-back. If you are installing this package as part of the
GNUstep core package, read the file GNUstep-HOWTO for more complete
instructions on how to install the entire GNUstep package (including
this library). GNUstep-HOWTO is located at <http://www.gnustep.org>
@ -15,9 +15,9 @@ this library). GNUstep-HOWTO is located at <http://www.gnustep.org>
1.2 Configuration
=================
Configuration is performed by running the 'configure' program at a shell
Configuration is performed by running the configure program at a shell
prompt. You may want to use some of the optional arguments to the
'configure' program. Type 'configure --help' for a list. GNUstep
configure program. Type configure --help for a list. GNUstep
specific options are at the end of this list (if any).
The backend comes with several different window server and graphics
@ -27,7 +27,7 @@ choose the art graphical drawing implementation, run
configure --enable-graphics=art
Type 'configure --help' for a list of graphical drawing
Type configure --help for a list of graphical drawing
implementations.
You can also change the name of the backend when configuring it.
@ -52,8 +52,8 @@ program:
To compile this library, type make. After this is complete, type make
install (make sure you are the root user). Some additional options you
can use with make are 'debug=yes' to make a debugging version of the
library and 'shared=no' to make a static version of the library. See
can use with make are debug=yes to make a debugging version of the
library and shared=no to make a static version of the library. See
the gstep-make package for more information on these options.
1.4 Installing

118
NEWS
View file

@ -1,7 +1,17 @@
1 NEWS
******
1.1 Noteworthy changes in version 0.31.0
1.1 Noteworthy changes in version 0.32.0
==========================================
The release includes mostly bug fixes.
• Make window termination saver.
• Use default interpolation in Cairo.
• Allow UTF-8 input from XLookupString.
• Improve building on MS Windows.
1.2 Noteworthy changes in version 0.31.0
==========================================
The release includes mostly improvements for pasteboard handling and a
@ -11,18 +21,18 @@ few bug fixes.
• Add headless backend.
• Add CI pipeline.
1.2 Noteworthy changes in version 0.30.0
1.3 Noteworthy changes in version 0.30.0
==========================================
The release includes mostly improvements for the new Wayland backend and
a few bug fixes.
• Improvements for the wayland backend.
• Dont use font hinting for cauro, when using scaling.
• Don't use font hinting for cauro, when using scaling.
• Fix pasteboard transfer of huge data by deleting property on begin
and at every Notify.
1.3 Noteworthy changes in version 0.29.0
1.4 Noteworthy changes in version 0.29.0
==========================================
The release includes an alpha version of the wayland backend and a few
@ -37,7 +47,7 @@ bug fixes.
SetWindowLongPtr in place of GetWindowLong and SetWindowLong
for win32 and cairo for various win64 fixes.
1.4 Noteworthy changes in version 0.28.0
1.5 Noteworthy changes in version 0.28.0
==========================================
This release includes a few bugfixes and a huge rework of multi monitor
@ -50,7 +60,7 @@ handling.
• art: Remove ftfont-old.m.
• Use Xrandr for multi monitor support.
1.5 Noteworthy changes in version 0.27.0
1.6 Noteworthy changes in version 0.27.0
==========================================
This release includes a few bugfixes.
@ -61,21 +71,21 @@ This release includes a few bugfixes.
• x11: Better handling of atoms. Method to get the window manager.
• opal: Improve colour handling
1.6 Noteworthy changes in version 0.26.2
1.7 Noteworthy changes in version 0.26.2
==========================================
This release contains no changes since 0.26.1. It is released to
coincide with gnustep-gui 0.26.2, which has important bugfixes related
to printing.
1.7 Noteworthy changes in version 0.26.1
1.8 Noteworthy changes in version 0.26.1
==========================================
This release contains no changes since 0.26.0. It is released to
coincide with gnustep-gui 0.26.1, released to mark gnustep-base 1.25.1
as the requirement for gnustep-gui.
1.8 Noteworthy changes in version 0.26.0
1.9 Noteworthy changes in version 0.26.0
==========================================
This release includes a few bugfixes, as well as compatibility
@ -88,12 +98,12 @@ improvements as a result of GSoC 2017 project.
port, other than a CGContext.
• misc: Fix reported static analyser warnings.
1.9 Noteworthy changes in version 0.25.1
==========================================
1.10 Noteworthy changes in version 0.25.1
===========================================
Small fixes and cleanups.
1.10 Noteworthy changes in version 0.25.0
1.11 Noteworthy changes in version 0.25.0
===========================================
Support for pattern phase, compositing operation, image interpolation
@ -105,28 +115,28 @@ and antialiasing per gstate.
Various fixes.
1.11 Noteworthy changes in version 0.24.1
1.12 Noteworthy changes in version 0.24.1
===========================================
Improvements in win32 display and mouse tracking.
Various minor bugfixes and cleanups.
1.12 Noteworthy changes in version 0.24.0
1.13 Noteworthy changes in version 0.24.0
===========================================
Added experimental Opal backend.
Allow for ARGB visual for OpenGL.
1.13 Noteworthy changes in version 0.23.0
1.14 Noteworthy changes in version 0.23.0
===========================================
Added cairo support for ms-windows.
Updated for NSInteger/CGFloat support
1.14 Noteworthy changes in version 0.22.0
1.15 Noteworthy changes in version 0.22.0
===========================================
Added new user defaults to make app icons and mini windows sticky
@ -135,7 +145,7 @@ Added new user defaults to make app icons and mini windows sticky
Many improvements to Cairo rendering, including buffering, glyphs and
DPI scaling.
1.15 Noteworthy changes in version 0.20.0
1.16 Noteworthy changes in version 0.20.0
===========================================
Cairo is now the default backend, but falls back to art and xlib
@ -145,37 +155,37 @@ gracefully.
More Windows improvements.
1.16 Noteworthy changes in version 0.19.0
1.17 Noteworthy changes in version 0.19.0
===========================================
This is an (unstable) copy of the 0.18.0 release
1.17 Noteworthy changes in version 0.18.0
1.18 Noteworthy changes in version 0.18.0
===========================================
Many Windows improvements
Implement pattern colours for all backends.
1.18 Noteworthy changes in version 0.17.1
1.19 Noteworthy changes in version 0.17.1
===========================================
Use DejaVu as another fallback font.
1.19 Noteworthy changes in version 0.17.0
1.20 Noteworthy changes in version 0.17.0
===========================================
Key repeat support implemented in X11.
OpenGL fixes and improvements.
1.20 Noteworthy changes in version 0.16.0
1.21 Noteworthy changes in version 0.16.0
===========================================
Transparent windows implemented in WIN32 backend, better position and
scaling of images. General cleanup of code.
1.21 Noteworthy changes in version 0.14.0
1.22 Noteworthy changes in version 0.14.0
===========================================
Added code to automatically make any window which uses the
@ -183,7 +193,7 @@ NSDesktopWindowLevel also be omnipresent.
Many glyph drawing improvements.
1.22 Noteworthy changes in version 0.13.2
1.23 Noteworthy changes in version 0.13.2
===========================================
Added basic implementation of window levels on Windows. In general a
@ -197,24 +207,24 @@ bunch of improvements in the Windows backend.
frontend. This version or greater of the backend needs to be used with
gui 0.13.2
1.23 Noteworthy changes in version 0.13.1
1.24 Noteworthy changes in version 0.13.1
===========================================
Minor improvements.
1.24 Noteworthy changes in version 0.13.0
1.25 Noteworthy changes in version 0.13.0
===========================================
Many improvements to the cairo backend. Add DPSshfill for all backends.
Better handling of X event times.
1.25 Noteworthy changes in version 0.12.0
1.26 Noteworthy changes in version 0.12.0
===========================================
Big improvements to the cairo graphics and Window backend. Also better
support for OpenGL.
1.26 Noteworthy changes in version 0.11.0
1.27 Noteworthy changes in version 0.11.0
===========================================
Bugfixes to art and xlib.
@ -222,17 +232,17 @@ Bugfixes to art and xlib.
There was some work on the Windows backend for the GDI interface by
Christopher Armstrong.
1.27 Noteworthy changes in version 0.10.3
1.28 Noteworthy changes in version 0.10.3
===========================================
Fixes. A lot of Cairo backend work.
1.28 Noteworthy changes in version 0.10.2
1.29 Noteworthy changes in version 0.10.2
===========================================
The Backend can set UTF8 window titles where this is allowed.
1.29 Noteworthy changes in version 0.10.1
1.30 Noteworthy changes in version 0.10.1
===========================================
The art graphics module is the default now. As was previously the case,
@ -249,7 +259,7 @@ Cairo library before it will work with GNUstep. Due to this, this
module is still considered beta. Ask on the mailing lists for help with
this.
1.30 Noteworthy changes in version 0.10.0
1.31 Noteworthy changes in version 0.10.0
===========================================
The installed name of the backend now includes an interface version
@ -259,14 +269,14 @@ number. This avoids the potential version mismatch between the frontend
• Alpha blending was implemented for Windows, although it does not
seem to work on some machines.
1.31 Noteworthy changes in version 0.9.5
1.32 Noteworthy changes in version 0.9.5
==========================================
• Added support for window alpha on X servers.
• Add support for old and new freetype libs.
• Some improvements to the Windows backend.
1.32 Noteworthy changes in version 0.9.4
1.33 Noteworthy changes in version 0.9.4
==========================================
• Fast drawing on 8 bit displays was added (although it might only
@ -277,7 +287,7 @@ number. This avoids the potential version mismatch between the frontend
• art backend supports reading from a window.
• Add internal window decoration handling.
1.33 Noteworthy changes in version 0.9.3
1.34 Noteworthy changes in version 0.9.3
==========================================
• A number of W32 window event enhancements
@ -285,7 +295,7 @@ number. This avoids the potential version mismatch between the frontend
• libwraster is no longer checked for - image functions now in
frontend
1.34 Noteworthy changes in version 0.9.2
1.35 Noteworthy changes in version 0.9.2
==========================================
• Art backend added support for grayscale, one-isblack colorspaces.
@ -293,25 +303,25 @@ number. This avoids the potential version mismatch between the frontend
• Better focus handling on Windows.
• Better font and draw handling on Windows.
1.35 Noteworthy changes in version 0.9.1
1.36 Noteworthy changes in version 0.9.1
==========================================
Color on 8 bit displays works correctly now. WindowMaker properties are
always set now in case another manager is emulating WindowMaker styles.
1.36 Noteworthy changes in version 0.9.0
1.37 Noteworthy changes in version 0.9.0
==========================================
Some more improvements to copy/paste support following ICCCM
specifications (like COMPOUND_TEXT support).
1.37 Noteworthy changes in version 0.8.9
1.38 Noteworthy changes in version 0.8.9
==========================================
• Much improved pasting support between X apps and GNUstep apps.
• Backend headers are no longer installed (now private).
1.38 Noteworthy changes in version 0.8.8
1.39 Noteworthy changes in version 0.8.8
==========================================
Full multi-byte/unicode support for East Asian languages was added to
@ -322,57 +332,57 @@ to Kazunobu Kuriyama.
• Also added slightly better EWMH support.
• Art backend works with more versions of freetype.
1.39 Noteworthy changes in version 0.8.7
1.40 Noteworthy changes in version 0.8.7
==========================================
Handle NSBezierPath glyph drawing in art backend. art backend compiles
with all freetype except 2.1.3 via ifdefs.
1.40 Noteworthy changes in version 0.8.6
1.41 Noteworthy changes in version 0.8.6
==========================================
Bug fixes. See the gnustep-gui NEWS for changes.
1.41 Noteworthy changes in version 0.8.5
1.42 Noteworthy changes in version 0.8.5
==========================================
Text system improvements. See the gnustep-gui NEWS for changes.
1.42 Noteworthy changes in version 0.8.3
1.43 Noteworthy changes in version 0.8.3
==========================================
See the gnustep-gui NEWS for changes.
1.43 Noteworthy changes in version 0.8.2
1.44 Noteworthy changes in version 0.8.2
==========================================
Improved font handling in art backend. Improved compositing with
transformations and clipping in art backend.
1.44 Noteworthy changes in version 0.8.1
1.45 Noteworthy changes in version 0.8.1
==========================================
art (libart-based) backend added. Use ./configure enable-graphics=art
art (libart-based) backend added. Use ./configure -enable-graphics=art
to choose this backend.
1.45 Noteworthy changes in version 0.8.0
1.46 Noteworthy changes in version 0.8.0
==========================================
Bug fixes.
1.46 Noteworthy changes in version 0.7.9
1.47 Noteworthy changes in version 0.7.9
==========================================
Bug fixes.
1.47 Noteworthy changes in version 0.7.8
1.48 Noteworthy changes in version 0.7.8
==========================================
Simplified backend selection using enable-server and enable-graphics.
Add with-library-flags and with-include-flags for adding additonal
flags. Set name with with-name
Simplified backend selection using -enable-server and -enable-graphics.
Add -with-library-flags and -with-include-flags for adding additonal
flags. Set name with -with-name
1.48 Noteworthy changes in version 0.7.7
1.49 Noteworthy changes in version 0.7.7
==========================================
First release. Most components extracted from xgps. The old backends,

10
README
View file

@ -1,23 +1,23 @@
1 README
********
This is version 0.29.0 of the GNUstep GUI Backend ('gnustep-back').
This is version 0.32.0 of the GNUstep GUI Backend (gnustep-back).
Here is some introductory info to get you started:
1.1 Initial reading
===================
* The file 'ANNOUNCE' contains a very brief overview of the library.
• The file ANNOUNCE contains a very brief overview of the library.
It also tells you where to get the most recent version.
* The file 'NEWS' has the library's feature history.
• The file NEWS has the library's feature history.
* The file 'INSTALL' gives instructions for installing the library.
• The file INSTALL gives instructions for installing the library.
1.2 How can you help?
=====================
* Give us feedback! Tell us what you like; tell us what you think
Give us feedback! Tell us what you like; tell us what you think
could be better. Send us bug reports at <bug-gnustep@gnu.org>.

View file

@ -105,6 +105,16 @@
return YES;
}
- (id) initWithContextInfo: (NSDictionary *)info
{
self = [super initWithContextInfo: info];
if (self)
{
[self setImageInterpolation: NSImageInterpolationDefault];
}
return self;
}
- (BOOL) isDrawingToScreen
{
CairoSurface *surface = nil;

View file

@ -38,6 +38,8 @@
#include <linux/input.h>
#include "wayland-cursor.h"
extern void wl_cursor_destroy(struct wl_cursor *cursor);
// XXX should this be configurable by the user?
#define DOUBLECLICK_DELAY 300
#define DOUBLECLICK_MOVE_THREASHOLD 3
@ -852,4 +854,4 @@ WaylandServer (Cursor)
wlconfig->mouse_scroll_multiplier = 1.0f;
}
}
@end
@end

View file

@ -31,6 +31,7 @@
#include <linux/input.h>
#include <AppKit/NSText.h>
#include <sys/mman.h>
#include <unistd.h>
static void
keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,

View file

@ -28,10 +28,11 @@
#include "wayland/WaylandServer.h"
#include <AppKit/NSEvent.h>
#include <AppKit/NSApplication.h>
#include <AppKit/NSGraphics.h>
static void
xdg_surface_on_configure(void *data, struct xdg_surface *xdg_surface,
uint32_t serial)
uint32_t serial)
{
struct window *window = data;
@ -43,7 +44,6 @@ xdg_surface_on_configure(void *data, struct xdg_surface *xdg_surface,
free(window);
return;
}
WaylandConfig *wlconfig = window->wlconfig;
NSEvent *ev = nil;
NSWindow *nswindow = GSWindowWithNumber(window->window_id);
@ -57,22 +57,22 @@ xdg_surface_on_configure(void *data, struct xdg_surface *xdg_surface,
if (window->buffer_needs_attach)
{
[window->instance flushwindowrect:NSMakeRect(window->pos_x, window->pos_y,
window->width, window->height
):window->window_id];
window->width, window->height)
:window->window_id];
}
if (wlconfig->pointer.focus
&& wlconfig->pointer.focus->window_id == window->window_id)
if (window->wlconfig->pointer.focus
&& window->wlconfig->pointer.focus->window_id == window->window_id)
{
ev = [NSEvent otherEventWithType:NSAppKitDefined
location:NSZeroPoint
modifierFlags:0
timestamp:0
windowNumber:(int) window->window_id
context:GSCurrentContext()
subtype:GSAppKitWindowFocusIn
data1:0
data2:0];
location:NSZeroPoint
modifierFlags:0
timestamp:0
windowNumber:(int) window->window_id
context:GSCurrentContext()
subtype:GSAppKitWindowFocusIn
data1:0
data2:0];
[nswindow sendEvent:ev];
}
@ -80,15 +80,14 @@ xdg_surface_on_configure(void *data, struct xdg_surface *xdg_surface,
static void
xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
int32_t width, int32_t height, struct wl_array *states)
int32_t width, int32_t height, struct wl_array *states)
{
struct window *window = data;
WaylandConfig *wlconfig = window->wlconfig;
NSDebugLog(@"[%d] xdg_toplevel_configure %ldx%ld", window->window_id, width,
height);
NSDebugLog(@"[%d] xdg_toplevel_configure %dx%d", window->window_id, width,
height);
// the compositor can send 0.0x0.0
// The compositor can send 0x0
if (width == 0 || height == 0)
{
return;
@ -99,45 +98,43 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
window->height = height;
xdg_surface_set_window_geometry(window->xdg_surface, 0, 0, window->width,
window->height);
window->height);
NSEvent *ev = [NSEvent otherEventWithType:NSAppKitDefined
location:NSMakePoint(0.0, 0.0)
modifierFlags:0
timestamp:0
windowNumber:window->window_id
context:GSCurrentContext()
subtype:GSAppKitWindowResized
data1:window->width
data2:window->height];
location:NSMakePoint(0.0, 0.0)
modifierFlags:0
timestamp:0
windowNumber:window->window_id
context:GSCurrentContext()
subtype:GSAppKitWindowResized
data1:window->width
data2:window->height];
[(GSWindowWithNumber(window->window_id)) sendEvent:ev];
}
NSDebugLog(@"[%d] notify resize from backend=%ldx%ld", window->window_id,
width, height);
NSDebugLog(@"[%d] notify resize from backend=%dx%d", window->window_id,
width, height);
}
static void
xdg_toplevel_close_handler(void *data, struct zxdg_toplevel_v6 *xdg_toplevel)
xdg_toplevel_close_handler(void *data, struct xdg_toplevel *xdg_toplevel)
{
NSDebugLog(@"xdg_toplevel_close_handler");
}
static void
xdg_popup_configure(void *data, struct xdg_popup *xdg_popup, int32_t x,
int32_t y, int32_t width, int32_t height)
int32_t y, int32_t width, int32_t height)
{
struct window *window = data;
WaylandConfig *wlconfig = window->wlconfig;
NSDebugLog(@"[%d] xdg_popup_configure [%d,%d %dx%d]", window->window_id, x, y,
width, height);
width, height);
}
static void
xdg_popup_done(void *data, struct xdg_popup *xdg_popup)
{
struct window *window = data;
WaylandConfig *wlconfig = window->wlconfig;
window->terminated = YES;
xdg_popup_destroy(xdg_popup);
wl_surface_destroy(window->surface);
@ -145,7 +142,7 @@ xdg_popup_done(void *data, struct xdg_popup *xdg_popup)
static void
wm_base_handle_ping(void *data, struct xdg_wm_base *xdg_wm_base,
uint32_t serial)
uint32_t serial)
{
NSDebugLog(@"wm_base_handle_ping");
xdg_wm_base_pong(xdg_wm_base, serial);
@ -167,4 +164,4 @@ const struct xdg_popup_listener xdg_popup_listener = {
const struct xdg_toplevel_listener xdg_toplevel_listener = {
.configure = xdg_toplevel_configure,
.close = xdg_toplevel_close_handler,
};
};

View file

@ -781,7 +781,7 @@ WaylandServer (SurfaceRoles)
break;
case NSPopUpMenuWindowLevel:
NSDebugLog(@"[%d] NSPopUpMenuWindowLevel", win);
[self createPopup:win];
[self createPopup:window];
break;
case NSScreenSaverWindowLevel:
NSDebugLog(@"[%d] NSScreenSaverWindowLevel", win);
@ -1099,4 +1099,4 @@ WaylandServer (SurfaceRoles)
wl_display_flush(window->wlconfig->display);
}
@end
@end

View file

@ -63,6 +63,18 @@
#include <math.h>
// The Windows SDK declares BOOL as an int. Objective C defines BOOl as a char.
// Those two types clash. MinGW's implementation of the Windows SDK uses the WINBOOL
// type to avoid this clash. When compiling natively on Windows, we need to manually
// define WINBOOL.
// MinGW will define _DEF_WINBOOL_ if it has defined WINBOOL so we can use the same trick
// here.
// See https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-headers/include/ntdef.h#L355
#ifndef _DEF_WINBOOL_
#define _DEF_WINBOOL_
typedef int WINBOOL;
#endif
// To update the cursor..
static BOOL update_cursor = NO;
static BOOL should_handle_cursor = NO;

View file

@ -33,6 +33,18 @@
#include "win32/WIN32Server.h"
#include "win32/WIN32Geometry.h"
// The Windows SDK declares BOOL as an int. Objective C defines BOOl as a char.
// Those two types clash. MinGW's implementation of the Windows SDK uses the WINBOOL
// type to avoid this clash. When compiling natively on Windows, we need to manually
// define WINBOOL.
// MinGW will define _DEF_WINBOOL_ if it has defined WINBOOL so we can use the same trick
// here.
// See https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-headers/include/ntdef.h#L355
#ifndef _DEF_WINBOOL_
#define _DEF_WINBOOL_
typedef int WINBOOL;
#endif
static void
invalidateWindow(WIN32Server *svr, HWND hwnd, RECT rect)
{

View file

@ -803,6 +803,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
XEvent xEvent;
unsigned long *extents;
Offsets *o = generic.offsets + (style & 15);
int windowIdent;
int repp = 0;
int repx = 0;
int repy = 0;
@ -1131,6 +1132,11 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
}
}
/* Calling termwindow should cause the window to be destroyed,
* so we need to take a copy of the window identifier to check
* for events left in the queue about that window.
*/
windowIdent = window->ident;
[self termwindow: window->number];
XSync(dpy, False);
while (XPending(dpy) > 0)
@ -1138,7 +1144,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
XNextEvent(dpy, &xEvent);
NSDebugLLog(@"Offset", @"Destroying ... event %d window %lu\n",
xEvent.type, xEvent.xany.window);
if (xEvent.xany.window != window->ident)
if (xEvent.xany.window != windowIdent)
{
continue;
}

View file

@ -151,12 +151,18 @@
{
/* Always returns a Latin-1 string according to the manpage */
count = XLookupString (event, buf, BUF_LEN, &keysym, NULL);
if (count)
if (count == 1)
{
keys = [[[NSString alloc] initWithBytes: buf
length: count
encoding: NSISOLatin1StringEncoding] autorelease];
}
else if (count > 1) // manpage lies and we suppose UTF-8
{
keys = [[[NSString alloc] initWithBytes: buf
length: count
encoding: NSUTF8StringEncoding] autorelease];
}
if (keysymptr)
*keysymptr = keysym;

View file

@ -38,7 +38,12 @@
#endif
#include <signal.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#else
#include <io.h>
#define strcasecmp _stricmp
#endif
#include <ctype.h>
#ifdef __MINGW__

View file

@ -40,6 +40,18 @@
#include <sys/file.h>
#endif
// The Windows SDK declares BOOL as an int. Objective C defines BOOl as a char.
// Those two types clash. MinGW's implementation of the Windows SDK uses the WINBOOL
// type to avoid this clash. When compiling natively on Windows, we need to manually
// define WINBOOL.
// MinGW will define _DEF_WINBOOL_ if it has defined WINBOOL so we can use the same trick
// here.
// See https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-headers/include/ntdef.h#L355
#ifndef _DEF_WINBOOL_
#define _DEF_WINBOOL_
typedef int WINBOOL;
#endif
@interface Win32PbOwner : NSObject
{
NSPasteboard *_pb;

View file

@ -3,12 +3,12 @@
# The version number of this release.
GNUSTEP_BACK_MAJOR_VERSION=0
GNUSTEP_BACK_MINOR_VERSION=31
GNUSTEP_BACK_MINOR_VERSION=32
GNUSTEP_BACK_SUBMINOR_VERSION=0
# This numeric value should match above
VERSION_NUMBER=031.0
VERSION_NUMBER=032.0
# This numeric value should match the compatible gui interface version
INTERFACE_VERSION_NUMBER=031
INTERFACE_VERSION_NUMBER=032
GNUSTEP_BACK_VERSION=${GNUSTEP_BACK_MAJOR_VERSION}.${GNUSTEP_BACK_MINOR_VERSION}.${GNUSTEP_BACK_SUBMINOR_VERSION}
VERSION=${GNUSTEP_BACK_VERSION}