Commit Graph

8665 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallée b81b2149f6 Merge pull request #1679 from psychon/keyboard-layout-changes
Asynchronously update the keyboard state
2017-03-29 13:59:34 -04:00
Uli Schlachter 98b931c1a4 Fix travis package list (#1681)
The entry "gtk+3.0" caused the following to happen:

  Note, selecting 'libcanberra-gtk3-0-dbg' for regex 'gtk+3.0'
  Note, selecting 'monodoc-gtk3.0-manual' for regex 'gtk+3.0'
  Note, selecting 'libgtk3.0-cil' for regex 'gtk+3.0'
  Note, selecting 'libavahi-ui-gtk3-0' for regex 'gtk+3.0'
  Note, selecting 'libwxgtk3.0-0-dbg' for regex 'gtk+3.0'
  Note, selecting 'libseed-gtk3-0' for regex 'gtk+3.0'
  Note, selecting 'libgtk3.0-cil-dev' for regex 'gtk+3.0'
  Note, selecting 'libcanberra-gtk3-0' for regex 'gtk+3.0'
  Note, selecting 'libinfgtk3-0.5-0' for regex 'gtk+3.0'
  Note, selecting 'libwxgtk3.0-0' for regex 'gtk+3.0'
  Note, selecting 'gir1.2-dbusmenu-gtk3-0.4' for regex 'gtk+3.0'
  Note, selecting 'libwxgtk3.0-dev' for regex 'gtk+3.0'

This was clearly not intended. Fix this by using gir1.2-gtk-3.0 instead,
which is what we actually want (GObject introspection data for GTK 3).

This pretty much reverts commit 30a527fcfd.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-29 18:47:44 +02:00
Uli Schlachter 2f652a1de9 Speed up tests/run.sh on Travis (#1682)
tests/run.sh waits for awesome to exit via tail's "--pid" option. This
makes tail check once per second if the process still exists and if not,
tail will exit. However, the default of "once per second" causes lots of
wasted time for us.

This commit adds the argument "-s 0.1" to tail which makes tail check
once every 0.1 seconds. This commit changes the time that "tests/run.sh"
runs on Travis from about 60 seconds to about 35 seconds, which is a big
improvement.

Closes: https://github.com/awesomeWM/awesome/issues/1374
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-29 18:46:47 +02:00
Uli Schlachter 9f3a6757e9 Asynchronously update the keyboard state
When the keyboard layout is modified via xmodmap, each single "change"
(line of input to xmodmap) causes an "the keyboard configuration
changed"-event to be sent. Awesome reacted to each of these events by
reloading the keyboard layout. Thus, awesome reloaded the keyboard
layout a lot and appeared to freeze.

Fix this by asynchronously update the keyboard state: When such an event
comes in, instead of reloading things immediately, we set a flag which
makes us update the state at the end of the main loop iteration. This
means that many events still cause only a single (or at least few)
re-quering of the layout. Thus, a lot of time is saved.

This commit removes the argument to the (undocumented!) signal
xkb::group_changed. Previously, the argument was the active group
number. Since this argument was unused and I'm lazy, I just removed it.
The alternative would be that it might be visible to Lua that some "the
active group changed"-events are dropped.

Fixes: https://github.com/awesomeWM/awesome/issues/1494
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-28 15:21:01 +02:00
Emmanuel Lepage Vallee 686abd174f Merge branch 'xdg' 2017-03-26 21:04:27 -04:00
Uli Schlachter 3bda88ff64 Remove obsolete entries from check_for_invalid_requires.lua (#1673)
Most of the entries that are marked as "TODO: Get rid of these" were
handled. wibox.layout.align:get_children() never worked (it always
called a non-existent function), so we can easily fix this entry without
introducing a regression.

I opened https://github.com/awesomeWM/awesome/issues/1672 to track the
underlying problem behind the broken :get_children() function (which is
missing test coverage).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-26 15:20:18 -04:00
Emmanuel Lepage Vallée b3d1114e88 Merge pull request #1674 from firefish5000/firefish5000-imagebox
Add null check to set imagebox to blank state
2017-03-26 15:19:08 -04:00
Emmanuel Lepage Vallée 06a7818c09 tests: Test imagebox:set_image(nil) 2017-03-26 17:51:11 +02:00
FireFish5000 ffda3b0c4c Add null check to set imagebox to blank state 2017-03-25 00:07:55 -05:00
romildo ea2c9deb68 menubar: consider XDG_HOME_DIR and XDG_DATA_DIRS
The freedesktop specifications let desktop files be stored in
different directories indicated by the environment variables
XDG_DATA_HOME and XDG_DATA_DIRS.

Only use the default value for these variables if the variables are
not defined.

This is important for systmes like NixOS which does not follow the LFS
and installs files differently.
2017-03-20 20:20:36 -04:00
romildo 62edc5a200 Add get_xdg_data_home and get_xdg_data_dirs functions to gears.filesystem 2017-03-20 20:20:36 -04:00
romildo d22207386f Add map function to gears.table 2017-03-20 20:20:36 -04:00
romildo 894c254c42 Add string split function to gears.string 2017-03-20 20:20:36 -04:00
Emmanuel Lepage Vallée 7818fd3dba Merge pull request #1666 from awesomeWM/doc_tag_signal
doc: Add 2 missing tag singals
2017-03-19 17:21:42 -04:00
Emmanuel Lepage Vallée c158a32547 Merge pull request #1665 from awesomeWM/swap_find_by_name_args
doc: find_by_name: Fix the doc
2017-03-19 17:21:27 -04:00
Emmanuel Lepage Vallée 9aa801cc97 doc: Add 2 missing tag singals 2017-03-19 16:28:38 -04:00
Emmanuel Lepage Vallée 32341b1091 doc: find_by_name: Fix the doc
Swap the parameters the next time the API break / deprecation season is open.

This is indeed confusing, as reported on IRC. The screen is *not* optional,
`awful.tag.find_by_name(name)` wont work
2017-03-19 16:06:22 -04:00
Emmanuel Lepage Vallée 4a21fc5bf0 Merge pull request #1659 from Elv13/updateNews
Update the NEWS
2017-03-18 16:04:09 -04:00
Emmanuel Lepage Vallee 652a9f109d Update the NEWS 2017-03-18 15:28:29 -04:00
Uli Schlachter 088584c812 change codename
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-18 10:49:46 +01:00
Uli Schlachter 3f2bcfdb97 Fix misuse of @deprecated tag
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-18 10:43:55 +01:00
Emmanuel Lepage Vallée b73f9e963c Merge pull request #1613 from SammysHP/spawn-cursor
Add beautiful property to control busy cursor during spawn
2017-03-17 15:15:19 -04:00
Emmanuel Lepage Vallée 2c30991579 Merge pull request #1620 from psychon/menubar-remove-get2
Deprecate menubar.get()
2017-03-16 16:40:23 -04:00
Emmanuel Lepage Vallée c31b30e52f Merge pull request #1656 from Veratil/deprecate-to-gears
Move awful.util.deprecate and awful.util.deprecate_class to gears.debug
2017-03-16 16:17:38 -04:00
Emmanuel Lepage Vallée 17051d0520 Merge pull request #1624 from psychon/doc_fix
Use only_on_screen widget in docs
2017-03-16 16:16:42 -04:00
Kevin Zander 7687275607 Move awful.util.deprecate and awful.util.deprecate_class to gears.debug
Change all awful.util function calls to gears.debug function calls
Update all old deprecate calls to have deprecated_in=4
2017-03-15 20:08:22 -05:00
Emmanuel Lepage Vallée f57e3eb48c Merge pull request #1581 from Veratil/gears-fs
Move filesystem functions out of awful.util into new gears.filesystem
2017-03-15 20:38:49 -04:00
Kevin Zander 45dadde0dd Move filesystem functions out of awful.util into new gears.filesystem
Update awful.util filesystem function calls to gears.filesystem function calls
Rename getdir to get_dir for consistency
2017-03-15 13:46:33 -05:00
Lego Stax 7c775e967c Fix 'no such file' errors for icons (#1655)
Fixes https://github.com/awesomeWM/awesome/issues/1650.

Signed-off-by: Lego Stax legostax@gmail.com
2017-03-15 17:29:53 +01:00
Patrick Uven 008bd185ba Add scale factor to gears.wallpaper.centered (#1653) 2017-03-14 20:53:27 +01:00
Emmanuel Lepage Vallée 26fedadc07 Merge pull request #1654 from copycat-killer/property_icon_sizes
pull #1648: add icon_sizes property signal emission
2017-03-14 15:21:17 -04:00
Luke Bonham 30542351da pull #1648: add icon_sizes property signal emission 2017-03-14 19:38:25 +01:00
Emmanuel Lepage Vallee 05717026b7 menubar: Fix a typo in the code
Find/replace error when porting the deprecated code

Regression from 2f105eac86
Fix #1652
See #1072
2017-03-13 03:40:41 -04:00
Emmanuel Lepage Vallée 901df65eb0 Merge pull request #1629 from psychon/geometry_spec
Some small-ish work on gears.geometry
2017-03-12 15:45:00 -04:00
Emmanuel Lepage Vallée 957966d636 Merge pull request #1646 from psychon/systray_removal
Partly fix removal of systray from a wibox
2017-03-12 15:43:40 -04:00
Emmanuel Lepage Vallée 4af6b33fbf Merge pull request #1648 from copycat-killer/color_icon_fix
ldoc: fixes in lib/gears/color.lua and objects/client.c
2017-03-12 15:21:43 -04:00
Uli Schlachter da276dc8fb Add some tests for gears.geometry.rectangle.area_remove
This tests are not-really-good because they are overly specific. They
test for the current behaviour of the implementation, but I guess that a
valid implementation could also behave slightly different. However, for
now this will have to be enough.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-12 17:01:45 +01:00
Uli Schlachter 7dcbd62264 Add tests for gears.rectangle.get_in_direction
These tests are basically just copied from the tests for
awful.screen.get_next_in_direction.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-12 17:01:45 +01:00
Uli Schlachter 7511ae5075 Add some tests for gears.geometry
get_in_direction and area_remove are still missing.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-12 17:01:45 +01:00
Uli Schlachter 2a57d944ba gears.geometry: Fix rectangle intersection computation
Previously, when gears.geometry.rectangle.get_intersection() was called
with two non-intersecting rectangles, it would return a negative
width/height.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-12 17:01:45 +01:00
Luke Bonham d3b8088c1b ldoc: fixes in lib/gears/color.lua and objects/client.c 2017-03-12 11:45:41 +01:00
Emmanuel Lepage Vallée 4a42ed0d44 Merge pull request #1636 from psychon/client-icons2
Add support for multiple client icons
2017-03-11 18:59:09 -05:00
Kevin Zander 2f105eac86 Move string functions out of awful.util into new gears.string (#1584)
Update deprecated awful.util string function calls to gears.string calls
2017-03-11 18:57:32 -05:00
Uli Schlachter 64b964972b systray: Enable properties and improve documentation
I spent way too much time trying to figure out why setting "visible" to
false did not work...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-11 18:46:40 +01:00
Uli Schlachter 13dbc558fc wibox.hierarchy: Only count "really visible" widgets
Widgets with width or height zero cannot really be counted as visible,
so do not do so.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-11 18:44:56 +01:00
Uli Schlachter 51e4a47938 Partly fix removal of systray from a wibox
This commit changes the systray widget, wibox.drawable and the C code to
fix the following bug: When the systray widget is removed from a
drawable without being moved somewhere else, the systray stayed visible.
This was because the systray is not drawn by awesome, but only placed.
When the widget is no longer "drawn", it stays wherever it was placed
last.

This change works by detecting the situation when the systray is
removed. Then, the C code is specifically told to remove the systray
window from the drawable.

Note that this is only a partial fix. This change works correctly when
the widget is removed completely, because it is no longer placed by its
parent widget. However, for example, when you do
wibox.widget.systray().visible = false, the effect is just that the
systray widget gets size 0x0. This is not really visible, but as far as
this change is concerned, the widget is still part of the drawable.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-11 18:14:38 +01:00
Uli Schlachter e1fe1de98f wibox.hierarchy: Add ability to count widgets
This adds new code so that we can count how often a specific widget is
visible inside of all widget hierarchies.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-11 13:55:57 +01:00
Christoph Mertz 2d91d49b30 awful.screen.focus_bydirecttion: fix setting screen focus (#1635)
This was broken in 9cb60b8 in PR #1597 (from myself).

focus() is not defined on the screen instance as method
but on the screen module as function.

Signed-off-by: Christoph Mertz <chris@nimel.de>

Fix #1644
2017-03-09 00:07:35 -05:00
Emmanuel Lepage Vallée b28dba3165 Merge pull request #1619 from Veratil/move-pango-color
Move ensure_pango_color out of awful.util to gears.color
2017-03-08 17:03:33 -05:00
Kevin Zander 0066257a59 Move ensure_pango_color out of awful.util into gears.color
Update deprecated awful.util.ensure_pango_color calls to gears.color.ensure_pango_color calls
2017-03-08 15:28:48 -06:00