This goes 2 ways: we might want to update _NET_WM_STATE_DEMANDS_ATTENTION when the activity flag is updated, but also we might want to update the activity flag when an application sets _NET_WM_STATE_DEMANDS_ATTENTION .
The former is pretty easy, preliminary patch attached to extend and expose the netwm update_state method. With this change the following lua script can implement the behavior:
notioncore.get_hook('region_notify_hook'):add(
function(reg, how)
if "activity"==how and obj_is(reg, "WClientWin") then
notioncore.update_net_state(reg)
end
end
)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This goes 2 ways: we might want to update _NET_WM_STATE_DEMANDS_ATTENTION when the activity flag is updated, but also we might want to update the activity flag when an application sets _NET_WM_STATE_DEMANDS_ATTENTION .
The former is pretty easy, preliminary patch attached to extend and expose the netwm update_state method. With this change the following lua script can implement the behavior:
notioncore.get_hook('region_notify_hook'):add(
function(reg, how)
if "activity"==how and obj_is(reg, "WClientWin") then
notioncore.update_net_state(reg)
end
end
)
extend and expose the netwm update_state method