mirror of
https://github.com/gryf/tabbedalt.git
synced 2026-08-20 10:01:54 +02:00
Update only selected properties, not all.
That should slightly decrease memory consumption.
This commit is contained in:
@@ -185,6 +185,10 @@
|
|||||||
# notifications.
|
# notifications.
|
||||||
# - removed call for configure() from places, which will call refresh() as in
|
# - removed call for configure() from places, which will call refresh() as in
|
||||||
# refresh() configure will be called anyway.
|
# refresh() configure will be called anyway.
|
||||||
|
#
|
||||||
|
# 2026-08-12 20:40:54
|
||||||
|
# - narrow down X properties which will be updated during tab_property_notify,
|
||||||
|
# which should slightly improve memory consumption.
|
||||||
|
|
||||||
use Scalar::Util;
|
use Scalar::Util;
|
||||||
|
|
||||||
@@ -822,8 +826,11 @@ sub tab_property_notify {
|
|||||||
return () unless $event->{window} == $tab->parent;
|
return () unless $event->{window} == $tab->parent;
|
||||||
return () unless $tab == $self->{cur};
|
return () unless $tab == $self->{cur};
|
||||||
|
|
||||||
# update only the changed property instead of all properties
|
# update only the changed selected property instead of all properties
|
||||||
my $atom = $event->{atom};
|
my $atom = $event->{atom};
|
||||||
|
my %allowed = map { $_ => 1 } qw(WM_NORMAL_HINTS _NET_WM_NAME WM_NAME);
|
||||||
|
return () unless ($allowed{$self->XGetAtomName($atom)});
|
||||||
|
|
||||||
my ($type, $format, $items) = $self->XGetWindowProperty ($tab->parent, $atom);
|
my ($type, $format, $items) = $self->XGetWindowProperty ($tab->parent, $atom);
|
||||||
|
|
||||||
my $wm_normal_hints = $self->XInternAtom ("WM_NORMAL_HINTS");
|
my $wm_normal_hints = $self->XInternAtom ("WM_NORMAL_HINTS");
|
||||||
|
|||||||
Reference in New Issue
Block a user