lazarus/lcl/interfaces/gtk2
Bad Sector b332764d30 LCL-GTK2: Fix double free in listview pixbuf due to wrong refcounting
The 'pixbuf' field in GtkCellRendererPixbuf is supposed to be private to
Gtk which handles refcounting itself, but LCL modifies it directly which
can cause refcounting mismatches, especially during the destruction of a
listview with icons (images are unref'd by both the listview destructor
and gtk itself).  Since it is exposed as a property it can be modified
using the g_object_set_property and g_value_xxx APIs which handle any
necessary refcounting, so this patch replaces the direct modification of
the pixbuf field with these APIs.  This fixes the crashes due to
refcounting mismatch.


(cherry picked from commit 6a5e16239a)
2023-10-20 14:01:36 +00:00
..
tests
alllclintfunits.pas
dragicons.inc
gtk2callback.inc LCL-GTK2: Allow right-to-left selection of long text in TEdit with mouse. Issue #40379, patch by wavebvg. 2023-07-17 02:04:51 +03:00
gtk2cellrenderer.pas lcl: gtk2: simplified unit dependencies 2023-08-25 12:34:07 +02:00
gtk2debug.pp
gtk2def.pp Gtk2: fix wrong ClientRect. LCL may cache ClientRect, invalidate the cache if the correct Rect was not available. Fix Issue #40284 "wrong main bar height" 2023-06-06 14:20:37 +02:00
gtk2defines.inc
gtk2devicecontext.inc LCL-GTK2: Fix double free due to wrong refcount during SaveDC/RestoreDC 2023-08-28 18:44:44 +03:00
gtk2disableliboverlay.pas
gtk2extra.inc
gtk2extra.pp
gtk2extrah.inc
gtk2fontcache.pas LazUtils: Move math helper functions from LCLProc to LazUtilities. Deprecate LCLProc versions. 2020-12-12 11:41:07 +00:00
gtk2globals.pp New InputManager code for gtk2 / Experimental / Issue #38730 / Patch by Do-wan Kim 2021-06-05 22:29:27 +00:00
gtk2int.pas lcl: gtk2: fixed typo 2021-05-10 13:38:43 +00:00
gtk2lclintf.inc Reduce compiler warnings. 2023-07-03 16:39:15 +03:00
gtk2lclintfh.inc LCL: Remove deprecated function FontCanUTF8. All widgetsets returned True, including GTK(2) and QT(5). Not implementing it caused bugs. 2019-12-20 17:45:44 +00:00
gtk2listsl.inc LCL: Revert some optimizations with TStringListUTF8Fast. It must not be used when locale based sort order is needed. Issue #38612. 2021-03-11 18:03:35 +00:00
gtk2listslh.inc
gtk2listviewtreemodel.pas Support compiling more of Lazarus + its components with -Sy option. 2023-05-21 01:32:42 +03:00
gtk2memostrings.inc LCL, fix first typed character in dbmemo under GTK, issue #37123 2021-01-31 20:25:46 +00:00
gtk2msgqueue.pp Gtk2: Rare memory leak fix. 2023-04-24 06:50:52 +03:00
gtk2pagecontrol.inc Reduce compiler warnings. 2023-07-03 16:39:15 +03:00
gtk2privatelist.inc lcl: gtk2: simplified unit dependencies 2023-08-25 12:41:37 +02:00
gtk2privatewidget.inc
gtk2proc.inc gtk2: fix resource leak (gtk_clipboard_wait_for_contents). Issue #40499 2023-09-10 16:22:06 +00:00
gtk2proc.pp lcl: gtk2: simplified unit dependencies 2023-08-25 12:34:07 +02:00
gtk2stdpixmaps.inc Support compiling more of Lazarus + its components with -Sy option. 2023-05-21 01:32:42 +03:00
gtk2themes.pas lcl: gtk2: simplified unit dependencies 2023-08-25 12:34:07 +02:00
gtk2trayicon.inc Support compiling more of Lazarus + its components with -Sy option. 2023-05-21 01:32:42 +03:00
gtk2widgetset.inc Gtk2: do not create dummy widget if WM name is empty, also reduce looping on slow systems. issue #40413 2023-08-23 16:35:58 +03:00
gtk2winapi.inc Reduce compiler warnings. 2023-07-03 16:39:15 +03:00
gtk2winapih.inc
gtk2winapiwindow.pp LCL-GTK2: Remove a boolean param from GetWidgetInfo and use new func GetOrCreateWidgetInfo. Identify memory leaks. 2019-08-11 17:15:48 +00:00
gtk2windows.pas
gtk2wsbuttons.pp lcl: gtk2: simplified unit dependencies 2023-08-25 12:34:07 +02:00
gtk2wscalendar.pp LCL: less hints 2021-02-28 08:51:17 +00:00
gtk2wschecklst.pp lcl: gtk2: simplified unit dependencies 2023-08-25 12:34:07 +02:00
gtk2wscomctrls.pp lcl: gtk2: simplified unit dependencies 2023-08-25 12:40:18 +02:00
gtk2wscontrols.pp lcl: gtk2: simplified unit dependencies 2023-08-25 12:41:37 +02:00
gtk2wscustomlistview.inc LCL-GTK2: Fix double free in listview pixbuf due to wrong refcounting 2023-10-20 14:01:36 +00:00
gtk2wscustommemo.inc LCL-GTK2: Fix SpeedButton freeze after closing system popup menu without choosing menu item. Issue #38402, patch from Andrzej Kilijanski. 2021-01-28 08:19:11 +00:00
gtk2wsdialogs.pp LCL-GTK2 and LCL-GTK2: Allow OpenDialog Mime Filters. Issue #39790, patch by theo222. 2022-06-11 21:25:31 +03:00
gtk2wsextctrls.pp LCL-GTK2: Allow changing BorderStyle of TPanel at runtime. Issue #36634, patch from CudaText man. 2020-01-29 22:40:40 +00:00
gtk2wsextdlgs.pp
gtk2wsfactory.pas lcl: gtk2: simplified unit dependencies 2023-08-25 12:41:37 +02:00
gtk2wsforms.pp Gtk2: fixed clientRect of TCustomForm with main menu. Patch by rich2014. issue #40071 2023-02-01 16:56:26 +01:00
gtk2wsgrids.pp
gtk2wsimglist.pp
gtk2wsmenus.pp LCL-GTK2: Fix separator menu item height for when the ImageIndex is not -1. 2022-02-13 23:52:32 +00:00
gtk2wspairsplitter.pp
gtk2wsprivate.pp lcl: gtk2: simplified unit dependencies 2023-08-25 12:41:37 +02:00
gtk2wsspin.pp GTK2: add WSCheckHandleAllocated() in TGtk2WSCustomFloatSpinEdit.SetEditorEnabled. 2021-04-17 20:11:45 +00:00
gtk2wsstdctrls.pp lcl: gtk2: simplified unit dependencies 2023-08-25 12:34:07 +02:00
interfaces.pas
issues.xml gtk2: fix TDateEdit.MinDate and MaxDate XML issues 2023-01-02 10:48:13 +01:00
Makefile updated makefiles 2023-08-17 09:23:17 +02:00
Makefile.compiled Makefile, LCL: fix path for freetype 2021-07-08 11:21:25 +00:00
Makefile.fpc updated makefiles 2023-08-17 09:23:17 +02:00
README.txt
TODOS.txt
unitywsctrls.pas Systray on Unix needs to write user specific file to /tmp 2022-05-06 21:30:21 +10:00

The gtk2 interface for lazarus
==============================

The gtk2 interface for lazarus is a descendant of the gtk interface. It is not
yet complete. For those who want to help us here are some hints:

With fpc 1.9.7 the gtk2 bindings are included, so forget the packages.

To compile the gtk2 interface just set
Tools -> Configure Build Lazarus -> LCL interface to 'gtk2'

Creating a test project:

Create a new lazarus application. This project will be used to test the gtk2
interface and to store all configuration steps.
Then open the compiler options and set as widget type 'gtk2'.