xshape: remove, nothing prove it's really useful
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
1df8bb7dec
commit
26738c4dab
|
@ -112,7 +112,7 @@ endif
|
|||
AM_CPPFLAGS = $(pangocairo_CFLAGS) $(AWESOME_CFLAGS) \
|
||||
$(GdkPixbuf_CFLAGS) $(GDK_CFLAGS) $(imlib2_CFLAGS) \
|
||||
$(xcb_CFLAGS) $(xcb_event_CFLAGS) \
|
||||
$(xcb_randr_CFLAGS) $(xcb_xinerama_CFLAGS) $(xcb_shape_CFLAGS) \
|
||||
$(xcb_randr_CFLAGS) $(xcb_xinerama_CFLAGS) \
|
||||
$(xcb_aux_CFLAGS) $(xcb_atom_CFLAGS) $(xcb_keysyms_CFLAGS) \
|
||||
$(xcb_icccm_CFLAGS) $(dbus_CFLAGS) $(Lua_CFLAGS)
|
||||
|
||||
|
@ -154,7 +154,7 @@ awesome_SOURCES = \
|
|||
awesome_SOURCES += $(LAYOUTS)
|
||||
awesome_SOURCES += $(WIDGETS)
|
||||
awesome_LDADD = $(pangocairo_LIBS) $(xcb_LIBS) $(xcb_event_LIBS) \
|
||||
$(xcb_randr_LIBS) $(xcb_xinerama_LIBS) $(xcb_shape_LIBS) $(xcb_aux_LIBS) \
|
||||
$(xcb_randr_LIBS) $(xcb_xinerama_LIBS) $(xcb_aux_LIBS) \
|
||||
$(xcb_atom_LIBS) $(xcb_keysyms_LIBS) $(xcb_icccm_LIBS) $(dbus_LIBS)\
|
||||
$(imlib2_LIBS) $(GdkPixbuf_LIBS) $(GDK_LIBS) $(Lua_LIBS) $(ev_LIBS)
|
||||
|
||||
|
|
11
awesome.c
11
awesome.c
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include <ev.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/shape.h>
|
||||
#include <xcb/randr.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
#include <xcb/xcb_atom.h>
|
||||
|
@ -290,7 +289,7 @@ main(int argc, char **argv)
|
|||
const char *confpath = NULL;
|
||||
int xfd, i, screen_nbr, opt;
|
||||
ssize_t cmdlen = 1;
|
||||
const xcb_query_extension_reply_t *shape_query, *randr_query;
|
||||
const xcb_query_extension_reply_t *randr_query;
|
||||
client_t *c;
|
||||
static struct option long_options[] =
|
||||
{
|
||||
|
@ -485,14 +484,6 @@ main(int argc, char **argv)
|
|||
set_unmap_notify_event_handler(globalconf.evenths, event_handle_unmapnotify, NULL);
|
||||
set_client_message_event_handler(globalconf.evenths, event_handle_clientmessage, NULL);
|
||||
|
||||
/* check for shape extension */
|
||||
shape_query = xcb_get_extension_data(globalconf.connection, &xcb_shape_id);
|
||||
if((globalconf.have_shape = shape_query->present))
|
||||
xcb_set_event_handler(globalconf.evenths,
|
||||
(shape_query->first_event + XCB_SHAPE_NOTIFY),
|
||||
(xcb_generic_event_handler_t) event_handle_shape,
|
||||
NULL);
|
||||
|
||||
/* check for randr extension */
|
||||
randr_query = xcb_get_extension_data(globalconf.connection, &xcb_randr_id);
|
||||
if((globalconf.have_randr = randr_query->present))
|
||||
|
|
8
client.c
8
client.c
|
@ -24,7 +24,6 @@
|
|||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
#include <xcb/xcb_atom.h>
|
||||
#include <xcb/shape.h>
|
||||
|
||||
#include "client.h"
|
||||
#include "tag.h"
|
||||
|
@ -389,13 +388,6 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen)
|
|||
xcb_change_window_attributes(globalconf.connection, w, XCB_CW_EVENT_MASK,
|
||||
select_input_val);
|
||||
|
||||
/* handle xshape */
|
||||
if(globalconf.have_shape)
|
||||
{
|
||||
xcb_shape_select_input(globalconf.connection, w, true);
|
||||
window_setshape(c->win, c->phys_screen);
|
||||
}
|
||||
|
||||
/* Push client in client list */
|
||||
client_list_push(&globalconf.clients, c);
|
||||
/* Append client in history: it'll be last. */
|
||||
|
|
|
@ -157,8 +157,6 @@ PKG_CHECK_MODULES([xcb_randr], [xcb-randr],,
|
|||
[AC_MSG_ERROR([awesome requires xcb-randr.])])
|
||||
PKG_CHECK_MODULES([xcb_xinerama], [xcb-xinerama],,
|
||||
[AC_MSG_ERROR([awesome requires xcb-xinerama.])])
|
||||
PKG_CHECK_MODULES([xcb_shape], [xcb-shape],,
|
||||
[AC_MSG_ERROR([awesome requires xcb-shape.])])
|
||||
PKG_CHECK_MODULES([xcb_aux], [xcb-aux],,
|
||||
[AC_MSG_ERROR([awesome requires xcb-aux.])])
|
||||
PKG_CHECK_MODULES([xcb_atom], [xcb-atom],,
|
||||
|
|
18
event.c
18
event.c
|
@ -567,24 +567,6 @@ event_handle_unmapnotify(void *data __attribute__ ((unused)),
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** The shape notify event handler.
|
||||
* \param data currently unused.
|
||||
* \param connection The connection to the X server.
|
||||
* \param ev The event.
|
||||
*/
|
||||
int
|
||||
event_handle_shape(void *data __attribute__ ((unused)),
|
||||
xcb_connection_t *connection __attribute__ ((unused)),
|
||||
xcb_shape_notify_event_t *ev)
|
||||
{
|
||||
client_t *c = client_getbywin(ev->affected_window);
|
||||
|
||||
if(c)
|
||||
window_setshape(c->win, c->phys_screen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** The randr screen change notify event handler.
|
||||
* \param data currently unused.
|
||||
* \param connection The connection to the X server.
|
||||
|
|
2
event.h
2
event.h
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/randr.h>
|
||||
#include <xcb/shape.h>
|
||||
|
||||
#define CLEANMASK(mask) (mask & ~(globalconf.numlockmask | XCB_MOD_MASK_LOCK))
|
||||
|
||||
|
@ -38,7 +37,6 @@ int event_handle_keypress(void *, xcb_connection_t *, xcb_key_press_event_t *);
|
|||
int event_handle_maprequest(void *, xcb_connection_t *, xcb_map_request_event_t *);
|
||||
int event_handle_propertynotify(void *, xcb_connection_t *, xcb_property_notify_event_t *);
|
||||
int event_handle_unmapnotify(void *, xcb_connection_t *, xcb_unmap_notify_event_t *);
|
||||
int event_handle_shape(void *, xcb_connection_t *, xcb_shape_notify_event_t *);
|
||||
int event_handle_randr_screen_change_notify(void *, xcb_connection_t *, xcb_randr_screen_change_notify_event_t *);
|
||||
int event_handle_clientmessage(void *, xcb_connection_t *, xcb_client_message_event_t *);
|
||||
|
||||
|
|
|
@ -407,8 +407,6 @@ struct awesome_t
|
|||
unsigned int shiftlockmask;
|
||||
/** Numlock mask */
|
||||
unsigned int capslockmask;
|
||||
/** Check for XShape extension */
|
||||
bool have_shape;
|
||||
/** Check for XRandR extension */
|
||||
bool have_randr;
|
||||
/** Cursors */
|
||||
|
|
22
window.c
22
window.c
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_atom.h>
|
||||
#include <xcb/shape.h>
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
|
||||
|
@ -216,27 +215,6 @@ window_root_ungrabkey(keybinding_t *k)
|
|||
&& phys_screen < globalconf.screens_info->nscreen);
|
||||
}
|
||||
|
||||
/** Set shape property on window.
|
||||
* \param win The window.
|
||||
* \param phys_screen Physical screen number.
|
||||
*/
|
||||
void
|
||||
window_setshape(xcb_window_t win, int phys_screen)
|
||||
{
|
||||
xcb_shape_query_extents_reply_t *r;
|
||||
|
||||
/* Logic to decide if we have a shaped window cribbed from fvwm-2.5.10. */
|
||||
if((r = xcb_shape_query_extents_reply(globalconf.connection,
|
||||
xcb_shape_query_extents_unchecked(globalconf.connection, win),
|
||||
NULL)) && r->bounding_shaped)
|
||||
xcb_shape_combine(globalconf.connection, XCB_SHAPE_SO_SET,
|
||||
XCB_SHAPE_SK_BOUNDING, XCB_SHAPE_SK_BOUNDING,
|
||||
xcb_aux_get_screen(globalconf.connection, phys_screen)->root,
|
||||
0, 0, win);
|
||||
|
||||
p_delete(&r);
|
||||
}
|
||||
|
||||
/** Set transparency of a window.
|
||||
* \param win The window.
|
||||
* \param opacity Opacity of the window, between 0 and 1.
|
||||
|
|
1
window.h
1
window.h
|
@ -31,7 +31,6 @@ void window_grabbuttons(xcb_window_t, xcb_window_t, button_t *);
|
|||
void window_root_grabbuttons(xcb_window_t);
|
||||
void window_root_grabkey(keybinding_t *);
|
||||
void window_root_ungrabkey(keybinding_t *);
|
||||
void window_setshape(xcb_window_t, int);
|
||||
void window_settrans(xcb_window_t, double);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue