Commit Graph

622 Commits

Author SHA1 Message Date
Uli Schlachter 5760e536f9 Revert "Apply left/top titlebars in event_handle_configurerequest"
This reverts commit ecddee44cb. The commit broke
window gravities as can be reproduced with metacity's test-gravity.c.
2015-10-10 16:03:16 +02:00
Daniel Hahler 5431b18f33 Rename client_maybevisible to client_on_selected_tags
This makes it more clear what it is about, and also fixes its
documentation.
2015-09-25 00:43:52 +02:00
Uli Schlachter d96c4d61a9 Handle enter/leave events with detail=Inferior correctly
There is a client window C. Around this window, awesome adds a frame window F.
When the pointer is inside of C and then moves inside of F, we get a LeaveNotify
with detail=Inferior, but from our point of view, the pointer is still inside of
C, because F is contained in C.

Similarly, if the pointer is in F and moves to C, we get an EnterNotify with
detail=Inferior that we should ignore. However, for an EnterNotify the pointer
can now be inside of a titlebar, so this case has to be handled now.

The above explains the enter/leave behavior for clients. Let's now think about
titlebars: When the pointer moves from C to F, it cannot be in any titlebar any
more, so we must generate a leave event on that titlebar. Similar when the
pointer moves from F to C, but in this case we also have to figure out which
titlebar now contains the pointer.

This patch makes the code handle these events with detail=Inferior correctly.

Closes https://github.com/awesomeWM/awesome/pull/461.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-19 12:01:10 +02:00
Uli Schlachter 42e0081958 Fix enter/leave events on titlebars
This adds a global variable that tracks the drawable that is currently under the
mouse cursor. This new variable is then used so that we get consistent behavior
for enter/leave signals. Such signals are now also generated when a MotionNotify
event tells us that the pointer is now in a different titlebar.

Before this, it was possible that we did not generate a leave event on a
titlebar since the LeaveNotify contains the cursor position after the leave and
we did not manage to figure out which titlebar was left.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-19 12:00:58 +02:00
Daniel Hahler ecddee44cb Apply left/top titlebars in event_handle_configurerequest
I have noticed that the HeidiSQL session manager window/dialog will be
moved down by the height of the top titlebar when selecting an entry
from the server list.

