We delete the faces for consideration in this loop but we can still
sometimes find an edge that connects to this face. We now interate over
all edges and disconnect edges connecting to this face.
This fixes#16560 and fixes#17569
(cherry picked from commit 33669a8bca)
When removing an item from a PopupMenu we need to update the control's
size cache otherwise the size of the PopupMenu itself lags behind by 1
item size. Meaning the PopupMenu will remain too large.
(cherry picked from commit 2d032c1562)
When processing items we may actually delete the item we're processing
in the callback for the signal. To avoid this, call the signal after
we're done processing the items. But before hiding the popupmenu itself.
Thanks to @reduz for writing the whole solution.
This fixes#19842
(cherry picked from commit fa7eac8a0d)
This fixes the editor on X11 not getting put on the foreground when a
debugged project hits an error or breakpoint.
(cherry picked from commit 827cadafc8)
There was a hardcoded exception to never reset caret blinking if Ctrl
(`command`) was pressed. This broke on Ctrl+arrows,
Ctrl+Home/End/PgUp/PgDn, Ctrl+C, Ctrl+V, Ctrl+Backspace and Ctrl+Delete.
Resetting blink only for those Ctrl operations that actually touch the
cursor somehow would clutter the code a lot, so I removed the check
entirely. That means we now also reset blinking on unrelated operations
like Ctrl+O, but that seems pretty harmless. I actually like the
additional bit of feedback even in that case (most of these will
immediately defocus the editor anyway, so you never see it).
Fixes#18100
(cherry picked from commit 44d761e55c)
Fixes thread and process handles leak when running and killing project
from editor (caused by a missing CloseHandle call) plus a potential leak
when calling OS_Windows::execute with p_blocking and !r_pipe.
The leak could be easily observed with a Handles counter in Task Manager
(or Performance Monitor) for the Godot editor process.
(cherry picked from commit b1e0da455b)
Note that gl_InstanceID is not supported in OpenGL ES 2.0,
so in the gles2 backend we assign it to 0.
Also clean up some duplicates/commented out code.
Fixes#20088.
(cherry picked from commit 00dfc9c8eb)
Fixes#20119 where newly installed templates were not detected.
Also fix a bug with preset deletion where it would attempt to
edit an already removed preset. For this I made it so that
ItemList::deselect_all() also resets `current` to -1, as a manual
ItemList::deselect(idx) already does.
(cherry picked from commit 13239cd4cc)
Draw scrollbar icons through their textures, rather than calling
directly to the server. Allows atlas textures to manipulate the source
rect as required.
(cherry picked from commit e51a94905d)
Initialised relevant variables before stating thread,
to prevent a branch on uninitialised data.
Fixed race condition in polling that could miss a device change.
(cherry picked from commit fe4265ad46)
When the viewport's size.y becomes lower than 2, the storage->frame.current_rt->effects.mip_maps[0].sizes Vector during rendering becomes empty, resulting in crashes in at least GLES3. This is a temporary fix to stop rendering a viewport when its size is below 2 rather than below 1.
(cherry picked from commit 892a4b175a)