13
0
Commit Graph

55 Commits

Author SHA1 Message Date
John Emmas
3933fc2db7 Oops, missed one... 2024-11-03 13:33:57 +00:00
John Emmas
44068a63f5 Guard some pragmas which aren't understood by MSVC 2024-11-03 11:50:44 +00:00
37b0910d80
Windows Multitouch: disable gestures
Gestures may prevent a 2nd touch from being registered as
such (and instead report a zoom/pinch gesture).

At least that is my best guess, why Nathan needs 3 fingers
to move 2 Faders :)
2024-11-02 04:54:28 +01:00
0e4dcb231f
Amend previous commit (fix Windows builds) 2024-11-02 00:12:53 +01:00
e63693fb1c
Fix Windows debug builds
There's no such thing as GDK_TOUCH_CANCEL. The idea was dropped.
2024-11-01 22:21:25 +01:00
c88d370136
Implement Windows multitouch support 2024-10-31 02:02:20 +01:00
952ec57a26 Special case first touch-event: grab and emulate mouse button 2024-10-30 19:19:30 +01:00
23d5dcd080 Fix touch event propagation (custom grab)
See also 79dae5f2b4
2024-10-30 19:13:24 +01:00
8f32862e58
Humble beginnings of implementing Touch API for YDK/Windows 2024-10-26 14:55:35 +02:00
79dae5f2b4
Implement multitouch grab 2024-10-24 23:33:31 +02:00
5cf392b17a
Implement YDK Touch API for Linux/X11 2024-10-24 23:33:31 +02:00
89da2f2c87
Define YDK/YTKMM Touch Event API 2024-10-24 23:33:28 +02:00
Mads Kiilerich
e520cf6bac
wscript: Actually invoke autowaf.build_i18n_pot in i18n_pot_func 2024-10-22 00:37:39 +02:00
Mads Kiilerich
8e2a9dfd91
wscript: Fix i18n names for tk 2024-10-22 00:37:39 +02:00
Mads Kiilerich
48fcb30608 wscript: fix whitespace formatting
No tabs and no trailing spaces.
2024-10-20 19:52:14 -06:00
1f70d54989 avoid call of a null function pointer 2024-09-13 08:24:04 -06:00
79e78394c2 track modal window show/hide, not realize/finalize 2024-09-13 16:02:59 +02:00
267cddfb05
Fix stuck insensitive macOS main menu
Popup Dialog Windows never unset the modal flag.
e.g. Session > Save Snapshot & switch.

