banning: remove passive refresh support (FS#629)
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
890e15fa19
commit
058dbab828
18
banning.c
18
banning.c
|
@ -22,14 +22,13 @@
|
||||||
#include "banning.h"
|
#include "banning.h"
|
||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "screen.h"
|
|
||||||
#include "titlebar.h"
|
#include "titlebar.h"
|
||||||
|
|
||||||
/** Reban windows following current selected tags.
|
/** Reban windows following current selected tags.
|
||||||
* \param screen The screen to arrange.
|
* \param screen The screen to arrange.
|
||||||
*/
|
*/
|
||||||
static void
|
void
|
||||||
reban(screen_t *screen)
|
banning_refresh(screen_t *screen)
|
||||||
{
|
{
|
||||||
client_ignore_enterleave_events();
|
client_ignore_enterleave_events();
|
||||||
|
|
||||||
|
@ -60,19 +59,6 @@ reban(screen_t *screen)
|
||||||
}
|
}
|
||||||
|
|
||||||
client_restore_enterleave_events();
|
client_restore_enterleave_events();
|
||||||
|
|
||||||
screen->need_reban = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Refresh the client disposition.
|
|
||||||
* \return true if the screen was arranged, false otherwise
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
banning_refresh(void)
|
|
||||||
{
|
|
||||||
foreach(screen, globalconf.screens)
|
|
||||||
if(screen->need_reban)
|
|
||||||
reban(screen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
#ifndef AWESOME_BANNING_H
|
#ifndef AWESOME_BANNING_H
|
||||||
#define AWESOME_BANNING_H
|
#define AWESOME_BANNING_H
|
||||||
|
|
||||||
void banning_refresh(void);
|
#include "globalconf.h"
|
||||||
|
|
||||||
|
void banning_refresh(screen_t *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
6
client.h
6
client.h
|
@ -26,6 +26,7 @@
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
#include "strut.h"
|
#include "strut.h"
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
|
#include "banning.h"
|
||||||
#include "common/luaobject.h"
|
#include "common/luaobject.h"
|
||||||
|
|
||||||
#define CLIENT_SELECT_INPUT_EVENT_MASK (XCB_EVENT_MASK_STRUCTURE_NOTIFY \
|
#define CLIENT_SELECT_INPUT_EVENT_MASK (XCB_EVENT_MASK_STRUCTURE_NOTIFY \
|
||||||
|
@ -161,9 +162,8 @@ LUA_OBJECT_FUNCS(client_class, client_t, client)
|
||||||
|
|
||||||
#define client_need_reban(c) \
|
#define client_need_reban(c) \
|
||||||
do { \
|
do { \
|
||||||
if(!c->screen->need_reban \
|
if(client_isvisible(c, (c)->screen)) \
|
||||||
&& client_isvisible(c, (c)->screen)) \
|
banning_refresh((c)->screen); \
|
||||||
c->screen->need_reban = true; \
|
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
bool client_maybevisible(client_t *, screen_t *);
|
bool client_maybevisible(client_t *, screen_t *);
|
||||||
|
|
2
event.h
2
event.h
|
@ -23,13 +23,11 @@
|
||||||
#define AWESOME_EVENT_H
|
#define AWESOME_EVENT_H
|
||||||
|
|
||||||
#include "wibox.h"
|
#include "wibox.h"
|
||||||
#include "banning.h"
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
awesome_refresh(void)
|
awesome_refresh(void)
|
||||||
{
|
{
|
||||||
banning_refresh();
|
|
||||||
wibox_refresh();
|
wibox_refresh();
|
||||||
client_stack_refresh();
|
client_stack_refresh();
|
||||||
return xcb_flush(globalconf.connection);
|
return xcb_flush(globalconf.connection);
|
||||||
|
|
2
screen.h
2
screen.h
|
@ -29,8 +29,6 @@ struct a_screen
|
||||||
{
|
{
|
||||||
/** Screen geometry */
|
/** Screen geometry */
|
||||||
area_t geometry;
|
area_t geometry;
|
||||||
/** True if we need to reban() */
|
|
||||||
bool need_reban;
|
|
||||||
/** Tag list */
|
/** Tag list */
|
||||||
tag_array_t tags;
|
tag_array_t tags;
|
||||||
/** Window that contains the systray */
|
/** Window that contains the systray */
|
||||||
|
|
13
tag.c
13
tag.c
|
@ -66,12 +66,6 @@ luaA_tag_gc(lua_State *L)
|
||||||
OBJECT_EXPORT_PROPERTY(tag, tag_t, selected)
|
OBJECT_EXPORT_PROPERTY(tag, tag_t, selected)
|
||||||
OBJECT_EXPORT_PROPERTY(tag, tag_t, name)
|
OBJECT_EXPORT_PROPERTY(tag, tag_t, name)
|
||||||
|
|
||||||
void
|
|
||||||
tag_set_screen(tag_t *tag, screen_t *s)
|
|
||||||
{
|
|
||||||
tag->screen = s;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** View or unview a tag.
|
/** View or unview a tag.
|
||||||
* \param L The Lua VM state.
|
* \param L The Lua VM state.
|
||||||
* \param udx The index of the tag on the stack.
|
* \param udx The index of the tag on the stack.
|
||||||
|
@ -91,7 +85,7 @@ tag_view(lua_State *L, int udx, bool view)
|
||||||
{
|
{
|
||||||
int screen_index = screen_array_indexof(&globalconf.screens, tag->screen);
|
int screen_index = screen_array_indexof(&globalconf.screens, tag->screen);
|
||||||
|
|
||||||
tag->screen->need_reban = true;
|
banning_refresh(tag->screen);
|
||||||
|
|
||||||
ewmh_update_net_current_desktop(screen_virttophys(screen_index));
|
ewmh_update_net_current_desktop(screen_virttophys(screen_index));
|
||||||
|
|
||||||
|
@ -171,6 +165,11 @@ tag_remove_from_screen(tag_t *tag)
|
||||||
tag_array_take(tags, i);
|
tag_array_take(tags, i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* tag was selected? If so, reban */
|
||||||
|
if(tag->selected)
|
||||||
|
banning_refresh(tag->screen);
|
||||||
|
|
||||||
ewmh_update_net_numbers_of_desktop(phys_screen);
|
ewmh_update_net_numbers_of_desktop(phys_screen);
|
||||||
ewmh_update_net_desktop_names(phys_screen);
|
ewmh_update_net_desktop_names(phys_screen);
|
||||||
ewmh_update_workarea(phys_screen);
|
ewmh_update_workarea(phys_screen);
|
||||||
|
|
Loading…
Reference in New Issue