Commit Graph

546 Commits

Author SHA1 Message Date
Uli Schlachter 2354c6a623 Signal config errors via a naughty popup
If loading of any config file fails, awesome will now remember the error message
and make it available to lua. The default config is modified to open a naughty
popup on errors.

This should help all those people who modify their config and then wonder why
there change is ignored, not noticing awesome's error message on stderr.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-23 17:36:19 +02:00
Uli Schlachter bf76b3842b Ungrab the server before parsing the config
This moves the loading of the rc.lua and managing of pre-existing clients to
after we ungrab the server during startup. To make sure we have no races with
clients which start up parallel to awesome, we do the QueryTree for all the
clients that we have to manage before the ungrab, but start managing the clients
only after the ungrab.

This means that we have already selected our event mask on the root window in
scan() and thus received an UnmapNotify event when we reparent windows into a
frame window. This has the effect that we immediately unmanage the client again,
whoops.

To fix this, we grab the server again and remove our event mask on the root
window again while we reparent.

This should hopefully fix all cases where we deadlock during startup because
pulseaudio wants to talk to the X server, but is being ignored because we have
the server grabbed while at the same time we are waiting for pulseaudio.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-19 15:11:11 +02:00
Uli Schlachter 1801a8be46 Add a define for the root window's event mask
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-19 15:08:54 +02:00
Gregor Best c2ea920ca0 remove encoding=utf-8 from modelines
This option is no longer valid in modelines, so it has been removed from
all modelines using the following shellscript:

    #!/bin/ksh

    git ls-tree -r HEAD | cut -f2 | while read f; do
        egrep -e '^(//|--) vim: .*encoding=' $f >/dev/null || continue
        sed -E -e '/^(\/\/|--) vim:/s/:encoding=utf-8//' $f > /tmp/foo
        mv /tmp/foo $f
    done

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-11 17:34:09 +02:00
Arnaud Fontaine be7fda45d8 Update the code following release of xcb-util 0.3.8.
xcb-util is now split into several repositories since 0.3.8. This
release also cleaned up the API a lot, thus update the code
accordingly.

