Comments (8)
Seems like signal_draw
doesn't emit and the margin doesn't update (from here).
And the signal doesn't emit because queue_draw()
from here doesn't work when the panel is entirely hidden.
from wf-shell.
Ah, I see. Wayfire doesn't send a wl_surface.frame_done (which would trigger signal_draw in gtk) event because the panel is fully hidden. That seems the correct behavior from Wayfire's side.
Based on the information you have provided, I have the feeling that the problem is when m_do_show()
executes, it sets the margin to y_position
which is animated from its fully hidden state to -1. So in the very first step, we update the margin to fully hidden .. and the next step is never reached, because the panel is hidden and never gets a frame done event. I guess the solution would be to animate the y_position
from max(fully-hidden position + 1, y_position.current_value)
to 0
(speaking in pseudo-code), do you mind trying this out to see how well it works?
from wf-shell.
Changing this line to y_position.animate(y_position + 1, 0);
doesn't work.
from wf-shell.
Inserting something like this:
margin_update = Glib::signal_timeout().connect(
[=] {
gtk_layer_set_margin(gobj(), GTK_LAYER_SHELL_EDGE_BOTTOM, y_position);
std::cout << y_position << std::endl;
return true;
}, 30);
into this constructor (margin_update
is a WayfireAutohidingWindow
member) also doesn't fix the thing. Margin is updated, but the panel is still invisible.
from wf-shell.
Does wayfire continue to draw/update a window after it is invisible/hidden once?
from wf-shell.
Changing this line to
y_position.animate(y_position + 1, 0);
doesn't work.
After a bit of digging in gtk-layer-shell I think I know what the problem is. set_margin
does not commit the wl_surface
, so Wayfire never sees that the panel has become visible. As a result, the panel never gets a wl_surface.frame
event, never renders, etc. I think that adding a wl_surface_commit()
call after setting the margin could work.
from wf-shell.
Changing this line to
y_position.animate(y_position + 1, 0);
doesn't work.After a bit of digging in gtk-layer-shell I think I know what the problem is.
set_margin
does not commit thewl_surface
, so Wayfire never sees that the panel has become visible. As a result, the panel never gets awl_surface.frame
event, never renders, etc. I think that adding awl_surface_commit()
call after setting the margin could work.
Adding wl_surface_commit(get_wl_surface())
makes it crash because this->get_window()
returns nullptr
because the window is "not released". With check if (get_window())
panel shows sometimes.
from wf-shell.
Adding
wl_surface_commit(get_wl_surface())
makes it crash becausethis->get_window()
returnsnullptr
because the window is "not released". With checkif (get_window())
panel shows sometimes.
That's a weird error. Perhaps we can store the wl_surface
in the constructor and skip the get_window()
call?
from wf-shell.
Related Issues (20)
- Add scroll on battery widget to change screen brightness HOT 3
- [Feature] Add panel separator as a widget HOT 1
- Volume Control - Launch a sound control manager app via right-click HOT 1
- make window-list height resizeable HOT 3
- volume control slider not in sync with mouse scroll HOT 1
- Windows doesn't go to right position when minimizing HOT 5
- can't use asbsolute path for command_output icons HOT 1
- Wf-backgroud crashes after disconnecting external monitor. HOT 8
- printf only partially works on command_output HOT 3
- Pressing super key for workspace overview opens menu on every workspace HOT 1
- subprojects/gvc outdated (5 years old) HOT 2
- panel crashes if problems with icons HOT 1
- Not showing WLAN interface on FreeBSD 14 HOT 1
- wf-panel doesn't seem to open certain apps HOT 10
- window-list high cpu usage when full
- latest commits change some expected panel behavior HOT 3
- default.css will not update to newer contents automatically
- Just a showcase
- Panel tray icon behaving unexpectedly (icon size animations) HOT 2
- moveable panel
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wf-shell.