mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
51e4a47938
This commit changes the systray widget, wibox.drawable and the C code to fix the following bug: When the systray widget is removed from a drawable without being moved somewhere else, the systray stayed visible. This was because the systray is not drawn by awesome, but only placed. When the widget is no longer "drawn", it stays wherever it was placed last. This change works by detecting the situation when the systray is removed. Then, the C code is specifically told to remove the systray window from the drawable. Note that this is only a partial fix. This change works correctly when the widget is removed completely, because it is no longer placed by its parent widget. However, for example, when you do wibox.widget.systray().visible = false, the effect is just that the systray widget gets size 0x0. This is not really visible, but as far as this change is concerned, the widget is still part of the drawable. Signed-off-by: Uli Schlachter <psychon@znc.in>
58 lines
1.7 KiB
C
58 lines
1.7 KiB
C
/*
|
|
* drawin.h - drawin functions header
|
|
*
|
|
* Copyright © 2007-2009 Julien Danjou <julien@danjou.info>
|
|
* Copyright © 2010 Uli Schlachter <psychon@znc.in>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*
|
|
*/
|
|
|
|
#ifndef AWESOME_OBJECTS_DRAWIN_H
|
|
#define AWESOME_OBJECTS_DRAWIN_H
|
|
|
|
#include "objects/window.h"
|
|
#include "objects/drawable.h"
|
|
|
|
/** Drawin type */
|
|
struct drawin_t
|
|
{
|
|
WINDOW_OBJECT_HEADER
|
|
/** Ontop */
|
|
bool ontop;
|
|
/** Visible */
|
|
bool visible;
|
|
/** Cursor */
|
|
char *cursor;
|
|
/** The drawable for this drawin. */
|
|
drawable_t *drawable;
|
|
/** The window geometry. */
|
|
area_t geometry;
|
|
/** Do we have a pending geometry change that still needs to be applied? */
|
|
bool geometry_dirty;
|
|
};
|
|
|
|
ARRAY_FUNCS(drawin_t *, drawin, DO_NOTHING)
|
|
|
|
drawin_t * drawin_getbywin(xcb_window_t);
|
|
void drawin_refresh_pixmap_partial(drawin_t *, int16_t, int16_t, uint16_t, uint16_t);
|
|
void luaA_drawin_systray_kickout(lua_State *);
|
|
|
|
void drawin_class_setup(lua_State *);
|
|
|
|
lua_class_t drawin_class;
|
|
|
|
#endif
|
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|