If a library is in a non-standard path, the linker needs an extra argument so
that it knows how to find this library: -L/path/to/lib
pkg_check_modules() sets _LIBRARIES only to the library's name, but _LDFLAGS
also contains a -L flag if one was found.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This reverts commit 27f9c0177a.
This commit broke code like the following because reading client.focus would
still return the previously focused client:
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
This moves the appropriate fields for client focus from screen_t to globalconf
since only the first screen's fields were used anyway.
Signed-off-by: Uli Schlachter <psychon@znc.in>
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>
Previously, cmake aborted when execinfo was not found. With this commit the
backtrace code is just disabled when execinfo is not available.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, if a client had nofocus == true, it wasn't unminimized if sth tried
to focus it. Also, if this client had the WM_TAKE_FOCUS protocol, the focusing
would fail since it's an error to set the input focus to an unviewable window.
For consistency, this also moves the code that sets a client's minimized
property to false into client_unban() since it doesn't make sense to have a
minimized client unbanned (i.e. visible).
Signed-off-by: Uli Schlachter <psychon@znc.in>
If this property is true, setting "client.focus" to this client might have some
effect. If it is false, setting "client.focus" will be ignored completely.
Signed-off-by: Uli Schlachter <psychon@znc.in>
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.
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>
Ever since awesome.spawn() also returns the pid of the started process, the
prompt accidentally displayed the pid of processes that it started.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The old code used the wrong constants which meant we always returned "word" for
wrap and "end" for ellipsize.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previous, there was a round-trip after each request for a property since we
waited for the reply immediately. Instead, it makes a lot more sense to first
send all of the requests and then handle all the replies. This now takes only a
single round-trip for all the properties from client_update_properties().
Signed-off-by: Uli Schlachter <psychon@znc.in>
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>
Since each handler is only for one single atom, there is no point in passing the
atom that was changed to the callback.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of calling each property handler with a property reply, it's now up to
the handlers to request the properties.
Signed-off-by: Uli Schlachter <psychon@znc.in>
For each property we handle, there is now a function which sends a request and
returns the cookie and a second function that takes the cookie and saves the
result in the client_t struct. This should make it possible to improve our
latency later on.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This should fix an actual race condition:
- Client unmaps its window (UnmapNotify for awesome)
- Client maps its window (MapRequest for awesome)
- Due to the UnmapNotify: client_unmanage() runs and reparents the window back
to the root (ReparentNotify)
- Due to the MapRequest: client_manage() runs
- Due to the ReparentNotify: We call client_unmanage() again and now the
client's window is lost.
Signed-off-by: Uli Schlachter <psychon@znc.in>
According to ICCCM, if a client wants to reuse one of its windows, it has to
wait until the WM updated WM_STATE. This means updating WM_STATE should be the
very last thing we do when unmanaging a window.
Signed-off-by: Uli Schlachter <psychon@znc.in>
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>
If a client sets its own border on its window, the results look broken. This was
found via xev by Gregor Best, thanks.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The commit which made awesome a reparenting WM broke the fix from 37703948b3.
Fix this again by stacking the frame window correctly.
Signed-off-by: Uli Schlachter <psychon@znc.in>
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>
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>