Commit Graph

1812 Commits

Author SHA1 Message Date
Maxim Ganetsky
dd3855108a LCL-Gtk2: fixed window move/resize issues with Fly/Openbox window managers, patch by Artem Izmaylov, issue #40752
(cherry picked from commit d538fbd4f7)
2024-02-22 16:50:08 +03:00
Maxim Ganetsky
74d11fdff0 LCL-Gtk2: fixed handling of dragging image coordinates when it is dragged to non-client widget area, patch by Alexander (Rouse_) Bagel, issue #40658
(cherry picked from commit 1783ee35d1)
2023-12-25 18:48:29 +03:00
Maxim Ganetsky
faef2f1e7a LCL-Gtk2: fixed cursor changing when performing a dragging action, patch from Alexander (Rouse_) Bagel, issue #40651
(cherry picked from commit 4f7e9aee22)
2023-12-25 18:48:29 +03:00
Maxim Ganetsky
b5edb2f4a4 LCL-Gtk2: Ignore temporary windows (like dragging image) when selecting a target during Drag'n'Drop action. Patch by Alexander (Rouse_) Bagel, issue #40637.
(cherry picked from commit e2c8faccd9)
2023-12-25 18:48:28 +03:00
Juha
35b6751ce9 LCL-GTK2: Make TrayIcon more configurable based on libraries and features provided by a distro. Issue #40629, patch by dbannon.
(cherry picked from commit 425372ee74)
2023-12-06 02:51:44 +03:00
Maxim Ganetsky
a13572de2b LCL: Do not force-clear mouse capture flag on creation of TCustomEdit and TCustomComboBox, issue #40379.
Fixes text selection of TEdit and TComboBox on Gtk2 widgetset.

This effectively reverts the following commits:

Commit 27d0c29fb7 (introduced long time
ago to workaround Qt* widgetsets problems, which will be fixed
separately).

Commit e4494cf4cd (workaround for Gtk2
problems caused by the first one).

(cherry picked from commit 469e1318dd)
2023-12-05 20:45:14 +03:00
Maxim Ganetsky
688188fe5c LCL-Gtk2: Fix handling selection of simple listview in icon mode, issue #40563. Based on patch by Anton Kavalenka.
Actually it was a regression after
ed5ff63cf4.


(cherry picked from commit 1c3d963184)
2023-10-20 14:41:27 +00:00
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
wsherman
31b0b7bbaa
gtk2: fix resource leak (gtk_clipboard_wait_for_contents). Issue #40499
(cherry picked from commit 275ce9fdd8)
2023-09-10 16:22:06 +00:00
Bad Sector
bf97d69be3 LCL-GTK2: Fix double free due to wrong refcount during SaveDC/RestoreDC
CopyDataFrom copies the FPixmap field directly without updating
reference counts for the objects, which in some cases ends up attempting
to unref (in the TGtkDeviceContext destructor) an already freed object
(this can happen when, e.g., SaveDC/RestoreDC is called twice with the
same DC - in the first SaveDC/RestoreDC "pass", RestoreDC deletes the
FPixmap object during the saved context destruction and in the second
"pass" the object is already destroyed and the program crashes).

This patch fixes this by adding calls to ref/unref during CopyDataFrom
for the FPixmap.