Closes https://github.com/awesomeWM/awesome/pull/385.
2015-08-02 18:00:52 +02:00
Daniel Hahler 1118ec4439 Do not call `xcb_ungrab_key` twice (before `xwindow_grabkeys`)
It gets called in `xwindow_grabkeys` always:

    xwindow_grabkeys(xcb_window_t win, key_array_t *keys)
    {
        /* Ungrab everything first */
        xcb_ungrab_key(globalconf.connection, XCB_GRAB_ANY, win, XCB_BUTTON_MASK_ANY);

Closes https://github.com/awesomeWM/awesome/pull/366.
2015-08-01 14:16:06 +02:00
Daniel Hahler d08e82d4c8 Use luaA_dofunction with key- and mousegrabber 2015-07-22 13:52:47 +02:00
Uli Schlachter 18f6ab107f Mousegrabber: Correctly handle press/release events
When you run a mousegrabber, the C code calls this callback when the pointer is
moved or when a button is pressed/released. However, the button state is totally
bogus on press/release events, always claiming that the button that was
pressed/released is the only button that is pressed (even for release events!).

This commit fixes up the code so that the button state after the press/release
event is passed to the mousegrabber callback function.

Fixes: #280
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-05 16:14:41 +02:00
Peter Junos 372d12ee31 Fix incorrect behavior when modkey is pressed 2015-05-28 23:20:17 +02:00
Peter Junos 19137a55c3 Support for XKB - changing keyboard layouts
This commit adds support for writing in prompt (<Super>+R by default)
while different keymap is selected

Signed-off-by: Peter Júnoš <petoju@gmail.com>
2015-05-28 23:20:17 +02:00
Aleksey Fedotov 996f6785a8 xkb: implementation of keyboard layout switched
This patch provides functions to get/set current keyboard layout.

Current implementation doesn't support any configuration of layout,
it's a merely a layout indicator and switcher, however layout
configuration can be set by tools like setxkbmap or by any third-party
tools.
2015-03-03 00:33:16 +03:00
Uli Schlachter e5120e1bec Hide globalconf.L
Everything that needs the lua_State should create a local variable like this:

  lua_State *L = globalconf_get_lua_State();

This ensures that the compiler warns if there are two variables with name "L" in
scope. The idea here is that it should become harder to accidentally use the
global lua state instead of the state of the current state.

While writing this commit, I found another place that gets its wrong: Reading
client.focus from a coroutine was broken, since it was returning the result on
the main thread instead of the current one.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-12-06 11:56:58 +01:00
Uli Schlachter f0ab2aebeb Don't move clients on ConfigureRequests (FS#1030)
I never saw a single program that set a border on its own windows. However,
awesome commonly sets borders on its clients and the position of a client is the
part outside of the border. So when processing a position request from a client,
we also have to include this border and fix things up correspondingly.

However, the same isn't needed for the client size, because the size does not
include the borders, but just the titlebar plus the "real" client content.

Thanks to Daniel Hahler for providing a simple test case based on urxvt for
debugging this!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-12-05 18:40:06 +01:00
Uli Schlachter a90f0c9775 Call AllowEvents after grabbed events on a drawin
When we get an event due to a previous GrabButtons call, we have to continue
normal event processing again, because the server froze the input device for us.
Without this, everything appears to freeze.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-04-21 10:41:07 +02:00
Uli Schlachter d2b1e92f9e Clean up header includes
Every .c file has to include the corresponding .h file first to make sure the
headers are self-contained. Additionally, this moves some unneeded includes
around.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-30 20:07:48 +02:00
Uli Schlachter d8b73de739 screen.[ch]: Move into objects/
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-30 15:12:47 +02:00
Uli Schlachter fed803a6bc client manage signal: Remove startup argument
We now have awesome.startup which does the same thing in better.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-16 20:15:02 +01:00
Uli Schlachter 6b8bd49c0b Redraw titlebars more intelligently
Whenever a titlebar of a client needed to be refreshed, all (possibly) four
titlebars would get completely refreshed. So if someone actually added more than
one titlebar to a client, awesome would copy each titlebar's content to the
window four times. Fix this by introducing more fine-grined functions for
uploads.

This also makes awesome only update the affected area when it gets an expose
event for a titlebar instead of all four titlebars completely.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-16 15:29:11 +01:00
Uli Schlachter ef27189ffe Client: Add (and use) visualtype member to client_t objects
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-15 11:56:57 +01:00
Uli Schlachter 56c5797905 Finish C-side support for window shapes (FS#1051)
A drawin's and a client's bounding and clip shape can now be queried and is
returned as a cairo surface.  Also, a client window's shape (e.g. xeyes setting
its own shape) can be queried via c.shape_client_bounding and
c.shape_client_clip.  All of these properties now emit signals when changed.

(This also silently fixes a bug in luaA_drawin_set_shape_bounding() which forgot
to include the drawin's border in its size calculation)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-01-03 17:01:43 +01:00
Uli Schlachter 2d3103345e Implement window gravity in ConfigureRequests (FS#1137)
Previously, awesome didn't move windows when they sent a ConfigureRequest (and
it also shrunk them by the size of titlebars, before it forgot to add these).
This commit adds proper gravity support to ConfigureRequest handling.

This was tested with test-gravity from metacity (in src/wm-tester).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-04-07 11:57:40 +02:00
Uli Schlachter ee1fe4dd59 Revert "Support more than 5 mouse buttons" (FS#1082)
This reverts commit bd8158495e.

The idea was to track the current list of pressed and depressed mouse buttons,
because we get button events for more than 5 buttons, but can only query the
state of the first 5 buttons.

However, there are cases where we see button presses, but won't see the
corresponding release event. This is quite bad.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-29 16:07:13 +01:00
Uli Schlachter 23b30be106 Move size hints handling back into C (FS#1117)
Having this in lua means that size hints are only applied after the client got
resized. The bad side effect of this is some flickering if awesome is being
slow. And apparently, it is slow for way too many people...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-10 12:13:32 +01:00
Uli Schlachter bf72cf71ea Refresh focus on FocusIn events
To avoid some oddities, awesome sets the input focus lazily. Instead of
immediately sending everything to the X11 server, awesome just sets a flag "have
to update the focus later".

However, this can cause problems. As Stefan noticed, awesome can forget about
focus changes on FocusIn events when such an event comes in while we still have
a pending focus change.

The fix here is to send out the pending focus change before we record the fact
that another client now acquired the input focus.

Reported-By: Stefan Haller <haliner@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-02-11 16:19:28 +01:00
Uli Schlachter 6a39fa46c1 wibox button: Fix the x/y position in button events
The coordinates as used by X11 place (0, 0) at the top-left corner of the
window, including its border. However, this code wants the position relative to
the drawin's content, thus we also need to substract the border width.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-16 18:17:03 +01:00
Uli Schlachter 10d48e1fc8 Send correct geometry in ConfigureNotifies
The code was sending out ConfigureNotify events which contained the size of the
frame window. Thus, the client assumed that it is was larger than it actually
was.

Fix this by subtracting the size of the titlebars from the geometry for the
event.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-29 10:20:03 +01:00
Uli Schlachter 41ef107b88 Add titlebars on the C side
This commit makes it possible to add titlebars to a client. These titlebars are
drawables.

The drawin's input handling is moved to the drawable. This allows it to use the
same code for drawin and titlebar input handling, although there are lots of
differences between the two on the C side.

On the lua side, a new wibox.drawable module is created which handles all the
drawable-specific magic and which can also be used for titlebars.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-14 17:30:59 +02:00
Uli Schlachter 10fa808a5a Ignore (Un)Grab focus notifies
When a keyboard grab activate/deactives, the input focus jumps to the window
which does the grab. These FocusIn events sometimes managed to confuse awesome.
The symptom was that a newly mapped/started client didn't receive the input
focus:

- You press your key-combo to start a terminal. This activates a passive grab
  and the input focus jumps to the root window
- The terminal opens and the "manage" rule does client.focus = c
- This doesn't set the focus yet, but instead causes
  globalconf.focus.need_update = true and .client = new_terminal
- Before the focus is updated, the key combo is released and the focus jumps
  back to the previously focused client
- The FocusIn with mode == Ungrab causes awesome to think that the previously
  focused client got focused again and thus globalconf.client.focus gets re-set
  to what it was before
- Finally the focus is refreshed and the previously focused client gets focused

The fix is simple: We don't need the FocusIn events which are generated when a
grab activates or deactivates, so we can just ignore them.

Thanks to Majic for reporting this to me.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-08 15:41:16 +02:00
Uli Schlachter d54d3840da xerror: Print numeric infos about the error
xcb_event_get_{request,error}_label() return NULL for non-core requests and
error codes. Obviously, that's not really helpful at all, so also print the
numeric information about what failed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-15 10:02:25 +02:00
Uli Schlachter 7c7ceb1444 event: Properly ignore the "send event" flag
Thanks to muni who managed to crash his WM with conky. When conky runs in its
own window, clicking on it will sometimes (depending on the conkyrc) use
XSendEvent() to forward the event to the WM.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-19 20:20:46 +02:00
Anurag Priyam 014d191f66 keygrabber: continue grabbing till keygrabber.stop is explicitly called
Returning true from the callback just to signal keygrabber to continue grabbing
felt redundant (and silly :|).

This will break old code that relied on returning false to stop grabbing,
instead of calling keygrabber.stop.

And fix keygrabber docs.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-29 20:46:42 +01: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
Uli Schlachter bd8158495e Support more than 5 mouse buttons
X11 only let's you query the state of mouse button 1 to 5. However, it can
generate ButtonPress and ButtonRelease events for up to 256 mouse buttons.

Instead of asking the server which buttons are pressed, we will now remember
the button state from those ButtonPress and ButtonRelease events. Currently
this let's us keep track of up to 32 mouse buttons.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-20 15:39:49 +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 af5e5e8e9c Remove a useless function argument
Both client_isvisible() and client_maybevisible() where almost exclusively
called with the client's screen as their second argument. Remove this second
argument and let these functions instead always act on the client's screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-27 20:07:14 +02:00
Uli Schlachter eff4474c6d Move size-hints handling to lua
The C core now completely ignores size hints and let's lua handle them.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-11 17:21:00 +01:00
Uli Schlachter e55ed50b89 Fix an unbalanced lua stack
event_button_callback() pops the top element from the stack, but
event_emit_button() doesn't. This got was expecting both to pop the top from the
stack so Bad Things(tm) happen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-10 13:32:47 +02:00
Uli Schlachter af8fd15a8f client_unmanage(): Handle destroyed windows
When we receive a DestroyNotify, we have to unmanage the client. However, we
were just informed that the window was destroyed, so it doesn't make sense to
try to do "something" with the window.

This commits fixes some errors from the X server (which we ignored, but still
they are gone now).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 12:05:43 +02:00
Uli Schlachter 18799f32f8 Emit mouse::move signals when we get a motionnotify
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:44:22 +02:00
Uli Schlachter 742c0dead0 Systray: Fix
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 15:38:44 +02:00
Uli Schlachter 5f5787d97b Wibox: Rename to drawin
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 13:36:02 +02:00
Uli Schlachter d213f19c5f Widgets: Remove
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 13:27:21 +02:00
Uli Schlachter a924a92e07 Add button::{press,release} signals to windows
These signals also contain the x and y coordinate of the event which the
capi.button()-based signals can't provide.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 10:53:05 +02:00
Uli Schlachter 3aee846869 Error handling: Use libxcb's defines
Since libxcb-event is deprecated, we should stop using its defines.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-15 21:30:45 +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 ec63afc822 Track the last timestamp received from the server
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-12 14:37:39 +02:00
Uli Schlachter 7e03e3b796 Revert "Ignore all UnmapNotifies due to the root window"
This reverts commit 0682499895.

We have to handle all the UnmapNotifies due to ICCCM. The bug this was trying to
fix is now fixed by 9ab8cd4039 ("Set our event
mask on the root window later") instead.
2010-08-11 11:58:56 +02:00
Uli Schlachter e59086f2bf Ignore all reparents to the root window
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-11 11:56:47 +02:00
Uli Schlachter 0682499895 Ignore all UnmapNotifies due to the root window
We got XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY on the root window, but we also have
XCB_EVENT_MASK_STRUCTURE_NOTIFY on the individual client windows. Since we are
reparenting our windows, we can safely ignore all UnmapNotifies that we get
through the root window.

This fixes a bug if there were any windows already present before awesome
started. Those were obviously already mapped which means that ReparentWindow
would cause an UnmapNotify for them on the root window. This commit makes us
ignore that UnmapNotify and thus not throwing away the window immediately again.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 13:30:46 +02:00
Uli Schlachter 1f36a3d4de Obey ICCCM 4.1.5 / 4.2.3
When a window is moved, it should be sent a synthetic ConfigureNotify describing
its new position. This also documents why we send a synthetic event if nothing
was changed in response to a ConfigureRequest.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 11:56:50 +02:00
Uli Schlachter a311ab0679 Don't destroy client windows in unmanage
When a client is unmanaged, we destroy our frame window. But since the client's
own window was still a child of the frame window, it was destroyed, too. This
commit fixes this by reparenting the client's window back to the root window
first.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 11:56:40 +02:00
Uli Schlachter 52f4581be3 Fix reparentnotify handling
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 11:56:36 +02:00
Uli Schlachter eb89467896 Unmanage clients on UnmapNotifies
ICCCM mandates that window managers have to trigger the conversion to withdrawn
state on the synthetic and the real unmap notify, no matter if any is missing.
Previously we couldn't do this, but thanks to the reparenting, we can now do
this properly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 11:56:33 +02:00
Uli Schlachter 9fbdecf26c Split up client_getbywin()
This splits up client_getbywin() into two different functions. One of them finds
a client by its frame window, the other checks against the client's own window.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 11:56:29 +02:00
Uli Schlachter 102063dbbd Turn this into a reparenting WM
Each window is now reparented under a window created by awesome. This window is
NOT visible, this commit should not cause any visible differences. Instead, this
is done to work around problems with X11.

The only alternative would be to ban windows by moving them offscreen which is
ugly in itself and breaks pagers. Doing it like this seems to be the better
solution.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 11:56:26 +02:00
Uli Schlachter fa5a25637d Remove some more unused function arguments
We no longer use libxcb-event, so we don't have to follow it's API any more.
This means the pointless arguments and return values can be removed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-08 17:54:13 +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 37756c0589 Remove systray icons from the save set
This commits makes awesome remove systray windows from the save set when they
are unmapped. This happens for the same reason as with normal client windows.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-25 09:26:27 +02:00
Julien Danjou 688b9f7af0 Fix mouse::leave signal emit on widgets (FS#774)
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-09 16:09:41 +02:00
Julien Danjou 4ef5e816ec client: remove internal geometry
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:11 +02:00
Julien Danjou c94f7b6767 window: import border_width property
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:06 +02:00
Julien Danjou 5359e738e8 key: split resolving in keyresolv
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:20 +02:00
Julien Danjou 6a1ce5ce05 Store widgets references as wibox items
This will store the widgets references that the wibox have inside their
environment table, and not in the global registry, avoiding memory leaks.
This should fix FS#771.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:23:57 +02:00
Uli Schlachter 026247cf18 Handle synthetic UnmapNotify events *correctly*
Second try:

Turns out I messed up with XCB_EVENT_SENT() and had a "!" too much. The old code
already tried to cope with this, but forgot to actually unmap the window which
it just set to withdrawn state.

This time I tested the patch *again* and now I found even less bugs than on my
last try.

P.S.: I suck.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-06 09:40:55 +01:00
Uli Schlachter d18d51e106 Revert "Handle synthetic UnmapNotify events"
This reverts commit 8e672897cb.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-29 09:53:20 +01:00
Uli Schlachter 8e672897cb Handle synthetic UnmapNotify events
According to the Inter-Client Communication Conventions Manual, if you want to
switch your window to withdrawn state, you unmap it and send a synthetic
UnmapNotify to the root window.

This synthetic event fixes a race condition. When you map and unmap a window
quickly, the map will generate a MapRequest for the WM but won't actually map
the window. Thus, the unmap will be discarded (-> window not yet mapped) and the
window stays map once the WM handles the MapRequest

Before this patch, awesome just ignored the synthetic unmap notify which caused
the bug to appear again. With this patch it doesn't happen anymore.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-28 16:40:46 +01:00
Uli Schlachter b0e2bf8b95 Fix a invalid pointer crash bug
This changes wibox_t::mouse_over to a proper reference. That way one can't
remove that widget from underneath us which would lead to an unprotected lua error.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-02 09:32:51 +01:00
Uli Schlachter 056d9a074b wibox: make sure no garbage is painted to the screen
Wiboxes are lazily updated. This means that we could receive an expose event on
them between making them visible and actually painting their content.

Due to this we were copying undefined content to the wibox, because the pixmap
was only created just now, but it wasn't actually filled with anything yet.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-08 10:32:43 +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 0672414414 key: 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
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 104e28778b tag: move into objects
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 341fb8e1ff event: emit mouse::{enter,leave} on client
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +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 9c40168f02 widget: emit signals on mouse enter and leave
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 5dbae0e34f luaobject: remove prefix##_push_item()
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 27fd05320e button: use new object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:46 +02:00
Julien Danjou 4871dbb1aa button, key: emit events
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:46 +02:00
Julien Danjou 04e55739fe key: port to new object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:46 +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 073e0377dd Revert "key, button: use as simple table"
This reverts commit d7454f4307.

Conflicts:

	button.h
	key.h
	lib/awful/titlebar.lua.in
	lib/naughty.lua.in
	wibox.c
	wibox.h
	widget.c
2009-08-14 16:48:52 +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 d7454f4307 key, button: use as simple table
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:44:54 +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 fb3c5d90c7 event: push event/key objects and then call functions
This avoid the problem we can had while modifying globalconf.keys in a
callback function from a key or button event. Now we push all matching
objects on the stack, and call each callback function. If something
modify globalconf.keys, we do not care.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:30:06 +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
Uli Schlachter d088b819f9 Remove globalconf.have_randr
This variable didn't really have any effect on anything. It was only ever
checked in a function that would never be called if this flag was false.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-17 15:53:08 +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 dfc01b2599 event: remove need_arrange on resize
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:42:04 +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 7cc0b13eae wibox: move position handling to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:30 +02:00
Julien Danjou 0ca7a0fd71 widget: use orientation rather than position
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-10 16:17:39 +02:00
Julien Danjou 63a7b50531 event: push button state correctly to mouse grabber
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-29 17:20:12 +02:00