Furthermore a 2nd dialog was able to get the menu stuck
forever (e.g. Snapshot & Switch .. -> Replace existing?
2024-09-05 18:27:44 +02:00
3acc8c76ca
Handle Filechooser Location entry
In order for the Filechooser Location widget to work two
things need to be setup, which only the FileChooserDialog
does:
 * subscribe to Widget's "response-requested" signal
 * call should_respond () hook from top-level window's
   default handler.

The Location Entry emits "activates-default". In case of
the Dialog, that calls the dialogs response callback,
which then calls ` _gtk_file_chooser_embed_should_respond`.

That handles changes made by the user to the location entry.

-=-

Gtk::FileChooserWidget does not handle this, "response-requested"
signal is not exposed, nor is _gtk_file_chooser_embed_should_respond
available outside Gtk.

This change at least selects the file in the treeview, which
allows further handling, without interfering with FileChooserDialog's
behavior.
2024-09-04 22:29:24 +02:00
b544ac832c move gdk global for modal notification to be with other gdk globals 2024-08-19 15:15:45 -06:00
0901b239c1 fix spelling error 2024-08-19 15:15:45 -06:00
4ad332ae50 fix initial commit 2024-08-19 15:15:45 -06:00
221fd82d59 initial infrastructure for handling modal dialogs on macOS 2024-08-19 15:15:45 -06:00
76b25163bd
Fix YTK filemanager recently-used (Windows, macOS)
g_get_user_data_dir() folder does not exist on macOS
compare to gtkfilechoosersettings.c which creates
g_get_user_config_dir().
2024-08-06 20:51:56 +02:00
181ba4db54 ytk: do not show filter combo box in filechooser if there is only 1 filter 2024-07-22 15:36:45 -06:00
2cdfdc9212 Prevent minimizing Dialog Windows on macOS
This works around an issue with some embedded plugin windows not being
properly restored when the window is restored after being minimized. It
also prevents zooming (full-screen) display of dialog windows.

Also recent macOS allows to maximize Windows even if they are not
supposed to be resizable (also causing issues with some plugins).
2024-07-18 17:57:52 +02:00
f8f6c89136 fix a likely logic error in GtkMenu handling of enter events
On macOS popping up a menu with a position function that leads the menu to be
under the mouse pointer generates the same initial set of enter events as on
linux, but this is then followed  by some leave events and then a repeat of the
same set of enter events.

this exposes what appears to be a logic error in gtk_menu_enter_notify().

Nonlinear enter events (i.e. where the menu pops up under the mouse, so the
mouse was never actually moved into the menu's window) should not cause a reset
of priv->seen_item_enter. This value, when true, is used to force the next
received button release event to be handle as an menu activation event. This
should only happen when the mouse has actually been moved by the user into the
menu (as already indicated in existing comments). The value has this effect by,
on the next enter event for a menu item, if already set, forcing
menu->activate_time to zero, which in turn will cause menu activation on button
up/release.

This bug doesn't appear on Linux (or Windows) because the event sequence
associated with a menu popup is different. The lack of another set of enter
events means that menu->activate_time is never reset, and so the behavior is as
expected.

This change makes the setting of priv->seen_item_enter be idempotent with
respect to non-linear enter events, which I believe is the intended behavior.
2024-07-15 11:09:59 -06:00
e317d75b17
Fix YTK doxygen errors 2024-05-27 22:21:29 +02:00
fd96694a21
Fix various doxgen errors in YTK
This is about half of the reported errors, then my patience
ran out. More later
2024-05-27 00:43:04 +02:00
5a52b66dfa
Remove unsupported xml/html tag <inlinegraphic> 2024-05-26 23:45:31 +02:00
76beb21862
Remove non-standard @newin doxygen token
We are not interested in which version a given GTK method
was added.
2024-05-26 23:39:04 +02:00
4b8b5acfc4
Fix builds with gcc-14 lstat (#9703 PR #893)
from stat(2)
```
lstat():
    /* glibc 2.19 and earlier */ _BSD_SOURCE
        || /* Since glibc 2.20 */ _DEFAULT_SOURCE
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200112L

```
2024-05-07 00:17:56 +02:00
894e6d27a4 NOOP: whitespace cleanup 2024-04-19 10:43:10 -06:00
c96e12ba58 expand null/destroyed tests for gdk objects in NSView methods 2024-04-19 10:42:59 -06:00
e64a071e39
(YDK) amend previous commit, call parent method 2024-04-19 16:46:49 +02:00
08e394f681
(YDK) possible fix for Catalina event loop crashes
```
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libydk.dylib 0x0000000110d8942d -[GdkQuartzView setNeedsDisplay:] + 93
1 com.apple.AppKit 0x00007fff34af6848 -[NSView(NSViewContentStyle) _recursivelyInvalidateCachedContentStyle] + 120
2 com.apple.AppKit 0x00007fff34af60fb -[NSView _setSuperview:] + 521
3 com.apple.AppKit 0x00007fff34b200a6 -[NSView removeFromSuperview] + 140
4 com.apple.AppKit 0x00007fff34ba882f -[NSView removeFromSuperviewWithoutNeedingDisplay] + 36
5 com.apple.AppKit 0x00007fff34b27168 -[NSView _finalize] + 977
6 com.apple.AppKit 0x00007fff34b26c0c -[NSView dealloc] + 121
7 com.apple.AppKit 0x00007fff34e30db4 -[NSFrameView dealloc] + 119
8 com.apple.AppKit 0x00007fff34e30d36 -[NSTitledFrame dealloc] + 62
9 com.apple.AppKit 0x00007fff34e30ce9 -[NSThemeFrame dealloc] + 603
10 com.apple.Foundation 0x00007fff39ed5992 NSKVODeallocate + 172
11 com.apple.AppKit 0x00007fff34d85884 -[NSWindow dealloc] + 1083
12 com.apple.AppKit 0x00007fff34d85442 -[NSWindow _dealloc] + 76
13 libobjc.A.dylib 0x00007fff6f6f3054 AutoreleasePoolPage::releaseUntil(objc_object**) + 134
14 libobjc.A.dylib 0x00007fff6f6d7dba objc_autoreleasePoolPop + 175
15 com.apple.CoreFoundation 0x00007fff377c9cb5 _CFAutoreleasePoolPop + 22
16 com.apple.Foundation 0x00007fff39e7d04e -[NSAutoreleasePool drain] + 126
17 libydk.dylib 0x0000000110d8ef29 gdk_event_prepare + 73
18 libglib-2.0.0.dylib 0x00000001110ded45 g_main_context_prepare + 533
19 libglib-2.0.0.dylib 0x00000001110df800 g_main_context_iterate + 128
20 libglib-2.0.0.dylib 0x00000001110dfcc2 g_main_loop_run + 210
21 libytk.dylib 0x0000000110a4f11f gtk_main + 191
22 libgtkmm2ext.dylib 0x00000001104cef1e Gtkmm2ext::UI::run(Receiver&) + 318
23 com.harrisonconsoles.Mixbus10 0x000000010dc6fb9c main + 2652
```
2024-04-19 15:38:12 +02:00
fe7fd146aa macOS: fix crash when trying to enter fullscreen while already in fullscreen
YDK2 uses SetSystemUIMode() for fullscreen. This also uses space
otherwise reserved for the menu bar at the top, and is apparently
preferable for Ardour's UI.

However when a user manually enters fullscreen using the window
title-bar's green button (NSWindow toggleFullScreen). YDK will crash
when the user then also tries to use YDK's fullscreen mode:

```
NSWindowStyleMaskFullScreen cleared on a window outside of a full screen transition.
called from
  [NSWindow setStyleMask:]
  gdk_window_set_decorations
  gdk_window_fullscreen
```

Ideally we'd set NSApp presentation flags so that the toplevel window
would allow one to zoom (maximize), but not to enter fullscreen. Like it
used to be on OSX. It is unclear how to achieve this on macOS for
resizable windows, short of marking the top-level window a dialog or
utility window.
2024-04-10 20:41:49 +02:00
ecd22e9aa8 Remove call to deprecated userSpaceScaleFactor
userSpaceScaleFactor is a missing symbol on some recent versions of macOS.
2024-04-09 06:06:58 +02:00
2e991b0067
Fix thinko in bda7041643 2024-04-04 17:32:50 +02:00
3b0e421de4
Use proper _POSIX_C_SOURCE constant 2024-04-04 17:06:31 +02:00
bda7041643
Fix #9642 - fdopen(3) requires _POSIX_C_SOURCE
Without this, fdopen() returns some garbage FILE* which
causes a crash when used.
2024-04-04 17:06:28 +02:00
6c38e0a4e3 explicitly initialize the needs_display_region member of a GDK quartz window
This may not be necessary but it is better to have it be explicit
2024-03-22 13:13:16 -06:00
fe6a635c3a provide a GDK function to enable/disable use of Cocoa-provided rect in drawRect 2024-03-22 13:13:16 -06:00
7324070628 gdk/quartz: add some additional GDK_NOTE debugging 2024-03-22 13:13:16 -06:00
da4218c2db
YTK: remove unused code
This addresses a missing `readlink` due to missing
`_POSIX_C_SOURCE=200809` define when including unistd.h
2024-03-18 22:02:54 +01:00
Mads Kiilerich
a2bb1a3511 Fix more -Wincompatible-pointer-types
c10154ad23 showed the direction  but was not correct and insufficient
for building with Fedora 40 and gcc 14.0.1 .
2024-03-18 21:24:46 +01:00
c10154ad23
Fix a -Wincompatible-pointer-types 2024-03-18 20:29:19 +01:00
9efd521ea6 (GDK) keep our own record of invalidated rectangles for GdkQuartzView
macOS has broken its exposure/redraw model at least twice by always providing the entire area
of an NSView for every call to drawRect, and cannot provide the list of rects. This change
expands the tracking done using the needs_display_region, and does so directly via the
objective C methods of an NSView (and its derived children like GdkQuartzView).

The result is that when we send an expose signal, GDK/GTK code can obtain an accurate
list of the invalidated rects if desired, and thus avoiding redrawing the entire contents
of a window
2024-03-18 10:40:42 -06:00
0fa8c5add4
Update ydk-pixbuf, backport upstream changes to io-xpm #9642
Bastien Nocera <hadess@hadess.net>
  io-xpm: Fix "format not a string literal" errors
  xpm: Sanity check XPM file dimensions
  xpm: Simplify error path
  xpm: Fail when XPM file doesn't contain enough data

Philip Withnall <withnall@endlessm.com>
  io-xpm: Handle fseek() failure

Federico Mena Quintero <federico@gnome.org>
  Use gdk_pixbuf_get_pixels(); don't access the pixels field directly

Tobias Stoeckmann <tobias@stoeckmann.org>
  XPM: Fix undefined behaviour (signed integer overflow)
2024-02-23 01:29:16 +01:00
64e42a465b
YTK is not interested in system-wide GTK Modules 2024-02-23 00:33:17 +01:00