Signed-off-by: Arnaud Fontaine <arnau@debian.org>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-10 18:27:39 +02:00
Uli Schlachter 10186a7a29 "Handle" events during startup (FS#877)
awesome.c contains this comment:

    There can be no events yet, so if his function returns something, it must be
    an error.

Sadly, this wasn't true. It seems like something managed to generate
MappingNotify events (no idea how).

Fix this by discarding all pending events after our GrabServer, but before we
ask for SubstructureRedirect on the root window.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-10 14:28:34 +02:00
Chris Newton 471babcc70 Added a flag to the exit signal
This boolean can be used to differentiate between restarts and exits.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-21 07:41:41 +01:00
Uli Schlachter 4ee86fc5e4 Make ./awesome -a work
Some time ago I added a --no-argb option with the short-hand version -a.
However, the short version didn't actually work. Whoops!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-19 20:02:41 +01:00
Uli Schlachter 7898cc7de7 Properly die when the X server dies
When the X connection breaks for whatever reason, awesome wouldn't properly
exit, but go into a busy loop instead. Fix this by dying when our connection to
the X server dies.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-11-13 22:29:05 +01:00
Uli Schlachter c7da695e10 Use the screen's default visual by default again
Seems like there are enough bugs in the X server that one can't really use a 32
bit visual. Looks of repaint errors. :(

This should somehow be fixed properly before release. For now, this just swaps
the default behavior and the "--no-argb" behavior.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-21 18:18:29 +02:00
Uli Schlachter e7cd824c07 Ignore changes to the root pixmap
We no longer use the root pixmap at all, so we can ignore changes to it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-10 15:10:04 +02:00
Uli Schlachter 3bfcf4594e Event handling: Don't reorder mouse handling
For performance reasons, we only handle the last motion notify we receive.
However, we must make sure that the motion isn't moved after enter or leave
notifies. Else, breakage is ensured!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 21:14:10 +02:00
Uli Schlachter 9deafe68c8 Font: Remove, oopango took over the job
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:09:17 +02:00
Uli Schlachter 6826e5dfc4 Remove globalconf.colors
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:01:44 +02:00
Uli Schlachter 37bb1e088f Add 'awesome --no-argb'
If awesome is started with that flag, it won't use ARGB visuals. Theoretically,
this shouldn't be necessary, but it seems like this triggers bugs in the X
server. (Or is it just my server that doesn't like me?)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-05 22:37:33 +02:00
Uli Schlachter 894e59eac8 Revert "Revert "Use an ARGB visual if one is available (FS#829)""
This reverts commit 2452747e04.
2010-10-04 09:26:47 +02:00
Uli Schlachter 371536a396 Create a temporary window for globalconf.gc
We don't have any window with globalconf.depth yet at this point, so we have to
create one just for setting up our GC.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-04 09:26:47 +02:00
Uli Schlachter 2452747e04 Revert "Use an ARGB visual if one is available (FS#829)"
This reverts commit 643ec85117.
2010-09-30 20:56:58 +02:00
Uli Schlachter 643ec85117 Use an ARGB visual if one is available (FS#829)
With this commit, awesome prefers ARGB visuals over the screen's default visual.
This means that all our (visible) windows now can get an alpha channel that a
compositing manager can use for producing transparent windows.

The reason why this is done is to fix a bug. We are reparenting clients into
other windows. If one of these client window uses an ARGB visual, its
transparency would have no effect.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-30 14:43:58 +02:00
Uli Schlachter 8ea94154a6 Associate our default GC with the systray window
The window that is specified when a GC is created is used for two things. First,
it specifies which protocol screen the GC should be associated with. Second, it
specifies for which color depth the GC is valid.

Due to this second property, we have to use the systray window instead of the
root window. The systray window uses globalconf.default_depth.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-30 14:43:58 +02:00
Uli Schlachter cbf9bbd66a screen_default_visual(): Move to awesome.c
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-30 14:43:58 +02:00
Uli Schlachter eef3fdb452 Add variables for tracking some X11 defaults
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-30 14:43:54 +02:00
Uli Schlachter 6ff0263072 Stop trying to use named colors
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-10 11:31:02 +02:00
Uli Schlachter 03e0ee53d2 Wibox: Remove shape support
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-30 10:22:50 +02:00
Uli Schlachter 16286f0b75 Use a single gc for all graphics operation
The GC isn't really used, we just need one because X11 wants one.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-17 15:44:44 +02:00
Uli Schlachter cb550e59f7 Remove the now pointless struct root_win_t
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-16 14:14:15 +02:00
Uli Schlachter 5d35771673 Save the screen in globalconf.
There can only be on xcb_screen_t now, so we can save it in globalconf.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-16 14:10:58 +02:00
Uli Schlachter 32d9a5b2ab Remove support for zaphod mode
This makes awesome support only a single X11 protocol screen. If you are still
using zaphod mode, you can run multiple instances of awesome on the single
screens, e.g.:

DISPLAY=:1.0 awesome & DISPLAY=:1.1 awesome &

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-16 13:47:40 +02:00
Uli Schlachter 9ab8cd4039 Set our event mask on the root window later
This moves the setting of the event mask after scan() so that we won't receive
any events from scan()'s activity (especially no UnmapNotifies which would cause
us to lose clients).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-11 11:54:30 +02:00
Uli Schlachter 84526dd630 Select our events on new after the reparent
Together with the previous commit, this makes us not lose clients across
restarts any more.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 13:33:08 +02:00
Uli Schlachter 58bb601658 Stop using most of libxcb-event
Upstream removed most of the code from libxcb-event and there is no
event-related stuff left in this library. We now no longer use any of the parts
that were removed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-08 17:35:48 +02:00
Uli Schlachter c20e88fdce Avoid some round-trips on startup
This makes awesome prefetch some of the data it needs during startup to avoid
some useless round-trips to the server.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-07 13:31:20 +02:00
Uli Schlachter e9c2907488 Don't manually unban all windows on exit
The last commit made sure the X server does this for us instead. No need to do
that work twice.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-14 21:37:07 +02:00
Uli Schlachter 0517b0002f Don't reparent systray windows on exit
Since the last commit, systray windows will automatically be reparented by the
X11 server. This means we no longer have to do this ourselves.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-14 17:42:53 +02:00
Uli Schlachter 5c232572a3 Check for UNMAPPED instead of UNVIEWABLE
A window is unmapped if it is not mapped (oh noes! ;). If it is mapped, it can
be either mapped or unviewable. If any of its ancestors is unmapped, it's
unviewable, else it's unmapped

Since this code looks at children of the root window, it should never be seeing
clients which are unviewable (can one unmap the root window at all...?). What
this really wants to check for is unmapped, so this patch implements this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-03-29 17:47:28 +02:00
Julien Danjou e3ba851692 spawn: disable signalfd in libev
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-14 09:55:29 +01:00
Julien Danjou 31552f2122 font: remove draw_ prefix in names
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-27 12:16:22 +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 371ee3e8cc titlebar: remove
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00
Julien Danjou e204473dfc client: move into objects
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00
Julien Danjou 6b426b1da1 globalconf: move argv out
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:04 +02:00
Julien Danjou 4c178d5441 hooks: remove
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:04 +02:00
Julien Danjou 67b66a8d62 awesome: fix memory leak with confpath
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-08 12:01:07 +02:00
Uli Schlachter 3d69f38e45 awesome_atexit(): Clean up libev's state
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-04 16:32:00 +02:00
Uli Schlachter e1d6f0a150 Disconnect from the X server after closing lua
Else stuff like this can happen:

  Invalid read of size 4:
    at 0x300280BB7F: (within /usr/lib/libxcb.so.1.1.0)
    by 0x300280BD21: xcb_get_extension_data (in /usr/lib/libxcb.so.1.1.0)
    by 0x300280A55A: xcb_send_request (in /usr/lib/libxcb.so.1.1.0)
    by 0x300C604A4F: xcb_render_free_picture (in /usr/lib/libxcb-render.so.0.0.0)
    by 0x300B24C4BB: (within /usr/lib/libcairo.so.2.10800.8)
    by 0x300B22F1B6: cairo_surface_finish (in /usr/lib/libcairo.so.2.10800.8)
    by 0x300B22F234: cairo_surface_destroy (in /usr/lib/libcairo.so.2.10800.8)
    by 0x300B218124: (within /usr/lib/libcairo.so.2.10800.8)
    by 0x300B212750: cairo_destroy (in /usr/lib/libcairo.so.2.10800.8)
    by 0x42E4D0: wibox_wipe (draw.h:110)
    by 0x42E568: luaA_wibox_gc (wibox.c:46)
    by 0x3008E0CB15: (within /usr/lib/liblua5.1.so.0.0.0)
  Address 0x4e56ec0 is 20,928 bytes inside a block of size 20,992 free'd
    at 0x4A0761F: free (vg_replace_malloc.c:323)
    by 0x40F974: awesome_atexit (awesome.c:97)
    by 0x410316: main (awesome.c:577)

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-04 16:31:58 +02:00
Brian Gianforcaro 3145e3145e Grammar/spelling corrections in comments and docs.
Signed-off-by: Brian Gianforcaro <b.gianfo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-31 10:39:36 +02:00
Julien Danjou f4ea2f3052 awesome: close lua in atexit()
So it does it also when restarting.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-27 11:12:54 +02:00
Julien Danjou fb9aefa85a add exit signal
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 16:30:19 +02:00
Arnaud Fontaine e829db1a41 update to libxcb 1.4 and xcb-util 0.3.6
These new versions provide similar fields to Xlib for errors
(major_code, minor_code and resource_id).
2009-08-24 11:13:00 +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 e104bae294 Revert "button, key: grab all keys by default, and check for match."
This reverts commit f6d2aa3064.

Conflicts:

	key.c
2009-08-14 17:52:49 +02:00
Julien Danjou f6d2aa3064 button, key: grab all keys by default, and check for match.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:42:31 +02:00
Julien Danjou f4579d1dc1 Close Lua VM at exit.
This is useless, but can point out some problem.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:41:21 +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 55524ece8d Use a libev prepare watcher for calling awesome_refresh()
Before this, awesome_refresh() could be called multiple times per mainloop and
one had to make sure to add awesome_refresh() calls in the right places.

Now, the prepare handler is invoked just before libev puts the process to sleep
(e.g. by calling select()) and awesome_refresh() does its thing.

All redundant calls to awesome_refresh() are removed, but the one in
selection.c has to stay because this function blocks in xcb_wait_for_event()
without using libev.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-19 09:34:42 +02:00
Julien Danjou e4acb74a5a luaa: split dofunction()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:44:29 +02:00
Julien Danjou 90bc90fde4 client, wibox: go back to unmap style banning
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:44:11 +02:00
Julien Danjou aceab7a39a awesome: fix exit hook
Bad cherry-pick.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-08 12:32:42 +02:00
koniu f9311b1e00 hooks: add exit hook
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-08 11:38:52 +02:00
Uli Schlachter 60bceccafe Fix the SIGSEGV handling
We can't use libev's signal handling here but have to use sigaction() directly,
because libev only writes to a pipe in the real signal handler and then calls
our callback in the next main loop iteration.
The problem here is that returning from a SIGSEGV signal handler is a in
general a Bad Idea (tm) and thus we need to use a "direct" signal handler.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-06 20:22:33 +02:00
Julien Danjou be238512cc awesome: dump backtrace on SEGV/ABRT
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-05 15:00:37 +02:00
M. Dietrich 907a5379a3 fix loop over config files if none was found
if no file was found the string is just "\0" and neads a head
controled while

if no config file was found exit awesome with an error message
(fail early!)

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 10:21:16 +02:00
Julien Danjou e278b6cefd main: fix typo in fatal()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-19 11:43:46 +02:00
Mariusz Ceier ee77fce1ce Fix focus hooks calls
This patch fixes focus hooks calls - for every call to focus hook, there
should be call to unfocus hook.

Focus related info:
In this shape, awesome doesn't support multiple focused clients, that
means it follows the rule "there is only a single focus", which is not
true for MPX. To change this, I think it will need some magic with
FocusOut events handling and changes to some structures
(e.g. globalconf.screen_focus, screen_t.client_focus should be arrays) :p
Now we don't need to handle FocusOut events.

Signed-off-by: Mariusz Ceier <mceier@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-28 19:44:38 +02:00
Julien Danjou 600299a19f key: restore proper support of keysym resolution
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-28 18:17:16 +02:00
Nikos Ntarmos 715f95555a libxdg-basedir 1.0.0 compatibility
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-18 18:51:04 +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 d834e19a23 awesome: use xcb_event error code
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-15 12:01:55 +02:00
Julien Danjou cda33ca3e6 key: cleanup modifiers system
We stop retrieving useless key, since we have constant.
We also grab correctly all keycode for a keysym.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-15 12:01:54 +02:00
Julien Danjou f4221a1fdf spawn: add support for startup-notification
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-14 14:23:38 +02:00
Julien Danjou be752cc81c client: change global linked list to an array
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +02:00
Uli Schlachter 4b82608952 Remove the argument to awesome_refresh()
awesome_refresh() had a xcb_connection_t as first argument. Since there is
only one connection to the X server, this argument doesn't really have any
alternatives to globalconf.connection and thus makes no sense.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 18:02:49 +02:00
Julien Danjou 09b166d71e version: remove product name
We only ship one binary now.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 18:53:53 +02:00
Julien Danjou 7dbb02adf3 awesome-client: remove socket code
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 17:56:25 +02:00
Julien Danjou f7bca3271c luaa: use only one xdgHandle for all
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 15:47:31 +02:00
Julien Danjou b14b52b60c awful.mouse: set the default cursor
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-03 17:15:14 +02:00
Julien Danjou 17e2d9e58f client: remove _AWESOME_TAGS property
We use EWMH hints.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-12 11:49:58 +01:00
Julien Danjou 8745d691fe buttons: change grabbing method
We stop grabbing buttons on root windows. We select button press and
release events, and then we check that we have a bindings for them.
This allow to simply grab buttons on client once, and not redo such
things on arrange or mouse-over-window changes.

Most window managers do like this, anyway.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-12 11:49:58 +01:00
Julien Danjou 401b8ce3e9 awesome: flush after ungrabbing server
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-14 17:54:04 +01:00
Julien Danjou c7e94c810c event: ignore much of mouse motion events
This should improve move/resize performance.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-28 12:27:58 +01:00
Julien Danjou 139dea2987 atexit: fix shadow declaration
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-26 09:35:40 +01:00
Nikos Ntarmos 8562223458 atexit: check for NULL pointer return
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-26 09:23:09 +01:00
Julien Danjou d6dbb00f10 client: add support for input faking
This is done using XTest extension.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 17:03:17 +01:00
Julien Danjou d779aa6c40 client: client screen change at manage is done in Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 12:26:01 +01:00
Julien Danjou cd667802db hooks: manage gets an extra startup arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 12:23:37 +01:00
Julien Danjou 8b88541f0a xembed: store windows in an array
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Maarten Maathuis f9c2ee62a3 client: reimplement client_{ban,unban} for more performance
- From now on clients shall remain mapped for their entire lifetime.
- This should seriously boost tag switching speed with composite active.
- A lesser improvement may be noticed in non-composite situations.
- Titlebars that are set to invisble are still unmapped.
  Since it would clutter the implementation and titlebars are cheap to render.
  Not to mention that invisible titlebars are pretty rare.
- It's safe to attach titlebars while the client is banned.
- Titlebars are explicitly removed at exit.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 19:19:28 +01:00
Julien Danjou 79ae3ab72a dbus: export in Lua request_name()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 19:19:28 +01:00
Julien Danjou 0e972d4845 mousegrabber: import
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou 3cf79072cd xcursor: add new cursor infra
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou aca61daecd config check: be more precise about what we check
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-17 20:45:53 +01:00
Julien Danjou 83eadb46cb util: check asprintf return
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-10 10:36:39 +01:00
Julien Danjou 8e66a543bc draw: remove phys_screen from font handling
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-04 17:50:10 +01:00
Julien Danjou ede5a54355 event: handle background changes
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-10 18:27:43 +02:00
Julien Danjou 85cbdc044b awesome: init systray earlier
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-02 12:24:05 +02:00
Julien Danjou afbcd681be lua: add --check option
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-30 16:59:08 +02:00
Julien Danjou 49abc66089 xutil: do not return pointer, init struct instead
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou 4193e81fa8 screen: merge with xscreen, remove screens_info
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou 2be620618b property: use xcb property handler system
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 6a5ad6af9b common: move draw, xscreen and swindow out
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou b4d89eec6c screen: move screen_getbycoord()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou 3a45831242 client: manage take phys_screen as arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou 7cf2b6615f client: split X props; handle fullscreen status
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou be52f5b047 update to new xcb-event
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-16 15:36:44 +02:00
Arnaud Fontaine 00d8a0cddd Update to new xcb-util library.
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-15 14:02:23 +02:00
Julien Danjou 6690456668 core: ungrab before init dbus
D-Bus seems to require X access, otherwise it get stuck.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-11 11:15:55 +02:00
Julien Danjou 803d837d88 grab server on initialization
That allows to not miss any window on startup.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-10 16:06:32 +02:00
Arnaud Fontaine 9e426be091 awesome: get rid of unecessary malloc in scan() 2008-09-09 17:50:25 +02:00
Julien Danjou 97cf3a7719 systray: add some cleanup code
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-03 18:03:50 +02:00
Julien Danjou 11dfa832a8 factorize quit/exec elements, and reparent systray
That fixes FS#296.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-02 17:12:10 +02:00
Julien Danjou 3e13545cc9 Remove 2-level polling
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-31 13:18:02 +02:00
Julien Danjou 04eff691c9 Use xcb_aux_sync to register error
Otherwise we get multiple awesome at the same time.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-30 09:21:48 +02:00
Julien Danjou 87a89b6aa1 use xcb_flush; move refresh stuff in common function
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-26 19:35:37 +02:00
Julien Danjou 5cb870c7b8 scan: fix array indice
WTF.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-14 21:42:36 +02:00
Arnaud Fontaine 73c4415a0a window: make window_getstate() asynchronous and rename this function
according to the rest of code.
2008-08-13 19:01:36 +02:00
Arnaud Fontaine 5c9cc7857d xutil: make xutil_lock_mask_get() asynchronous 2008-08-13 12:29:43 +02:00
Arnaud Fontaine 193a73c5d9 draw: make xcolor_init() asynchronous. 2008-08-12 14:53:57 +02:00
Julien Danjou d310605a64 clients: fix manage on restart
We do not manage if they _don't_ have awesome prop.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-12 08:47:29 +02:00
Arnaud Fontaine b655f6348c xutil: rename xutil functions according to the rest of code. 2008-08-11 18:05:35 +02:00
Julien Danjou be2bfdcfc5 screen: introduce screen objects
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 17:14:02 +02:00
Julien Danjou 0903e21a1a clients: manage client with _AWESOME_PROPERTIES
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 15:10:54 +02:00
Julien Danjou 6e5d89e4de Revert "client: fix windows managed on startup"
This reverts commit f32cba6bd8.
2008-08-11 15:04:10 +02:00
Julien Danjou f32cba6bd8 client: fix windows managed on startup
We need to not take the UNVIEWABLE, but everything else should be
managed.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 14:57:15 +02:00
Julien Danjou 13714a2b8b remove useless include
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-06 20:54:20 +02:00
Julien Danjou 9cbee5b32e remove goto statement
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-06 14:05:11 +02:00
Julien Danjou d98c28ef86 fix memory leak in event polling
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-05 15:40:57 +02:00
Julien Danjou 5e3e968d2f rewrite two levels polling
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-05 15:37:41 +02:00
Julien Danjou 0ea4ce4980 remove two levels polling
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-05 15:12:24 +02:00
Julien Danjou 81ae462a70 focus: remove focus history
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-31 17:30:01 +02:00
Julien Danjou 063bf2083d titlebar: use need_update system (like statusbar, …)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-31 14:11:07 +02:00
Kanru Chen 700ace5197 length of static string s should be sizeof(s)-1
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-22 10:30:53 +02:00
Kristof Provost 30aeb3f311 Reload awesome on SIGHUP
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-22 10:23:07 +02:00
Julien Danjou 36fd44d1a0 draw: add char len as arg of xcolor_init()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 15:30:16 +02:00
Julien Danjou fb13bff697 config: use XDG for loading config
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-08 14:07:56 +02:00
Pierre Habouzit 924078c898 Streamline xcolor_t.
Do not have a ->name char * field, but a char[32] instead.  This isn't a
big problem, the longest color in /etc/X11/rgb.txt is 23 chars long, and
if it becomes a problem one day, one could just strip the name and
generate an hexadecimal representation on the fly instead. But allocating
the name is asking for a lot of trouble.

Since we do not allocate anything anymore, just don't allocate anything
anymore at all, it avoids the mess of xcolor_copy/_wipe and fixes a lot of
sleeping bugs (p_dup were used e.g., which is wrong).

Pass xcolor_t *, xcolor_t becomes too big to be passed by value. Add
consts at some places.

xcolor_new allocates nothing, hence is renamed xcolor_init, has xcolor_t
as a first argument (OO-style, this is self), and doesn't touch the
structure at all if it returns false, which allow us to skip a lot of
intermediates values.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 10:36:46 +02:00
Julien Danjou 5daa38ac2d atom: new atom infra
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-30 18:25:01 +02:00
Julien Danjou c007cacd09 xutil: make atoms cache an array
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-27 12:08:19 +02:00
Pierre Habouzit 3f9c7aee54 actually call our xcb events setup function
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-26 23:04:55 +02:00
Pierre Habouzit 585496b66a Make event handler setup private to the event module.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-26 22:47:56 +02:00
Julien Danjou 013b2afe62 remove useless #include
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 18:10:45 +02:00
Julien Danjou 104df8912b systray: set handler before ewmh/systray init
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-24 19:55:14 +02:00
Julien Danjou f8f882d948 systray: fix scan() and stop managing XEMBED
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-24 17:39:22 +02:00
Julien Danjou 46ead6ea3f comments fixing
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-20 08:38:00 +02:00
Julien Danjou 933e05f7b0 scan: manage withdrawn windows on start
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-20 07:24:31 +02:00
Julien Danjou 206bf49525 awesome: fix documentation position
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-19 09:46:17 +02:00
Julien Danjou 0fdc03faa4 util: rename eprint() to fatal()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-19 09:45:08 +02:00
Pierre Habouzit 4617f0ba34 The X socket MUST keep us alive.
We must not unref the loop for the X socket, that's our reason to live !

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-18 02:12:37 +02:00
Arnaud Fontaine b9e1ec69d0 Replace xcb_aux_get_screen() by a safer function 2008-06-17 17:14:00 +02:00
Julien Danjou 26738c4dab xshape: remove, nothing prove it's really useful
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-17 15:06:05 +02:00
Julien Danjou 5bae1f0c37 window: rework root_grabbuttons()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-17 14:35:58 +02:00