惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Schneier on Security
罗磊的独立博客
Recorded Future
Recorded Future
Hacker News - Newest:
Hacker News - Newest: "LLM"
G
Google Developers Blog
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Know Your Adversary
Know Your Adversary
L
Lohrmann on Cybersecurity
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 三生石上(FineUI控件)
M
MIT News - Artificial intelligence
B
Blog
T
Tor Project blog
D
Docker
Engineering at Meta
Engineering at Meta
Apple Machine Learning Research
Apple Machine Learning Research
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Scott Helme
Scott Helme
MyScale Blog
MyScale Blog
量子位
T
The Exploit Database - CXSecurity.com
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
IT之家
IT之家
AWS News Blog
AWS News Blog
Google Online Security Blog
Google Online Security Blog
NISL@THU
NISL@THU
D
DataBreaches.Net
Help Net Security
Help Net Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Cloudbric
Cloudbric
美团技术团队
W
WeLiveSecurity
H
Hacker News: Front Page
宝玉的分享
宝玉的分享
The Cloudflare Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
N
News and Events Feed by Topic
V
Visual Studio Blog
C
CERT Recently Published Vulnerability Notes
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
B
Blog RSS Feed
S
Security Affairs

inkscape:windows_ci_14x commits

Update WIndows dependencies to r180 (995a0ec3) · Commits · René de Hesselle / inkscape · GitLab Fix Welcome dialog stacking up when run more than once (eab9c6d5) · Commits · René de Hesselle / inkscape · GitLab Edit label and tooltip for Preserve Shape setting (4c992ff3) · Commits · René de Hesselle / inkscape · GitLab Fix keyboard navigation in Objects dialog (38acd49e) · Commits · René de Hesselle / inkscape · GitLab update translations (9f8f2fec) · Commits · René de Hesselle / inkscape · GitLab Fix missing signal blocking in page toolbar (d5533a4b) · Commits · René de Hesselle / inkscape · GitLab Convert libuemf to a git submodule (22344d42) · Commits · René de Hesselle / inkscape · GitLab update translations (f5993d7c) · Commits · René de Hesselle / inkscape · GitLab update translations (fcd03438) · Commits · René de Hesselle / inkscape · GitLab Fix: request display update when removing child from group (6908c07a) · Commits · René de Hesselle / inkscape · GitLab Make po submodule shallow (90eced57) · Commits · René de Hesselle / inkscape · GitLab 1.4.3 (0d15f750) · Commits · René de Hesselle / inkscape · GitLab update translations (4d3a6d61) · Commits · René de Hesselle / inkscape · GitLab Update tutorials and man page for Inkscape 1.4.3 (excluding French) (bec26502) · Commits · René de Hesselle / inkscape · GitLab Add GioWin32-2.0.typelib to Windows (eb2146c6) · Commits · René de Hesselle / inkscape · GitLab Revert the backport of a fix causing regressions in textPath (7d1c0165) · Commits · René de Hesselle / inkscape · GitLab update translations (8a1e7745) · Commits · René de Hesselle / inkscape · GitLab Update Windows dependencies to r168 (9500139e) · Commits · René de Hesselle / inkscape · GitLab Build GraphicsMagick on Windows ourselves again (2ea69ea8) · Commits · René de Hesselle / inkscape · GitLab Prepare 1.4.3 (e2afff01) · Commits · René de Hesselle / inkscape · GitLab Update docs for 1.4.3rc (ea3d7619) · Commits · René de Hesselle / inkscape · GitLab Fix crash on MacOS when opening file by right clicking on file. (fe96d51c) · Commits · René de Hesselle / inkscape · GitLab Update macOS build pipeline to v0.82-2-g21f3e2d (56605ae7) · Commits · René de Hesselle / inkscape · GitLab Fix commands toolbar glitching at exact size (b8376295) · Commits · René de Hesselle / inkscape · GitLab Add commands toolbar to automatic toolbar policy (c37cea70) · Commits · René de Hesselle / inkscape · GitLab update translations (dfc0fde0) · Commits · René de Hesselle / inkscape · GitLab Fix welcome dialog graphics (8d76d570) · Commits · René de Hesselle / inkscape · GitLab Fix code getting items under cursor (441f5bfb) · Commits · René de Hesselle / inkscape · GitLab Make libdepixelize a submodule (09a2712d) · Commits · René de Hesselle / inkscape · GitLab Handle `xml:lang`/`lang` attribute updates (7fa5d668) · Commits · René de Hesselle / inkscape · GitLab Add missed 1.4.3 artwork (9d406cab) · Commits · René de Hesselle / inkscape · GitLab Set Pango context language to undetermined (bc80df21) · Commits · René de Hesselle / inkscape · GitLab Update macOS build pipeline to 0.82 (7348d729) · Commits · René de Hesselle / inkscape · GitLab Make popovers stay open on spinbutton activate (03c3f33d) · Commits · René de Hesselle / inkscape · GitLab Add 'webp' to the list of file formats that Inkscape can import on MacOS. (76e716a7) · Commits · René de Hesselle / inkscape · GitLab Fix crash in LPE path Parameters (ae36951b) · Commits · René de Hesselle / inkscape · GitLab Add 'jpg' and 'jpeg' to the list of file formats that Inkscape can import on MacOS. (81feda7b) · Commits · René de Hesselle / inkscape · GitLab Fix action accidentally marked for translation (a1a3cc5a) · Commits · René de Hesselle / inkscape · GitLab SPLPEItem: ref group objects before recursion (d8cf3584) · Commits · René de Hesselle / inkscape · GitLab
Batch updates to layer selector (5433ba34) · Commits · René de Hesselle / inkscape · GitLab
PBS · 2025-12-04 · via inkscape:windows_ci_14x commits
Commit 5433ba34 authored by PBS's avatar PBS Committed by Willy (Wen-Wei) Kao
Browse files

Batch updates to layer selector

The layer selector can receive a lot of unbatched updates from ObjectSet
during an ungroup. Coupled with Gtk::CssProvider::load_from_data()
usage, this is very slow. Limit updates to one per frame.

Robustify the lifecycle management of LayerSelector, by stopping _layer
dangling and detaching _observer properly.

Fixes inkscape/inkscape#5988
Original line number Diff line number Diff line
@@ -115,19 +115,25 @@ LayerSelector::LayerSelector(SPDesktop *desktop)
    Gtk::StyleContext::add_provider_for_screen(_layer_label.get_screen(), _label_style,
                                               GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);

    _observer->signal_changed().connect(sigc::mem_fun(*this, &LayerSelector::_layerModified));
    _observer->signal_changed().connect([this] { _queueUpdate(); });
    setDesktop(desktop);
}

LayerSelector::~LayerSelector() {
    setDesktop(nullptr);
}
LayerSelector::~LayerSelector() = default;

void LayerSelector::setDesktop(SPDesktop *desktop) {
    if ( desktop == _desktop )
void LayerSelector::setDesktop(SPDesktop *desktop)
{
    if (desktop == _desktop) {
        return;
    }

    if (_desktop) {
        _cancelUpdate();
        _layer_changed.disconnect();
        _layer = nullptr;
        _observer->set(nullptr);
    }

    _desktop = desktop;

    if (_desktop) {
@@ -143,7 +149,30 @@ void LayerSelector::_layerChanged(SPGroup *layer)
{
    _layer = layer;
    _observer->set(layer);
    _queueUpdate();
}

void LayerSelector::_queueUpdate()
{
    if (_tick_callback) {
        return;
    }

    _tick_callback = add_tick_callback([this] (Glib::RefPtr<Gdk::FrameClock> const &) {
        _layerModified();
        _tick_callback = 0;
        return false;
    });
}

void LayerSelector::_cancelUpdate()
{
    if (!_tick_callback) {
        return;
    }

    remove_tick_callback(_tick_callback);
    _tick_callback = 0;
}

/**
Original line number Diff line number Diff line
@@ -65,12 +65,16 @@ private:
    std::unique_ptr<Inkscape::XML::SignalObserver> _observer;

    void _layerChanged(SPGroup *layer);
    void _queueUpdate();
    void _cancelUpdate();
    void _layerModified();
    void _selectLayer();
    void _hideLayer();
    void _lockLayer();
    void _layerChoose();
    Glib::ustring getThisCssClass() const;

    unsigned _tick_callback = 0;
};

} // namespace Inkscape::UI::Widget