Commit Graph

8724 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallée 63f78c29a4 Merge pull request #1688 from getzze/deprec_menubar
Remove deprecated function call
2017-04-02 21:45:06 -04:00
Emmanuel Lepage Vallée 9508666484 Merge pull request #1698 from psychon/ewmh-doc-fix
awful.ewmh.add_activate_filter: Fix doc example
2017-04-02 21:43:07 -04:00
Uli Schlachter 4b0070ea88 Ignore MappingNotify events
All we do with MappingNotify events is to print a warning. This is
because the XKB protocol specification says (§12.4):

     Once a client requests XkbMapNotify events, the server stops
     sending it MappingNotify events to inform it of keyboard changes.

However, as our test-keyboard-layout-changes.lua test shows, this is not
actually what happens. Instead, we seem to be getting both XkbMapNotify
and MappingNotify events.

Thus, just drop this print-a-warning-code.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-02 19:32:18 +02:00
Uli Schlachter e1b4f17e64 awful.ewmh.add_activate_filter: Fix doc example
I didn't actually test this, but at least this now looks like valid Lua
code to me, so this is definitely an improvement.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-02 18:20:48 +02:00
Emmanuel Lepage Vallée a9f1aa3237 Merge pull request #1691 from Veratil/fix-deprecated-tests-calls
Remove deprecated calls in tests
2017-03-31 19:05:51 -04:00
Kevin Zander 74fb39afbd Remove deprecated calls in tests
Change deprecated util.table call in lib/awful/widget/clienticon.lua to gears.table call
2017-03-30 23:07:20 -05:00
Emmanuel Lepage Vallée 39dca5220c Merge pull request #1690 from Veratil/fix-awesomerc-deprecated-call
Fix some deprecated calls in code and docs
2017-03-30 22:39:03 -04:00
Kevin Zander 6cb2e0fa82 Fix some deprecated calls in code and docs
Add missing newline in test runner
2017-03-30 21:26:50 -05:00
getzze 26b2065c40 Remove deprecated function call 2017-03-31 00:25:04 +01:00
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