gtk issueshttps://gitlab.gnome.org/GNOME/gtk/-/issues2024-03-28T11:25:13Zhttps://gitlab.gnome.org/GNOME/gtk/-/issues/6578Segfault GTK4 on windows 102024-03-28T11:25:13ZNikolay MiskoSegfault GTK4 on windows 10## Steps to reproduce
1. MINGW64_NT-10.0-19045 work 3.4.10.x86_64 2024-03-24 15:09 UTC x86_64 Msys
2. gcc 13.2.0
3. GTK4 - 4.12.5
4. Get demos/gtk-demo/dialog.c
5. Modify it to simply application as belowing code
6. After several attemp...## Steps to reproduce
1. MINGW64_NT-10.0-19045 work 3.4.10.x86_64 2024-03-24 15:09 UTC x86_64 Msys
2. gcc 13.2.0
3. GTK4 - 4.12.5
4. Get demos/gtk-demo/dialog.c
5. Modify it to simply application as belowing code
6. After several attempts get segfault with message in gdb: 0x00007ffff67e7381 in ig7icd64!DrvSetLayerPaletteEntries () from C:\\WINDOWS\\SYSTEM32\\ig7icd64.dll
7. I've thought driver's problem and updated it to last version. No solution.
**#include** \<glib/gi18n.h\>
**#include** \<gtk/gtk.h\>
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
**static** GtkWidget \*window = NULL;
**static** GtkWidget\* win1 = NULL;
**static** GtkWidget \*entry1 = NULL;
**static** GtkWidget \*entry2 = NULL;
**static** **void**
**message_dialog_clicked** (GtkButton \*button,
gpointer user_data)
{
GtkWidget \*dialog;
**static** **int** i = 1;
dialog = **gtk_message_dialog_new** (GTK_WINDOW (window),
_GTK_DIALOG_MODAL_ | _GTK_DIALOG_DESTROY_WITH_PARENT_,
_GTK_MESSAGE_INFO_,
_GTK_BUTTONS_OK_CANCEL_,
"Test message");
**gtk_message_dialog_format_secondary_text** (GTK_MESSAGE_DIALOG (dialog),
ngettext ("Has been shown once", "Has been shown %d times", i), i);
g_signal_connect (dialog, "response", G_CALLBACK (**gtk_window_destroy**), NULL);
**gtk_window_present** (GTK_WINDOW (dialog));
i++;
}
**typedef** **struct** {
GtkWidget \*local_entry1;
GtkWidget \*local_entry2;
GtkWidget \*global_entry1;
GtkWidget \*global_entry2;
} ResponseData;
**static** **void**
**on_dialog_response** (GtkDialog \*dialog,
**int** response,
gpointer user_data)
{
ResponseData \*data = user_data;
**if** (response == _GTK_RESPONSE_OK_)
{
**gtk_editable_set_text** (GTK_EDITABLE (data-\>global_entry1),
**gtk_editable_get_text** (GTK_EDITABLE (data-\>local_entry1)));
**gtk_editable_set_text** (GTK_EDITABLE (data-\>global_entry2),
**gtk_editable_get_text** (GTK_EDITABLE (data-\>local_entry2)));
}
**gtk_window_destroy** (GTK_WINDOW (dialog));
}
**static** **void**
**interactive_dialog_clicked** (GtkButton \*button,
gpointer user_data)
{
GtkWidget \*content_area;
GtkWidget \*dialog;
GtkWidget \*table;
GtkWidget \*local_entry1;
GtkWidget \*local_entry2;
GtkWidget \*label;
ResponseData \*data;
dialog = **gtk_dialog_new_with_buttons** ("Interactive Dialog",
GTK_WINDOW (window),
\_GTK_DIALOG_MODAL\_| _GTK_DIALOG_DESTROY_WITH_PARENT\_|\_GTK_DIALOG_USE_HEADER_BAR_,
\_("\_OK"), _GTK_RESPONSE_OK_,
\_("\_Cancel"), _GTK_RESPONSE_CANCEL_,
NULL);
**gtk_dialog_set_default_response** (GTK_DIALOG (dialog), _GTK_RESPONSE_OK_);
content_area = **gtk_dialog_get_content_area** (GTK_DIALOG (dialog));
table = **gtk_grid_new** ();
**gtk_widget_set_hexpand** (table, TRUE);
**gtk_widget_set_vexpand** (table, TRUE);
**gtk_widget_set_halign** (table, _GTK_ALIGN_CENTER_);
**gtk_widget_set_valign** (table, _GTK_ALIGN_CENTER_);
**gtk_box_append** (GTK_BOX (content_area), table);
**gtk_grid_set_row_spacing** (GTK_GRID (table), 6);
**gtk_grid_set_column_spacing** (GTK_GRID (table), 6);
label = **gtk_label_new_with_mnemonic** ("\_Entry 1");
**gtk_grid_attach** (GTK_GRID (table), label, 0, 0, 1, 1);
local_entry1 = **gtk_entry_new** ();
**gtk_editable_set_text** (GTK_EDITABLE (local_entry1), **gtk_editable_get_text** (GTK_EDITABLE (entry1)));
**gtk_grid_attach** (GTK_GRID (table), local_entry1, 1, 0, 1, 1);
**gtk_label_set_mnemonic_widget** (GTK_LABEL (label), local_entry1);
label = **gtk_label_new_with_mnemonic** ("E_ntry 2");
**gtk_grid_attach** (GTK_GRID (table), label, 0, 1, 1, 1);
local_entry2 = **gtk_entry_new** ();
**gtk_editable_set_text** (GTK_EDITABLE (local_entry2), **gtk_editable_get_text** (GTK_EDITABLE (entry2)));
**gtk_grid_attach** (GTK_GRID (table), local_entry2, 1, 1, 1, 1);
**gtk_label_set_mnemonic_widget** (GTK_LABEL (label), local_entry2);
data = g_new (ResponseData, 1);
data-\>local_entry1 = local_entry1;
data-\>local_entry2 = local_entry2;
data-\>global_entry1 = entry1;
data-\>global_entry2 = entry2;
**g_signal_connect_data** (dialog, "response",
G_CALLBACK (on_dialog_response),
data, (GClosureNotify) g_free,
0);
**gtk_window_present** (GTK_WINDOW (dialog));
}
GtkWidget \*
**do_dialog** (GtkWidget \*do_widget)
{
GtkWidget \*vbox;
GtkWidget \*vbox2;
GtkWidget \*hbox;
GtkWidget \*button;
GtkWidget \*table;
GtkWidget \*label;
**if** (!window)
{
window = **gtk_window_new** ();
**gtk_window_set_display** (GTK_WINDOW (window),
**gtk_widget_get_display** (do_widget));
**gtk_window_set_title** (GTK_WINDOW (window), "Dialogs");
**gtk_window_set_resizable** (GTK_WINDOW (window), FALSE);
**g_object_add_weak_pointer** (G_OBJECT (window), (gpointer \*)&window);
vbox = **gtk_box_new** (_GTK_ORIENTATION_VERTICAL_, 8);
**gtk_widget_set_margin_start** (vbox, 8);
**gtk_widget_set_margin_end** (vbox, 8);
**gtk_widget_set_margin_top** (vbox, 8);
**gtk_widget_set_margin_bottom** (vbox, 8);
**gtk_window_set_child** (GTK_WINDOW (window), vbox);
/\* Standard message dialog \*/
hbox = **gtk_box_new** (_GTK_ORIENTATION_HORIZONTAL_, 8);
**gtk_box_append** (GTK_BOX (vbox), hbox);
button = **gtk_button_new_with_mnemonic** ("\_Message Dialog");
g_signal_connect (button, "clicked",
G_CALLBACK (message_dialog_clicked), NULL);
**gtk_box_append** (GTK_BOX (hbox), button);
**gtk_box_append** (GTK_BOX (vbox), **gtk_separator_new** (_GTK_ORIENTATION_HORIZONTAL_));
/\* Interactive dialog\*/
hbox = **gtk_box_new** (_GTK_ORIENTATION_HORIZONTAL_, 8);
**gtk_box_append** (GTK_BOX (vbox), hbox);
vbox2 = **gtk_box_new** (_GTK_ORIENTATION_VERTICAL_, 0);
button = **gtk_button_new_with_mnemonic** ("\_Interactive Dialog");
g_signal_connect (button, "clicked",
G_CALLBACK (interactive_dialog_clicked), NULL);
**gtk_box_append** (GTK_BOX (hbox), vbox2);
**gtk_box_append** (GTK_BOX (vbox2), button);
table = **gtk_grid_new** ();
**gtk_grid_set_row_spacing** (GTK_GRID (table), 4);
**gtk_grid_set_column_spacing** (GTK_GRID (table), 4);
**gtk_box_append** (GTK_BOX (hbox), table);
label = **gtk_label_new_with_mnemonic** ("\_Entry 1");
**gtk_grid_attach** (GTK_GRID (table), label, 0, 0, 1, 1);
entry1 = **gtk_entry_new** ();
**gtk_grid_attach** (GTK_GRID (table), entry1, 1, 0, 1, 1);
**gtk_label_set_mnemonic_widget** (GTK_LABEL (label), entry1);
label = **gtk_label_new_with_mnemonic** ("E_ntry 2");
**gtk_grid_attach** (GTK_GRID (table), label, 0, 1, 1, 1);
entry2 = **gtk_entry_new** ();
**gtk_grid_attach** (GTK_GRID (table), entry2, 1, 1, 1, 1);
}
**if** (!**gtk_widget_get_visible** (window))
**gtk_widget_set_visible** (window, TRUE);
**else**
**gtk_window_destroy** (GTK_WINDOW (window));
**return** window;
}
**void** **gtk_ui_activate** (GtkApplication \*app,
gpointer user_data)
{
win1 = **gtk_application_window_new** (app);
**gtk_window_set_title** (GTK_WINDOW (win1), "Window");
**gtk_window_present**(win1);
do_dialog(win1);
}
**int**
**main** (**int** argc,
**char** \*\*argv)
{
GtkApplication \*app;
**int** status;
app = **gtk_application_new** ("org.gtk.example", _G_APPLICATION_DEFAULT_FLAGS_);
g_signal_connect (app, "activate", G_CALLBACK (gtk_ui_activate), NULL);
status = **g_application_run** (G_APPLICATION (app), argc, argv);
**g_object_unref** (app);
**return** status;
}
## Version information
## Warnings
## Backtracehttps://gitlab.gnome.org/GNOME/gtk/-/issues/6565GdkWin32: Interactive window resizing not working with Vulkan2024-03-22T13:31:40ZLuca Bacciluca.bacci@outlook.comGdkWin32: Interactive window resizing not working with VulkanThis was also reported in https://gitlab.gnome.org/GNOME/gtk/-/issues/6401#note_1999518This was also reported in https://gitlab.gnome.org/GNOME/gtk/-/issues/6401#note_1999518https://gitlab.gnome.org/GNOME/gtk/-/issues/6564NGL: icon rendering artifacts on Windows2024-03-22T17:09:59ZLuca Bacciluca.bacci@outlook.comNGL: icon rendering artifacts on WindowsThis is a screenshot of gtk4-demo (with 2x magnification to render the issue more visible)
![icons-render-issue](/uploads/4e24317b11f3293d3e2843dd76a6fd43/icons-render-issue.jpg)
Also reported in https://gitlab.gnome.org/GNOME/gtk/-/is...This is a screenshot of gtk4-demo (with 2x magnification to render the issue more visible)
![icons-render-issue](/uploads/4e24317b11f3293d3e2843dd76a6fd43/icons-render-issue.jpg)
Also reported in https://gitlab.gnome.org/GNOME/gtk/-/issues/6401#note_2017869https://gitlab.gnome.org/GNOME/gtk/-/issues/6292Access Violation during DnD on Windows2023-12-21T16:04:16ZDenis ArtemovAccess Violation during DnD on WindowsWindows 10 x64, GTK 4.12.4 under MSYS2
Source to reproduce:
```c
#include <gtk/gtk.h>
static GdkContentProvider* on_drag_prepare(
GtkDragSource *source,
double x,
double y,
void *none)
{
ret...Windows 10 x64, GTK 4.12.4 under MSYS2
Source to reproduce:
```c
#include <gtk/gtk.h>
static GdkContentProvider* on_drag_prepare(
GtkDragSource *source,
double x,
double y,
void *none)
{
return gdk_content_provider_new_typed (G_TYPE_STRING, "lalala");
}
static void activate (GtkApplication* app, gpointer user_data)
{
GtkWidget *window = gtk_application_window_new (app);
gtk_window_set_title (GTK_WINDOW (window), "DnD bug");
GtkDragSource *drag_source = gtk_drag_source_new ();
g_signal_connect (drag_source, "prepare", G_CALLBACK (on_drag_prepare), NULL);
gtk_widget_add_controller (GTK_WIDGET (window), GTK_EVENT_CONTROLLER (drag_source));
gtk_window_present (GTK_WINDOW (window));
}
int main(int argc, char **argv)
{
GtkApplication *app = gtk_application_new ("org.gtk.example", G_APPLICATION_DEFAULT_FLAGS);
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
int status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
return status;
}
```
How to reproduce:
1. Run in debugger (gdb for example). This is important! The bug is racy and nothing happens without debugger
2. Do fast and short DnD moves in application window several times.
Unfortunately I have no idea how to get useful stack trace under MSYS2 (( So `bt full` gets only this:
```
Thread 12 "GDK Win32 DnD Thread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 14992.0x3a98]
0x00007ffc00b10ad5 in ?? () from E:\Development\vscode\tools\msys64\mingw64\bin\libgtk-4-1.dll
#0 0x00007ffc00b10ad5 in ?? () from E:\Development\vscode\tools\msys64\mingw64\bin\libgtk-4-1.dll
No symbol table info available.
#1 0x00007ffc00b10f54 in ?? () from E:\Development\vscode\tools\msys64\mingw64\bin\libgtk-4-1.dll
No symbol table info available.
#2 0x00007ffc624ac61e in ole32!OleGetPackageClipboardOwner () from C:\Windows\System32\ole32.dll
No symbol table info available.
#3 0x00007ffc624ad06c in ole32!DoDragDrop () from C:\Windows\System32\ole32.dll
No symbol table info available.
#4 0x00007ffc00b11a7c in ?? () from E:\Development\vscode\tools\msys64\mingw64\bin\libgtk-4-1.dll
No symbol table info available.
#5 0x00007ffc248a2151 in ?? () from E:\Development\vscode\tools\msys64\mingw64\bin\libglib-2.0-0.dll
No symbol table info available.
#6 0x00007ffc248d6a57 in ?? () from E:\Development\vscode\tools\msys64\mingw64\bin\libglib-2.0-0.dll
No symbol table info available.
#7 0x00007ffc6426af5a in msvcrt!_beginthreadex () from C:\Windows\System32\msvcrt.dll
No symbol table info available.
#8 0x00007ffc6426b02c in msvcrt!_endthreadex () from C:\Windows\System32\msvcrt.dll
No symbol table info available.
#9 0x00007ffc63af7344 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll
No symbol table info available.
#10 0x00007ffc643626b1 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#11 0x0000000000000000 in ?? ()
No symbol table info available.
```
PS: I need a hint on how to get a full stacktrace
PPS: Same behavior is for `gtk4-demo` application under debugger in "Drag-and-Drop" windowhttps://gitlab.gnome.org/GNOME/gtk/-/issues/6126windows: Support GtkPrintDialog2023-09-28T10:39:41ZMatthias Clasenwindows: Support GtkPrintDialogIt would be good to have an implementation of GtkPrintDialog that uses the native Windows print api.
I tried to write one using GtkPrintOperation, but that did not work out, since it does not have
a 'print this file' api.It would be good to have an implementation of GtkPrintDialog that uses the native Windows print api.
I tried to write one using GtkPrintOperation, but that did not work out, since it does not have
a 'print this file' api.https://gitlab.gnome.org/GNOME/gtk/-/issues/6081Gtk4 Win32 : mouse offset when dragging windows out of maximized state.2023-10-08T14:13:02ZDoublonMousseGtk4 Win32 : mouse offset when dragging windows out of maximized state.## Steps to reproduce
1. Open a gtk4 application and maximise it
2. Drag the window out of the maximised state
3. See that there is a permanent and constant offset between the mouse cursor and the application titlebar.
This happens ...## Steps to reproduce
1. Open a gtk4 application and maximise it
2. Drag the window out of the maximised state
3. See that there is a permanent and constant offset between the mouse cursor and the application titlebar.
This happens on the gtk4-demo application and other applications built on gtk4.
## Current behavior
There is an offset between the cursor and the titlebar.
## Expected outcome
No offset
## Version information
- gtk4.12 on windows 11, mingw64
- Computer : surface pro 8 on windows 11 22H2, screen resolution 2880 x 1920 (the bug occurs at 100 % and 200 % scaling on both the high dpi 2880 x 1920 and 1920 x 1080 resolutions
## Additional information
Bug on the gtk4-demo
![gtk4_windows_bug00000907](/uploads/ed4e245704ad728e16f2aa8cbce06de5/gtk4_windows_bug00000907.mp4)
And on rnote. For some reason, the offset is much larger on rnote v 0.8.2.
![gtk4_windows_bug00001710](/uploads/0b6c30bc631dbf6ed12a4d7595b21bc8/gtk4_windows_bug00001710.mp4)
This much larger offset introduces some inconvenience, where touching on a button in the titlebar will change the window size instead of registering a button press.
I think the fact that there is such a difference between these two applications (gtk4-demo and rnote) could help better pinpoint the issue's origin.
On a first look, I thought about a scaling issue, similar to #5877 but I can confirm :
- the bug occurs at 100 % scaling and 200 % scaling at full HD and high dpi resolution (but there *might* be a larger gap at 200 %)
- the bug occurs regardless of the type of input (mouse, touch, pen) and behaves the same way between the three
- the bug occurs both on gtk 4.12 and previous versions (4.10 as well).https://gitlab.gnome.org/GNOME/gtk/-/issues/6041macOS and Windows: IME Window causes GtkPopover to Lose Focus2024-03-16T16:36:39ZDan YeawmacOS and Windows: IME Window causes GtkPopover to Lose FocusHi, one of the Gaphor users noticed that our Popover text entry wasn't working with IME in macOS and Windows with GTK 4.10.x or 4.12.0.
I am able to reproduce this issue using this minimum example:
```
import gi
gi.require_version("Gt...Hi, one of the Gaphor users noticed that our Popover text entry wasn't working with IME in macOS and Windows with GTK 4.10.x or 4.12.0.
I am able to reproduce this issue using this minimum example:
```
import gi
gi.require_version("Gtk", "4.0")
from gi.repository import Gtk, GLib
class EntryWindow(Gtk.ApplicationWindow):
def __init__(self, **kargs):
super().__init__(**kargs, title="Entry Demo")
self.set_size_request(200, 100)
header = Gtk.HeaderBar()
self.set_titlebar(header)
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
vbox.props.margin_start = 24
vbox.props.margin_end = 24
vbox.props.margin_top = 24
vbox.props.margin_bottom = 24
self.set_child(vbox)
button = Gtk.Button.new_with_label("Click Me")
button.connect("clicked", self.on_click_me_clicked)
vbox.append(button)
self.entry = Gtk.Entry()
self.entry.set_text("Hello World")
self.popover = Gtk.Popover.new()
self.popover.set_child(self.entry)
vbox.append(self.popover)
def on_click_me_clicked(self, button):
self.popover.set_visible(True)
def on_activate(app):
win = EntryWindow(application=app)
win.present()
app = Gtk.Application(application_id="com.example.App")
app.connect("activate", on_activate)
app.run(None)
```
I have the Japanese IME enabled with Hiragana selected. When I go to type in the Popover, as soon as the IME Window opens, it appears that the GtkPopover loses focus and none of the keystrokes appear in the GtkEntry. It works fine with no Popover if I put the Entry directly on the Window.https://gitlab.gnome.org/GNOME/gtk/-/issues/6009Inspector crashed on Windows2024-02-28T05:32:51ZTAO ZUHONGInspector crashed on Windows## Steps to reproduce
1. Launch app: gtk4-demo.exe
2. Open inspector with shortcut `Ctrl + Shift + d` or primary menu
3. Switch page: `Global --> Clipboard`
4. Drag files over top action row, leave it quickly(see image 2)
![image](/...## Steps to reproduce
1. Launch app: gtk4-demo.exe
2. Open inspector with shortcut `Ctrl + Shift + d` or primary menu
3. Switch page: `Global --> Clipboard`
4. Drag files over top action row, leave it quickly(see image 2)
![image](/uploads/4ea0348995c111dcc2782e0c1bd45c25/image.png)
![image](/uploads/81c1e36a0e9691e9df968e980bb1441c/image.png)
5. Drag files and drop them over it again and again, then crashed
## Version information
GTK 4.12.0
## Warnings
```
** Message: 20:13:01.666: For syntax highlighting, install the “highlight” program
Gtk-Message: 20:13:06.928: Using default display for GtkInspector; expect some spillover
```
## Backtracehttps://gitlab.gnome.org/GNOME/gtk/-/issues/5941Warning message on Windows: "Allocating size to GtkPopoverMenu [...] without ...2023-10-06T13:40:55ZTAO ZUHONGWarning message on Windows: "Allocating size to GtkPopoverMenu [...] without calling gtk_widget_measure()"Windows 11 22H2<br/>
GTK 4.11.4
App: gtk4-demo.exe
The warn messages throw while showing the popover menu:
```
(gtk4-demo.exe:12680): Gtk-WARNING **: 15:49:35.974: Allocating size to GtkPopoverMenu 00000195125c4e80 without calling gtk_w...Windows 11 22H2<br/>
GTK 4.11.4
App: gtk4-demo.exe
The warn messages throw while showing the popover menu:
```
(gtk4-demo.exe:12680): Gtk-WARNING **: 15:49:35.974: Allocating size to GtkPopoverMenu 00000195125c4e80 without calling gtk_widget_measure(). How does the code know the size to allocate?
(gtk4-demo.exe:12680): Gtk-WARNING **: 15:49:35.983: Allocating size to GtkPopoverMenu 00000195125c4e80 without calling gtk_widget_measure(). How does the code know the size to allocate?
(gtk4-demo.exe:12680): Gtk-WARNING **: 15:49:35.992: Allocating size to GtkPopoverMenu 00000195125c4e80 without calling gtk_widget_measure(). How does the code know the size to allocate?
(gtk4-demo.exe:12680): Gtk-WARNING **: 15:49:36.002: Allocating size to GtkPopoverMenu 00000195125c4e80 without calling gtk_widget_measure(). How does the code know the size to allocate?
```https://gitlab.gnome.org/GNOME/gtk/-/issues/5784Copying unicode character from another program into TextView or Entry doesn't...2023-04-26T06:45:40ZMaciej (Matthew) PiechotkaCopying unicode character from another program into TextView or Entry doesn't work on Windows
## Steps to reproduce
1. Copy unicode character to clipboard in
2. Select TextView or Entry
3. Paste
## Current behavior
Question mark (`?`) is pasted
## Expected outcome
Unicode character is copied
## Version information
- GTK...
## Steps to reproduce
1. Copy unicode character to clipboard in
2. Select TextView or Entry
3. Paste
## Current behavior
Question mark (`?`) is pasted
## Expected outcome
Unicode character is copied
## Version information
- GTK 4.10.1 from gvsbuild
- Windows 11https://gitlab.gnome.org/GNOME/gtk/-/issues/5731Crash on win32 VM2023-04-06T10:37:41ZRicardo LouroCrash on win32 VM<!--
Please, read the CONTRIBUTING.md guide on how to file a new issue.
https://gitlab.gnome.org/GNOME/gtk/-/blob/main/CONTRIBUTING.md
-->
## Steps to reproduce
<!--
Please, explain the sequence of actions necessary to reproduce ...<!--
Please, read the CONTRIBUTING.md guide on how to file a new issue.
https://gitlab.gnome.org/GNOME/gtk/-/blob/main/CONTRIBUTING.md
-->
## Steps to reproduce
<!--
Please, explain the sequence of actions necessary to reproduce the
crash
-->
1. Open any gtk4 application
<!--
You should try and reproduce with the demos applications available
under the `demos` directory, or the test programs in the `tests` directory.
Alternatively, please attach a *small and self-contained* example that
exhibits the issue.
-->
## Version information
<!--
- Which version of GTK you are using
- What operating system and version
- for Linux, which distribution
- If you built GTK yourself, the list of options used to configure the build
-->
- OS Windows 10 1809 LTSC 17763.4131
- VM with virtio video and drivers (0.1.229)
- GTK 4.10 stable branch and main (msvc)
## Backtrace
<!--
- Attaching a stack trace obtained using GDB is appreciated; follow the
instructions on the wiki:
https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces
-->
### Log
```
Gdk-WARNING **: 20:49:08.990: gdk_gl_context_make_current() failed
```
### Call stack
```
0000000000000000() Unknown
> gtk-4-1.dll!gsk_gl_profiler_init(_GskGLProfiler * self) Line 116 C
gobject-2.0-0.dll!g_type_create_instance(unsigned __int64 type) Line 1943 C
gobject-2.0-0.dll!g_object_new_internal(_GObjectClass * class, _GObjectConstructParam * params, unsigned int n_params) Line 2226 C
gobject-2.0-0.dll!g_object_new_valist(unsigned __int64 object_type, const char * first_property_name, char * var_args) Line 2563 C
gobject-2.0-0.dll!g_object_new(unsigned __int64 object_type, const char * first_property_name, ...) Line 2042 C
gtk-4-1.dll!gsk_gl_command_queue_set_profiler(_GskGLCommandQueue * self, _GskProfiler * profiler) Line 1502 C
gtk-4-1.dll!gsk_gl_renderer_realize(_GskRenderer * renderer, _GdkSurface * surface, _GError * * error) Line 162 C
[Inline Frame] gtk-4-1.dll!gsk_renderer_realize(_GskRenderer *) Line 309 C
gtk-4-1.dll!gsk_renderer_new_for_surface(_GdkSurface * surface) Line 649 C
gtk-4-1.dll!gtk_window_realize(_GtkWidget * widget) Line 4320 C
gtk-4-1.dll!gtk_application_window_real_realize(_GtkWidget * widget) Line 510 C
```
Bisected to 5df9d4a7274a9d7a8006edeeab03f3042811c095 and d209f5567768aaa445d70a30424df2041ed3ac75, as reverting these commits solves the issue in the respective branches. \
GTK used to fallback to using cairo just fine. After the change it crashes.https://gitlab.gnome.org/GNOME/gtk/-/issues/5688gtk_events_pending return TRUE also when there are no events (Windows only)2023-03-28T07:42:51ZValeriogtk_events_pending return TRUE also when there are no events (Windows only)## Steps to reproduce
1. on Windows (Win10 64 bit) only
2. run many times the sequence:
```
while (gtk_events_pending())
gtk_main_iteration();
```
3. call the `while()` many times in sequence to force GUI update while heavy ...## Steps to reproduce
1. on Windows (Win10 64 bit) only
2. run many times the sequence:
```
while (gtk_events_pending())
gtk_main_iteration();
```
3. call the `while()` many times in sequence to force GUI update while heavy computation
this is the suggested code in the documentation for `gtk_events_pending()`:
https://docs.gtk.org/gtk3/func.events_pending.html
## Current behavior
First calls are served as expected.
From some (or when executed too close each other),
the `gtk_events_pending()` return TRUE also when there are no events, and so `gtk_main_iteration()` block execution.
## Expected outcome
`gtk_events_pending()`
return FALSE when there are no events pending.
## Version information
```
Debian11:
gtk+-3.0 3.24.24
MinGW/MSYS2/Win10-32bit and 64bit:
gtk+-3.0 3.24.37
MXE/Debian11 cross-build for Win10-32bit and 64bit:
gtk+-3.0 3.24.32
```
## Additional information
This happen for 32bit and 64 bit binaries, and happen for native MinGw/MSYS2 built and for cross-build with MXE.
I tryed also to change the `while()` to this:
```
while (gtk_events_pending())
gtk_main_iteration_do(0);
```
but seems in that situation also `gtk_main_iteration_do(0)` is blocking.
As a dirty work around, I found that setting a control variable to skip next events than first, avoid the block.
```
winGuiLoop==0; // set before sequential calls to GUI update
...
int c=0;
while(gtk_events_pending()) { // while is TRUE, force GUI update
#ifdef _WIN32
if (c>0 && winGuiLoop==0) break; // on Win skip next calls
#endif
gtk_main_iteration_do(0);
c++;
}
```
the first iteration update the GUI, next iterations are skipped on Windows.
On Linux always work as documented.https://gitlab.gnome.org/GNOME/gtk/-/issues/5611Gtk4 windows do not open on top for Windows 102023-02-20T14:21:49ZantxvGtk4 windows do not open on top for Windows 10Gtk4 windows do not consistently open above other windows on Windows 10 when they first open, or when they are presented again after hiding.
To reproduce:
1. Compile the getting started hello world application.
2. Open cmd.exe.
3. Run ...Gtk4 windows do not consistently open above other windows on Windows 10 when they first open, or when they are presented again after hiding.
To reproduce:
1. Compile the getting started hello world application.
2. Open cmd.exe.
3. Run the application after a five second delay: `timeout /t 5 && <path to exe>`.
4. Before the application opens, maximize a Chrome window.
5. The hello world window does not open above the Chrome window.
This might be the last straw for my attempt to use gtk4 on Windows.https://gitlab.gnome.org/GNOME/gtk/-/issues/5591Copy/Paste within GTK app causes GDK error and crashes 100%2023-10-17T08:39:06ZBrad WooleverCopy/Paste within GTK app causes GDK error and crashes 100%## Summary
Copying text from a `Gtk.TextView` and then pasting into another widget within my application (i.e. `Gtk.Entry`) causes
an immediate crash every time. This occurs regardless of whether I'm using keyboard shortcuts (Windows ...## Summary
Copying text from a `Gtk.TextView` and then pasting into another widget within my application (i.e. `Gtk.Entry`) causes
an immediate crash every time. This occurs regardless of whether I'm using keyboard shortcuts (Windows `Ctrl-C` / `Ctrl-V`), or
the right-click context menu `Copy` / `Paste`.
## Steps to reproduce
Given an application with a `Gtk.TextView` (using `Gtk.TextBuffer`) and a `Gtk.Entry`, the following steps reproduce the issue 100% for me:
1. Use the mouse to highlight some text in the `Gtk.TextView`
2. Copy the text (`Ctrl-C` or right-click `Copy` from context menu)
3. Paste the text in the `Gtk.Entry` (`Ctrl-V` or right-click `Paste` from context menu)
4. A GDK error is printed, and the application crashes seconds later
## Sample Code
```
import gi
gi.require_version('Gtk', '4.0')
from gi.repository import Gtk, Gio
class CopyPasteCrashDemo(Gtk.Application):
def __init__(self):
Gtk.Application.__init__(self, application_id=None, flags=Gio.ApplicationFlags.FLAGS_NONE)
self.window = None
self.connect('activate', self.on_activate)
def on_activate(self, application):
self.window = MainWindow(application=application)
self.window.set_title('GTK4 Copy/Paste Crash Demo')
self.window.present()
class MainWindow(Gtk.ApplicationWindow):
def __init__(self, *args, **kwargs):
super(MainWindow, self).__init__(*args, **kwargs)
self.set_size_request(300, 200)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.set_child(box)
self.textBuffer = Gtk.TextBuffer()
self.textView = Gtk.TextView(buffer=self.textBuffer)
self.textView.set_cursor_visible(False)
self.textView.set_editable(False)
self.textView.set_size_request(300, 150)
box.append(self.textView)
text = '\nHighlight me, right-click, and Copy. Then, paste in the Gtk.Entry below\n'
self.textBuffer.insert(self.textBuffer.get_end_iter(), text)
entry = Gtk.Entry()
box.append(entry)
app = CopyPasteCrashDemo()
app.run(None)
```
## Version information
- GTK 4.8.3, built for Python (also seen with 4.6.4)
- Python 3.11.1 (also seen with 3.10.4)
- Win10 x64 20H2.7 (19042.2486)
- NVIDIA Quadro P2000
- gvsbuild build gtk4 hicolor-icon-theme adwaita-icon-theme pygobject --vs-ver=16 --enable-gi --py-wheel
## Warnings
```
**
Gdk:ERROR:../gdk/gdkpipeiostream.c:187:gdk_pipe_input_stream_read: code should not be reached
Bail out! Gdk:ERROR:../gdk/gdkpipeiostream.c:187:gdk_pipe_input_stream_read: code should not be reached
```
## Backtrace
Apologies, but I'm really not sure how to do this. I did read the wiki page, but it wasn't clear to me how to do any of that on Windows.https://gitlab.gnome.org/GNOME/gtk/-/issues/5467MSVC: Deadlock issue when calling gdk_win32_clipdrop_init2022-12-25T17:49:53ZWilliam Roywroy@proton.meMSVC: Deadlock issue when calling gdk_win32_clipdrop_initThere is a deadlock with Microsoft Visual C++ caused by(around) ~gdkclipdrop-win32.c:1613:
```cpp
win32_clipdrop->n_known_pixbuf_formats = 0;
for (rover = pixbuf_formats; rover != NULL; rover = rover->next)
{
char **mime_ty...There is a deadlock with Microsoft Visual C++ caused by(around) ~gdkclipdrop-win32.c:1613:
```cpp
win32_clipdrop->n_known_pixbuf_formats = 0;
for (rover = pixbuf_formats; rover != NULL; rover = rover->next)
{
char **mime_types =
gdk_pixbuf_format_get_mime_types ((GdkPixbufFormat *) rover->data);
char **mime_type;
for (mime_type = mime_types; *mime_type != NULL; mime_type++)
win32_clipdrop->n_known_pixbuf_formats++;
}
```
```
[External Code]
> [Inline Frame] glib-2.0-0.dll!g_async_queue_pop_intern_unlocked(_GAsyncQueue *) Line 425 C
glib-2.0-0.dll!g_async_queue_pop(_GAsyncQueue * queue) Line 459 C
gtk-4-1.dll!gdk_win32_clipdrop_init(_GdkWin32Clipdrop * win32_clipdrop) Line 1842 C
gobject-2.0-0.dll!g_type_create_instance(unsigned __int64 type) Line 2009 C
gobject-2.0-0.dll!g_object_new_internal(_GObjectClass * class, _GObjectConstructParam * params, unsigned int n_params) Line 2246 C
gobject-2.0-0.dll!g_object_new_with_properties(unsigned __int64 object_type, unsigned int n_properties, const char * * names, const _GValue * values) Line 2411 C
gobject-2.0-0.dll!g_object_new(unsigned __int64 object_type, const char * first_property_name, ...) Line 2062 C
gtk-4-1.dll!_gdk_win32_clipdrop_init() Line 1526 C
gtk-4-1.dll!_gdk_win32_surfaceing_init() Line 79 C
gobject-2.0-0.dll!type_class_init_Wm(_TypeNode * node, _GTypeClass * pclass) Line 2367 C
gobject-2.0-0.dll!g_type_class_ref(unsigned __int64 type) Line 3082 C
gobject-2.0-0.dll!g_object_new_with_properties(unsigned __int64 object_type, unsigned int n_properties, const char * * names, const _GValue * values) Line 2388 C
gobject-2.0-0.dll!g_object_new(unsigned __int64 object_type, const char * first_property_name, ...) Line 2062 C
gtk-4-1.dll!_gdk_win32_display_open(const char * display_name) Line 523 C
gtk-4-1.dll!gdk_display_manager_open_display(_GdkDisplayManager * manager, const char * name) Line 424 C
gtk-4-1.dll!gtk_init_check() Line 623 C
gtk-4-1.dll!gtk_init() Line 661 C
gtksourceview-5-0.dll!gtk_source_init() Line 191 C
[Inline Frame] gtksourceview-5-0.dll!_gtk_source_init_ctor() Line 256 C
gtksourceview-5-0.dll!_gtk_source_init_ctor_wrapper() Line 251 C
[External Code]
```
_This was initially stumbled upon with gtksourceview https://gitlab.gnome.org/GNOME/gtksourceview/-/commit/441ccc244c068124ea687f379fe6935e46fcdd2b revision_https://gitlab.gnome.org/GNOME/gtk/-/issues/5409GdkWin32: Overhaul surface freezing2022-12-05T17:02:52ZLuca Bacciluca.bacci@outlook.comGdkWin32: Overhaul surface freezinghttps://gitlab.gnome.org/GNOME/gtk/-/issues/5408GdkWin32: Override GdkFrameClockIdle GSource2023-07-09T15:53:51ZLuca Bacciluca.bacci@outlook.comGdkWin32: Override GdkFrameClockIdle GSourceThis is needed to support frame rates higher than 60hz.This is needed to support frame rates higher than 60hz.https://gitlab.gnome.org/GNOME/gtk/-/issues/5406GdkWin32: support multiple displays2022-12-05T16:53:56ZLuca Bacciluca.bacci@outlook.comGdkWin32: support multiple displayshttps://gitlab.gnome.org/GNOME/gtk/-/issues/5405GdkWin32: missing calls to gdk_surface_enter_monitor / leave_monitor2022-12-05T16:53:10ZLuca Bacciluca.bacci@outlook.comGdkWin32: missing calls to gdk_surface_enter_monitor / leave_monitorhttps://gitlab.gnome.org/GNOME/gtk/-/issues/5404GdkWin32: Implement inhibit_shortcuts with a low-level keyboard hook2022-12-05T16:48:59ZLuca Bacciluca.bacci@outlook.comGdkWin32: Implement inhibit_shortcuts with a low-level keyboard hook