Commit Graph

6657 Commits

Author SHA1 Message Date
Uli Schlachter 0060ea9d63 Fix awful.screen.focus
This is broken since 23b2fae6a9.

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

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-11 17:10:16 +02:00
Uli Schlachter 33f8a06594 Document "--replace" better
This adds it to the output of "awesome -h" and translates the version in the man
page to italian. Thanks, eri_trabiccolo for the translation!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-11 15:00:08 +02:00
Daniel Hahler 0c57cc0155 Default config: use shorter `awful.spawn` 2015-10-11 14:06:27 +02:00
Daniel Hahler 0478b946fb Merge pull request #513 from psychon/WM_Sn_selection
Various selection stuff that ICCCM requires us to do.

Fixes https://awesome.naquadah.org/bugs/index.php?do=details&task_id=782.
Fixes https://github.com/awesomeWM/awesome/issues/292.
Closes https://github.com/awesomeWM/awesome/pull/513.
2015-10-11 13:30:32 +02:00
Daniel Hahler 4803e1552d Merge pull request #514 from psychon/quit_during_startup
Make awesome.quit() during startup work
2015-10-11 13:25:44 +02:00
Daniel Hahler f29264064f Merge pull request #510 from psychon/fixups_size_hints
Fix client_apply_size_hints()
2015-10-11 13:25:34 +02:00
Uli Schlachter 79e86d409a Fix awful.spawn.spawn
The C code wants a boolean as its argument, so we should give it a boolean.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-11 13:23:57 +02:00
Daniel Hahler da92c31826 Merge branch 'fix-icon_theme' [#515]
Closes https://github.com/awesomeWM/awesome/pull/515.
2015-10-11 13:10:24 +02:00
Daniel Hahler 765a5f5790 menubar.icon_theme: use GLib.build_filenamev to join paths
This eliminates double slashes from the resulting paths.
`GLib.get_system_data_dirs` might return paths with and without trailing
slashes.
2015-10-11 13:09:33 +02:00
Daniel Hahler e93ce7c2a8 menubar.icon_theme: minor code style fixes
- fix/streamline usage if metatable.__call
2015-10-11 13:09:15 +02:00
Daniel Hahler a140d80d76 icon_theme.find_icon_path: fix typo: s/filaname/filename 2015-10-11 11:53:31 +02:00
Daniel Hahler 6902e4bf5b Travis: fix building apidoc: add missing $ 2015-10-10 23:08:26 +02:00
Daniel Hahler aaea20170d Default config: use new `awful.spawn.spawn` 2015-10-10 22:37:27 +02:00
Uli Schlachter 7ed29196bb Make awesome.quit() during startup work
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-10 22:25:56 +02:00
Daniel Hahler 4d5a3eb3ba Fix awful.util.spawn*/.pread deprecation wrappers
- Fix `util.spawn_with_shell`.
 - Provide deprecation wrapper for awful.util.pread.
 - Return in deprecation wrapper for awful.util.spawn*.

Closes https://github.com/awesomeWM/awesome/pull/506.
Closes https://github.com/awesomeWM/awesome/pull/511.
2015-10-10 22:19:45 +02:00
Uli Schlachter f6e633eee4 Add a --replace argument
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-10 22:19:22 +02:00
Uli Schlachter 19111121ce Check if WM_Sn is already owned before acquiring it
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-10 22:12:25 +02:00
Uli Schlachter 86313e0afd Send an event after we acquired the WM_Sn selection
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-10 22:06:41 +02:00
Uli Schlachter e824f8f30d Exit when we loose the WM_Sn selection
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-10 21:59:12 +02:00
Uli Schlachter 5a17b3978c Acquire the WM_Sn selection during startup
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-10 21:51:04 +02:00
Uli Schlachter 79fa6ad017 Fix client_apply_size_hints()
The bit that indicates that the base size is set is
XCB_ICCCM_SIZE_HINT_BASE_SIZE. However, instead this code checked
XCB_ICCCM_SIZE_HINT_P_SIZE which is set to indicate how the initial window
position is chosen. So we were checking the complete wrong bit. Whoops...

Fixes: https://github.com/awesomeWM/awesome/issues/456

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-10 21:13:40 +02:00
Uli Schlachter b34a653448 Merge branch 'master' of https://github.com/everslick/awesome 2015-10-10 19:58:45 +02:00
Uli Schlachter 22305f3abf Merge branch 'client_resize_do-prefer-current' of https://github.com/blueyed/awesome 2015-10-10 19:57:45 +02:00
Uli Schlachter b1493c8f76 Merge branch 'enhance_menubar_icon_path_lookup' of https://github.com/nuko8/awesome 2015-10-10 19:54:23 +02:00
Uli Schlachter e3199edca1 Merge branch 'snid_callback' of https://github.com/Elv13/awesome-1 2015-10-10 19:52:41 +02:00
Uli Schlachter a66517bb75 Merge branch 'test-runner-for-bisect' of https://github.com/blueyed/awesome 2015-10-10 19:52:11 +02:00
Uli Schlachter b89918d0f1 Merge branch 'remember-mouse-pos-per-screen' of https://github.com/Bew78LesellB/awesome 2015-10-10 19:51:00 +02:00
Uli Schlachter e15df8cba9 Merge branch 'client-movetoscreen-raise-true' of https://github.com/blueyed/awesome 2015-10-10 19:50:18 +02:00
lesell_b 4003331b41 fix missing scope on the mouse position table 2015-10-09 21:27:17 +02:00
Uli Schlachter 67faf52bab Properly update multiple taglists
My recent refactoring accidentally made the taglist only connect to the signal
for the first screen on which a taglist is created. This commit fixes the code
so that it connects for all screens.

Fixes https://github.com/awesomeWM/awesome/issues/500

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-09 20:59:18 +02:00
Daniel Hahler dcdd60382f Raise client in awful.client.movetoscreen
The intention of [#98] / fbc72624 was to actually raise the client,
but that was never the case apparently, and got totally lost in
[#441] / 57755b3.

[#98]: https://github.com/awesomeWM/awesome/pull/98
[#441]: https://github.com/awesomeWM/awesome/pull/441
2015-10-08 13:59:57 +02:00
lesell_b f2b6aa105c Update saved mouse position on screen focus change
Signed-off-by: lesell_b <lesell_b@epitech.eu>
2015-10-08 04:40:59 +02:00
lesell_b 23b2fae6a9 Remember mouse position per screen
The mouse position is saved and restored when focusing another screen

If the target screen has no saved mouse position, the relative position
of the current screen is used

Signed-off-by: lesell_b <lesell_b@epitech.eu>
2015-10-08 03:52:03 +02:00
Daniel Hahler fa1dea6df4 Improve test runner to be usable for git-bisect 2015-10-03 14:54:17 +02:00
Emmanuel Lepage Vallée ee0e9badfa Merge pull request #491 from actionless/awful-key-data
feat(lib: awful: key): save current hotkeys
2015-09-30 17:25:39 -04:00
actionless 0e3009936c feat(lib: awful: key): save current hotkeys 2015-09-30 13:17:12 +02:00
Emmanuel Lepage Vallee 4095eb91a8 Move util.spawn to a new module, add ability to spawn with properties
* This commit add a new module to avoid a (4 level) loop dependency
* It is now possible to call awful.spawn() with a table of properties
* awful.rules is used to execute the rules.

* Everything is public to allow alternative workflow modules such as
    Tyrannical to use their own callback implementation.
2015-09-29 18:05:56 -04:00
Uli Schlachter 5f6bbdfc63 Add and use luaA_tolstring()
This is a version of luaL_tolstring() that also works with Lua 5.1.

Closes https://github.com/awesomeWM/awesome/issues/471.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-29 00:28:26 +02:00
Uli Schlachter a3e690d191 imagebox: Redraw in :set_image()
If someone modifies a cairo surface and then sets the resulting object as the
image of an imagebox, the imagebox needs to redraw. Thus, since surfaces are
modifiable, we cannot assume that nothing changed when the same image is set
multiple times on an imagebox.

However, the dimensions of a surface cannot be changed and thus this does not
need to emit widget::layout_changed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-29 00:28:26 +02:00
Uli Schlachter a71d12f07b awful.client.cycle: Fix API docs
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-29 00:28:26 +02:00
Uli Schlachter 2f78ec5b30 Never explicitly focus the root window
Whenever client.focus == nil, we set the input focus to the root window to
express "nothing has the input focus". However, thanks to the way X11 input
works, this means that whatever is under the mouse cursor gets keyboard input
events. This can easily be reproduced with urxvt and some small addition to the
config to unfocus things.

This commit changes things. Instead of focusing the root window, we create a
special "no focus" window that gets focused if we want nothing to have the
focus.

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

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-28 23:36:23 +02:00
Daniel Hahler dd657c0531 Merge pull request #479 from psychon/leaks
Add integration tests checking for leaks and fix some results.

Closes https://github.com/awesomeWM/awesome/pull/479.
2015-09-28 23:35:56 +02:00
Daniel Hahler d544421c67 Travis: add luajit-5.1
This refactors the env vars for the build matrix:

 - add LUANAME
 - drop LUALIB
 - add LUAINCLUDE for special luajit include dir.
 - add LUAROCKS_ARGS for luarocks' `configure --lua-suffix=jit-2.0.0-beta9`.

Closes https://github.com/awesomeWM/awesome/pull/484.
2015-09-28 23:35:22 +02:00
Kazunobu Kuriyama 2f7f25dcc7 Fix the definition of A_STRNEQ_CASE
Replace A_STRCASEEQ whose definition is not given anywhere with A_STREQ_CASE.

Closes https://github.com/awesomeWM/awesome/pull/488.
2015-09-28 23:34:52 +02:00
Uli Schlachter 3e9fdea650 test-leaks: Fix with Lua 5.1
I have no idea why this needs collectgarbage() to be called twice.

On the other hand, I can explain the change in tooltip.lua. Lua 5.2 introduced
"ephermeron tables". This means that in the following sitation, lua 5.2 can
collect the entry from the table, while 5.1 keeps the entry alive, because the
table has a strong reference to the value and that in turn has a strong
reference to the key:

  t = setmetatable({}, { __mode = "k"})
  do
    local k = {}
    t[k] = function() print(k) end
  end
  collectgarbage("collect")
  print(next(t, nil))

To handle this incompatibility, this commit just removes the whole indirection
through the module-level variable "data".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-27 16:04:20 +02:00
Uli Schlachter 94271e8c91 test-leaks.lua: Also test tooltips
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-27 15:31:42 +02:00
Uli Schlachter f7799cbb7f Refactior test-leaks a bit
I think it looks nicer with this helper function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-27 15:30:04 +02:00
Uli Schlachter cd1ad8b753 Don't measure time for creating wiboxes
Apparently some of the last commits speeds up create_wibox() a lot. This
highlights that this is a bad test: After creating thousands of wiboxes, awesome
needed 15 seconds to draw all of them and in the end some dbus timeout aborted
the test run.

However, it's irrelevant how quickly we can create wibox. The interesting number
is how quickly we can display a new wibox. Thus, this commits changes the code
so that it also measures the time that is needed to update the wibox. This way,
we don't accumulate a huge number of pending repaints and everything's fine.

Some results (but there is nothing to compare this with):
   create&draw wibox: 0.0373947  sec/iter ( 28 iters, 1.59 sec for benchmark)
    update textclock: 0.00198174 sec/iter (515 iters, 1.937 sec for benchmark)
  relayout textclock: 0.000614439 sec/iter (1710 iters, 1.051 sec for benchmark)
    redraw textclock: 0.00116882 sec/iter (865 iters, 2.962 sec for benchmark)
          tag switch: 0.000705579 sec/iter (1498 iters, 3.703 sec for benchmark)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-27 15:07:22 +02:00
Uli Schlachter dc2147208f tests: Return more widgets from create_wibox()
All of these are checked for being GC'able in test-leaks.lua.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-27 14:44:19 +02:00
Uli Schlachter bd47edb4ef leak test: Make the layoutbox test pass
This commit does two things: It gets rid of the reference to the layoutbox that
the default config created and it changes the widget dependency cache to not
keep widgets alive unnecessarily.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-27 14:42:39 +02:00