Comments (4)
Make sure the platform is X11 and not Wayland.
If it works with another WM, such as flwm or Xfce, you might ask @awesomeWM guys.
from xsuspender.
Yes, you can run the example with G_MESSAGES_DEBUG=all xsuspender
to obtain a more verbose output.
We use this to subscribe to window change events:
Lines 16 to 19 in a26b7e7
Lines 80 to 90 in a26b7e7
Lines 59 to 76 in a26b7e7
Anything strike you as odd?
from xsuspender.
Thanks for replying so quickly!
I added some debug prints and reran the program. It seems that on_active_window_changed()
only gets entered once at the start of the program--and that's even without changing the active window (why is that?). Clicking around windows, minimising and maximising windows and switching virtual desktops back and forth did not trigger this function again.
$ G_MESSAGES_DEBUG=all ./src/xsuspender
(xsuspender:128842): xsuspender-DEBUG: 22:29:07.244: Initializing@@@@@@@@.
(xsuspender:128842): xsuspender-DEBUG: 22:29:07.246:
needle_wm_class = (null)
needle_wm_class_group = Pavucontrol
needle_wm_name = (null)
delay = 5
resume_every = 0
resume_for = 1
only_on_battery = 0
send_signals = 1
subtree_pattern = .
downclock_on_battery = 0
exec_suspend = (null)
exec_resume = (null)
(xsuspender:128842): xsuspender-DEBUG: 22:29:07.246: 8888888 wnck_screen_get_default():
(xsuspender:128842): xsuspender-DEBUG: 22:29:07.246: s+\xe8\xf7U
(xsuspender:128842): xsuspender-DEBUG: 22:29:07.246: s+\xe8\xf7U
(xsuspender:128842): xsuspender-DEBUG: 22:29:07.246: @@@@@@ screen 0 found
(xsuspender:128842): xsuspender-DEBUG: 22:29:07.309: 1111 entered on_active_window_changed()
(xsuspender:128842): xsuspender-DEBUG: 22:29:07.309: 55555 entered windows_are_same_process()
(xsuspender:128842): xsuspender-DEBUG: 22:29:07.309: 222222 windows_are_same_process() evaluated to true
(xsuspender:128842): xsuspender-DEBUG: 22:29:17.144: AC power = 0; State changed. Suspending/resuming windows.
(xsuspender:128842): xsuspender-DEBUG: 22:29:18.144: kill -STOP 104986
(xsuspender:128842): xsuspender-DEBUG: 22:29:18.144: Exec: pstree 104986 (.) | kill -STOP
(xsuspender:128842): xsuspender-DEBUG: 22:29:18.145: kill -STOP 104986
^C(xsuspender:128842): xsuspender-DEBUG: 22:29:24.653: Exiting ...
(xsuspender:128842): xsuspender-DEBUG: 22:29:24.655: kill -CONT 104986
(xsuspender:128842): xsuspender-DEBUG: 22:29:24.656: Exec: pstree 104986 (.) | kill -CONT
(xsuspender:128842): xsuspender-DEBUG: 22:29:24.656: kill -CONT 104986
(xsuspender:128842): xsuspender-DEBUG: 22:29:24.666: Bye.
I thought that maybe this line could be the cause:
WnckScreen *screen = wnck_screen_get_default ();
because I have 2 screens, so I thought maybe it's connecting to the other screen than the one I am using. But I disabled 1 screen (via xrandr), and verified with the debug prints that only 1 screen is detected in xsuspender, yet the bug still manifested with the same behaviour.
Any ideas what else I could try? I see 2 issues:
- Signal doesn't trigger
on_active_window_changed()
when I click around different windows - Why the heck is
on_active_window_changed()
executing that one time? It shouldn't because I have a terminal window open where I type inxsuspender
and don't switch to another window. This is mighty suspicious. Just a mereg_signal_connect()
call should not trigger the callback: only a signal can.
from xsuspender.
Related Issues (20)
- Will xsuspender work with xwayland layers? HOT 1
- Create AUR Pkg HOT 6
- Link fails with gcc 10 HOT 2
- Ubuntu official repository HOT 4
- Setting max CPU consumption HOT 3
- libwnck not found in OpenSuSE Leap 15.2 HOT 2
- Mouse battery messing it up? HOT 1
- Better config examples HOT 1
- Add default configuration for more apps
- bug in the docs
- AUR package does not update automatically HOT 2
- Update dependecies for libwnck
- debian release signature invalid HOT 4
- xsuspender confused by additional entry in `/sys/class/power_supply` HOT 2
- apt update: E: The repository 'http://download.opensuse.org/repositories/home:/kernc:/xsuspender/xUbuntu_22.04 Release' no longer has a Release file. HOT 2
- downclock_on_battery=0 🤔 HOT 1
- uninstalling borked my apt and nala on Kubuntu 22.04 HOT 2
- I made a Windows alternative with python
- Won't suspend app "closed" to systray
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 xsuspender.