(cherry picked from commit 5ecce8dc19)
2023-08-28 18:44:44 +03:00
mattias
0fcf3dcd1e lcl: gtk2: simplified unit dependencies 2023-08-25 12:41:37 +02:00
mattias
6f8815b3bb lcl: gtk2: simplified unit dependencies 2023-08-25 12:40:18 +02:00
mattias
de37ee0a8f lcl: gtk2: simplified unit dependencies 2023-08-25 12:34:07 +02:00
Željan Rikalo
0cc1dc98eb Gtk2: do not create dummy widget if WM name is empty, also reduce looping on slow systems. issue #40413
(cherry picked from commit e2f0b349f4)
2023-08-23 16:35:58 +03:00
mattias
d50619cdde updated makefiles 2023-08-17 09:23:17 +02:00
Juha
c3fcb2f746 LCL-GTK2: Allow right-to-left selection of long text in TEdit with mouse. Issue #40379, patch by wavebvg.
(cherry picked from commit e4494cf4cd)
2023-07-17 02:04:51 +03:00
Juha
0bc8523ddf Reduce compiler warnings.
(cherry picked from commit c3891ad820)
2023-07-03 16:39:15 +03:00
Juha
dcab9e2e9c LCL-GTK2: Improve the earlier ListView speedup. Issue #40302, patch by wavebvg. 2023-06-09 16:14:25 +03:00
Juha
d8e3c3f75e LCL-GTK2: Improve the earlier ListView speedup. Issue #40302, patch by wavebvg. 2023-06-09 11:43:40 +03:00
Juha
07398d821e LCL-GTK2: Improve the earlier ListView speedup. Issue #40302, patch by wavebvg. 2023-06-09 08:07:06 +03:00
Juha
ed5ff63cf4 LCL-GTK2: Speed up ListView a LOT. Issue #40302, patch by wavebvg. 2023-06-08 10:49:22 +03:00
m
14d60ce6a0 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
Juha
1475336c8c Remove LCLProc.OffsetRect(). Move some functions from LCLProc to GraphMath (LazUtils). 2023-06-05 15:48:01 +03:00
Martin
a135aee12a Gtk2: fix dangling pointer in TListView.Destroy. Issues #38954 #38332 2023-06-04 10:28:55 +02:00
rich2014
568a92fe1c Gtk2: Fix compliation on MacOS 2023-05-28 17:07:32 +08:00
Juha
db2bca3949 Support compiling more of Lazarus + its components with -Sy option. 2023-05-21 01:32:42 +03:00
ptvoinfo
d85002d862 Gtk2: Add theme support to DrawFocusRect
Paint a themed focus rectangle (color and width) with fallback to the default method.
2023-04-24 06:50:52 +03:00
ptvoinfo
5e18c56bba Gtk2: Rare memory leak fix.
It may appear on slow systems in some application. This fix makes memory managers with leak checking enabled happy.
2023-04-24 06:50:52 +03:00
mattias
01dbdf31c0 lcl: gtk2: comments 2023-03-21 15:52:00 +01:00
Juha
a927519165 LCL-GTK2: Fix clipboard paste endless wait. Merge request !141 by Bad Sector. 2023-03-11 13:07:48 +02:00
rich2014
0645aa9e7f Gtk2: fixed height of ide mainbar 2023-02-19 00:09:18 +08:00
Juha
8241d6c315 LCL-GTK2: A minor optimization. 2023-02-17 15:14:48 +02:00
Željan Rikalo
d195570688 Gtk2: fixed clientRect of TCustomForm with main menu. Patch by rich2014. issue #40071 2023-02-01 16:56:26 +01:00
Željan Rikalo
2ffedf7545 Gtk2: fixed TScrollBar.ScrollBy_WS error. Patch by Andrew Haines 2023-02-01 15:06:28 +01:00
Ondrej Pokorny
19662131eb gtk2: fix TDateEdit.MinDate and MaxDate XML issues 2023-01-02 10:48:13 +01:00
Michaël Van Canneyt
ce4a2bd696 * Fix make install target 2022-12-01 11:34:30 +01:00
Juha
77513c73bd LCL-GTK2: Fix crashes from dangling idle callbacks. Merge request !106 by Bad Sector. 2022-10-05 13:33:30 +03:00
Juha
5b2b222aa4 LCL-GTK2: Properly use PANGO_PIXELS macro instead of just integer divide. Issue #39938, patch by Anton Kavalenka. 2022-10-03 13:47:08 +03:00
Bart
404da33624 GTK2/GTK3: Document that TDateEdit.MinDate and MaxDate are not supported by the native Calendar. 2022-07-31 17:51:55 +02:00
Bart
8157c949be GTK2: Document that the native calendar does not support a MinDate or MaxDate. 2022-07-20 22:23:03 +02:00
Juha
f14b0fb03c LCL-GTK2 and LCL-GTK2: Allow OpenDialog Mime Filters. Issue #39790, patch by theo222. 2022-06-11 21:25:31 +03:00
Juha Manninen
6ae79c8197 Merge branch 'ayatana_multiuser' into 'main'
Systray on Unix needs to write user specific file to /tmp

See merge request freepascal.org/lazarus/lazarus!92
2022-05-17 11:50:17 +00:00
mattias
b2be620760 lcl: gtk2: send LM_ContextMenu to designer after mouse release 2022-05-07 07:05:01 +02:00
mattias
b3be9dea57 lcl: gtk2: send LM_ContextMenu to designer 2022-05-07 06:11:16 +02:00
David Bannon
bbcc02153f Systray on Unix needs to write user specific file to /tmp 2022-05-06 21:30:21 +10:00
Željan Rikalo
027cf2cec3 Gtk2: fixed maximized form without border, fixed brush initialization. Patches by Anton Kavalenka. issue #39702, issue #39722 2022-04-28 09:44:10 +02:00
Bad Sector
19d9c7a9b8 LCL-GTK2: Fix separator menu item height for when the ImageIndex is not -1. 2022-02-13 23:52:32 +00:00
Juha
75aebbee85 LCL: Consider that MemSize can return 0 with a custom MemoryManager. Merge request !27 by Sergey Larin. 2021-10-28 11:23:36 +03:00
Juha
99e4bd2515 LCL-GTK2: Use a new SysTray API by default. The old one fails to work in new Ubuntu versions + derivatives. Patch by dbannon. 2021-10-20 12:09:58 +03:00
Juha
30ba61883f LCL-GTK2: Fix TPopupMenu on 2 monitors aligned vertically. Issue #39422, patch by Alexey T. 2021-10-09 00:32:18 +03:00