Commit Graph

65 Commits

Author SHA1 Message Date
Uli Schlachter b64c989963 Stop using libxcb-property
libxcb-property will be dropped from xcb-utils in the next release, because
upstream thinks it's not really useful and well-designed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-08 16:45:56 +02:00
Julien Danjou 4f6667b56f property: remove unknown code
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:59 +02:00
Julien Danjou 220d072164 window: import class
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:27:42 +02:00
Ari Entlich 68b46c5bd2 Fix possible memory corruption (FS#734)
The memory referred to by the reply argument of
property_update_wm_protocols is automatically free'd
by xcb later on, so it is not safe to simply use the
value of reply in our own data structures. If we did
this, future calls to xcb_get_wm_protocols_reply_wipe
free the data which has already been free'd by xcb,
causing a double-free and corrupting the heap. In
addition, it isn't safe to use free'd memory as if
it is still allocated. Instead, duplicate the data
referred to by reply and use the duplicate instead.

It seems to me as if the duplication should actually
be done in xcb_get_wm_protocols_from_reply, but I'm
not really sure. If that is the case, this is simply
a work-around until xcb can be fixed.

Signed-off-by: Ari Entlich <atrigent@ccs.neu.edu>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-03-22 14:19:08 +01:00
Uli Schlachter becf3d514a property.c: Don't leave stuff on the lua stack
property_update_wm_hints() pushes the client but never pops it. This is a really
bad thing (tm).

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-02-09 19:46:32 +01:00
Julien Danjou 4daa5af04c globalconf: move prophs out
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 21:28:30 +01:00
Julien Danjou 3ce7638e0f window: rename to xwindow
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00
Julien Danjou e9ef51a521 wibox: move into objects
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00
Julien Danjou 6fa62a3029 widgets: move into objects
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00
Brian Gianforcaro c9ec34e61e Fix doxygen generation warnings
Signed-off-by: Brian Gianforcaro <b.gianfo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-26 09:15:57 +02:00
Julien Danjou f149a6a55d property: fix typo in wm_name and wm_icon_name prop handling
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 16:52:18 +02:00
Julien Danjou 1337129191 property: split _NET_WM_{ICON_,}NAME from WM_{ICON_,}NAME
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 16:39:10 +02:00
koniu 9d15c36b33 property: fix class/instance mixup
Without this patch c.class shows the instance and vice versa.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 09:47:07 +02:00
Uli Schlachter 2f1691e8db Fix HANDLE_TEXT_PROPERTY()
Instead of using the given atom name it always requested the WM_NAME property of
a client.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 21:58:06 +02:00
Julien Danjou 271063cc34 property: macrotify a bunch of handling functions
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 11:22:28 +02:00
Julien Danjou c862bf0534 property: use xcb_get_wm_protocols_from_reply
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 11:13:00 +02:00
Julien Danjou e5048f72d5 property: macrotify all text property retrieval
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 10:26:48 +02:00
Julien Danjou 8ec4f93a3a property: do not pop icon, client_set_icon does it
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-22 16:28:31 +02:00
Julien Danjou a6c0d9398e property: use provided reply to get machine
This avoid a roundtrip when getting a property change event.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-22 15:05:29 +02:00
Julien Danjou cf64b42d0d property: fix memory leak
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 23:30:19 +02:00
Julien Danjou a02d026f77 client: port to new object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 84839d456d wibox: port to new object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou a916f2cd55 image: port to new class system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 1cc50b8a29 luaobject: remove useless custom function
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:46 +02:00
Julien Danjou 71f24097c0 client: store _NET_WM_OPACITY
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-10 11:59:17 +02:00
Julien Danjou ab361ffe85 client: store WM_WINDOW_ROLE
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-10 11:53:45 +02:00
Julien Danjou 9394e9a852 client: store _NET_WM_PID
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-10 11:49:52 +02:00
Julien Danjou 0acb4aeff4 client: store WM_CLIENT_MACHINE
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-10 11:36:11 +02:00
Julien Danjou 13efd8a199 wibox: get rid of simple window
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 16:11:41 +02:00
Julien Danjou 367b3e03d5 property: fix index
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 14:11:16 +02:00
Julien Danjou 339fb53d56 luaobject: add and use item system
Now, each object can store items.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:29:30 +02:00
Brian Gianforcaro 404ec8eb24 Fix doxygen generation warnings.
Signed-off-by: Brian Gianforcaro <b.gianfo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-27 11:18:43 +02:00
Uli Schlachter f1b3583064 Add client_t::protocols
We now always know a client's WM_PROTOCOLS property without asking the X server.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-25 14:58:54 +02:00
Julien Danjou b811880c54 client: fix icon value on changes
Sometimes we unref the icon image, but we did not reset NULL, which
can make the client refering to a not-refed image.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-18 12:13:00 +02:00
Julien Danjou a8115bd45e luaobject: ref take index number as argument
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-16 17:15:20 +02:00
Uli Schlachter 0b93a6a6a8 swindow: cache the opacity
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-06-05 14:32:45 +02:00
Julien Danjou 3f6ab274c0 wibox: all wiboxes go into one and only one array
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:35 +02:00
Julien Danjou f4e77bcab9 luaa: rename and change hooks_property macro()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:04 +02:00
Julien Danjou daf7192868 property: fix bad deletion of reply (FS#502)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-21 08:46:48 +02:00
Julien Danjou 0b93186f09 property: make use of xcb_get_wm_class_from_reply() when possible
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-18 14:20:06 +02:00
Julien Danjou f473a107b0 cleanup #includes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-17 16:52:25 +02:00
Julien Danjou 486ef71a7f screen: replace screens pointer by a screen_t array
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-17 16:14:09 +02:00
Julien Danjou 5931bf752d wibox: use new Lua object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 541d4f565f image: use new object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +02:00
Uli Schlachter 95457c5ab7 Move the definition of globalconf into a header file
Pretty much every single source file needs this struct, so it makes sense to
define it in a common header instead of in every single .c file.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 16:32:42 +02:00
Julien Danjou 0d6d6c4fa7 client: store class and instance
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-04 13:54:51 +02:00
Maarten Maathuis cf16379778 client: allow special non-transient windows to be !above
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-28 14:38:15 +01:00
Julien Danjou 77075d7281 property: do not convert
We do not need to convert text unless we render them.
And textbox already convert.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-20 11:07:39 +01:00
Gregor Best 050a6bbb61 client: add client_seturgent() and remove urgent hint on focus
According to EWMH, the window manager is responsible for removing the
urgent state of a client. Also, this commit adds a new
client_seturgent(client_t *, bool) function to set the urgent state if
needed.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-11 19:04:09 +01:00
Maarten Maathuis 41b892291d client: implement client struts in the capi.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-08 13:21:20 +01:00