Giter Site home page Giter Site logo

Comments (7)

damianatorrpm avatar damianatorrpm commented on July 3, 2024

Related, gtk4 removed signal size allocate altogether:
https://developer.gnome.org/gtk4/stable/ch40s02.html "Adapt to GtkWidget’s size allocation changes"

from wf-shell.

ammen99 avatar ammen99 commented on July 3, 2024

If you add a debug log inside the lamda (which resets wm struts) you will see that it gets called (when size is normal)
a few dozen times per second while you move the mouse over window-list.

Seems like we should cache the last requested size and recreate the wm struts only if the new size is different than the previous one.

from wf-shell.

damianatorrpm avatar damianatorrpm commented on July 3, 2024

I believe the resize signal (have to check if that's in gtk3, mentioned in the link) would fix this but I have to try it yet

from wf-shell.

ammen99 avatar ammen99 commented on July 3, 2024

That would be even better indeed

from wf-shell.

damianatorrpm avatar damianatorrpm commented on July 3, 2024

btw, meanwhile I have found an easy fix for gtk3 instead of putting widgets in a scolled window put the whole panel_box in a scrolled view. Behaviour would be slightly different but no 5% cpu utilization

from wf-shell.

ammen99 avatar ammen99 commented on July 3, 2024

Hey, that's a good idea, it would also solve the problem in the cases where the widgets themselves are too many. Do you have a PR which you can send? :)

from wf-shell.

damianatorrpm avatar damianatorrpm commented on July 3, 2024

My codebase is way too different and when I'm finished I will focus on PR'ing something for wayfire,
bug fixes where I can etc. I wanted to share my solution though :)

The only thing that's comprable is that it can take gtk widget into a box and uses the wf-shell for autohiding :)
(e.g I don't used preffered size for panel, but fixed)

But the changes are not many, remove scrolled_window from window list and wrap the panel box into a scrolled window.
additionally I find it better that the scollbars are always visible, although a problem there is that the scroll direction
is implicitly vertical when you are over the content, so gtk forces you to hover the scrollbar to hover. (for horizontal panels)

// TODO: vertical bug, button size is panel width and non overlay adds size of scrollbar
  if (panel->is_horizontal) 
    panel->scrolled_window.set_overlay_scrolling(FALSE);

from wf-shell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.