1293 Commits

Author SHA1 Message Date
Benedikt Heine
3bfc77864f Refactor GdkPixbuf loading
Rename both functions to make clear, what the difference between the
previous functions _from_file and _from_path is. Also remove the
superfluous `== NULL` checks as these don't match dunst's current style.
2018-05-14 09:11:25 +03:00
Benedikt Heine
3f7de41732 Add tests for icon.c 2018-05-14 09:11:25 +03:00
Nikos Tsipinakis
651be8eee9 Avoid using dimensions struct for unrelated uses
The `dimension_t` struct was used in many different places and even held
on the geometry info at some point which is counter-intuitive as it's
best to have each struct serve a single purpose.
2018-05-14 09:11:25 +03:00
Nikos Tsipinakis
a7fd3cb0ec Move geometry handling to settings
Change the value of geometry in settings from an unparsed string to a
struct containing the properly parsed geometry info. Since we depend on
X11 for geometry parsing this (unfortunately) introduces an X11
dependency on the settings module, this can only be resolved if we
implement our own parsing.
2018-05-14 09:11:25 +03:00
Nikos Tsipinakis
5895593d0b Remove leftover cairo variables in x.c
Clean-up x.c from cairo items that were left over after the move to
draw.c.
2018-05-06 13:47:24 +03:00
Nikos Tsipinakis
466f95eb91 Move drawing functions to draw.c
Copy-paste all the drawing functions from x.c to draw.c. In the spirit
of making changes easily traceable the minimal amount of changes
required to make the functions work was made. Further improvement (like
removing the cairo-xlib dependency) will be done in later commits.
2018-05-06 13:47:24 +03:00
Nikos Tsipinakis
045ec98c0e Setup initial file for draw.c
Setup the initial template for draw.c to be between X11 calls and the
rest of the codebase. This prepares the file to move all the drawing
related function here in the next commit.
2018-05-06 13:47:24 +03:00
Nikos Tsipinakis
52055f12c7 Move icon related methods to icon.c
The first step to cleaning out x.c.
2018-05-06 13:47:20 +03:00
Nikos Tsipinakis
7a9187728c Merge branch 'maint' 2018-05-06 13:36:07 +03:00
Nikos Tsipinakis
f9732bd2fa Dunst v1.3.2 v1.3.2 2018-05-06 13:30:01 +03:00
Nikos Tsipinakis
6ebe7ca413 Fix crash when loading an invalid or corrupted icon
GError values should be freed with g_error_free rather than g_free it
otherwise causes a crash.

Credit to @bebehei for discovering this.
2018-05-06 13:21:47 +03:00
Nikos Tsipinakis
7dd22d79e3 Merge branch 'maint'
Closes #511
2018-05-02 18:58:07 +03:00
Nikos Tsipinakis
f8538c9a45 Remove hardcoded rule to ignore transient notifications from history
This rule was added in #343 when trying to decide what to do with
transient notifications. This seemed like a good idea at the time but it
ended up creating more confusion that necessary.

Relevant issues: #310, #508
2018-04-02 14:43:10 +03:00
Nikos Tsipinakis
d6ef1c24c5 Fix outdated documentation
The return value of queues_notification_close_id was removed in 3b6c529
but the documentation wasn't updated accordingly.
2018-04-01 00:45:29 +03:00
Nikos Tsipinakis
8547be20d7
Merge pull request #503 from bebehei/escape-summary
Escape the summary
2018-03-20 15:32:18 +02:00
Nikos Tsipinakis
7d5ea54d02
Merge pull request #504 from bebehei/monotonic-time-sleep
Count monotonic time with Linux specific clocks
2018-03-20 15:28:52 +02:00
Benedikt Heine
ac4a0becd2 Count monotonic time with Linux specific clocks
On Linux, CLOCK_MONOTONIC has got a bug. It does not count
onwards during sleep, albeit required by POSIX. This behavior
is reasoned with the requirement for poll().
Also the GLib people are sticking to this behavior in their
g_get_monotonic_time() function.

So we have to use a drop in replacement, which respects CLOCK_BOOTTIME
on Linux, as this is the clock, what would be CLOCK_MONOTONIC on POSIX
systems.
2018-03-20 14:17:03 +01:00
Benedikt Heine
80d8c40791 Escape the summary
According to the notification spec, only the body shall contain markup.
Therefore HTML symbols should get escaped in the summary, too.
2018-03-20 01:51:18 +01:00
Benedikt Heine
b5c2cdafb2
Merge pull request #501 from tsipinakis/bugfix/500
Do not expand config.mk variables on assignment
2018-03-15 04:43:17 +01:00
Nikos Tsipinakis
943b8c6785 Do not expand config.mk variables on assignment
Fix a bug introduced in 678ea70 where since the CFLAGS variable was
simply expanded it ignored the VERSION variable which was initialized
later.

Unfortunately there is no way to prepend a value to a recursively
expanded variable so instead we have to split the hardcoded compiler
flags into separate variables and combine them all later in the
makefile.

Fixes #500
2018-03-11 17:05:10 +02:00
Nikos Tsipinakis
4c5c124e1e
Merge pull request #499 from dunst-project/coveralls
Coveralls & travis build fixes
2018-03-10 10:41:26 +02:00
Nikos Tsipinakis
678ea70c88 Put user CFLAGS after the predefined flags
This allows the usage of the CFLAGS variable to override existing
parameters (e.g. optimizations) without editing config.mk.
2018-03-09 19:54:46 +02:00
Nikos Tsipinakis
063e29fd1b Remove parsing of the X11LIB variable
X11LIB was introduced along with other similar variables such as X11INC
in 1faee75, before dunst used pkg-config to manage libraries. These
variables were removed after the introduction of pkg-config in 0de2e17
so theoretically it is safe to remove it.

I really hope this doesn't break something...
2018-03-09 19:54:46 +02:00
Nikos Tsipinakis
8714a66a5b Exclude test directory from code coverage
Tests always run almost 100%, and there is no need to test our test
suite.
2018-03-09 19:54:46 +02:00
Nikos Tsipinakis
764761132f Drop travis IRC notifications
They aren't of much use and I don't think the users on IRC appreciate
the occasional notification spam when something breaks.
2018-03-09 18:19:35 +02:00
Nikos Tsipinakis
1831e9d015 Run code coverage tests without optimizations
This way the code coverage results also include code paths that are
optimized out by the compiler at higher optimization levels.
2018-03-09 18:18:05 +02:00
Nikos Tsipinakis
533f47f4c6 Fix coveralls crashing when building with clang
Coveralls defaulted to using gcov for all builds even when using clang
in which case it should have used llvm-cov. Fix this by specifying
different coveralls commands for each compiler.

Additionally, move the coverage to commands to the after_success section
to avoid sending coverage data when the build failed.
2018-03-09 18:15:26 +02:00
Nikos Tsipinakis
d536ae723c
Merge pull request #498 from shizeeg/master
per section 'frame_color' parameter
2018-03-08 20:42:46 +02:00
sh!zeeg
aa5ccd7dd7 per section 'frame_color' parameter 2018-03-08 21:33:28 +03:00
Benedikt Heine
f80e6fc579
Merge pull request #472 from bebehei/fullscreen
Implement hiding on fullscreen
2018-02-25 20:50:54 +01:00
Benedikt Heine
0cf4753a68 Wake up for fullscreen change events
The PropertyNotify handling has been changed in the dropgtk branch to
ignore XEvents, when redrawing was unnecessary. But when the fullscreen
state of a window changes, we can't ignore the event, because it didn't
change the screen.

Additionally, there had been a mistake in the handling of the cur_screen:
The xctx.cur_screen field will only get updated, when the application is
visible and gets redrawn. Therefore, when a PropertyNotify event arrived
while the application had been hidden and the screens do not match
anymore, wake_up() will be called albeit being unnecessary.

Calling x_win_draw() when the screens change is also the preferable
solution over wake_up(), as there is nothing subject to change in the
queues when the displays change.
2018-02-25 20:44:31 +01:00
Benedikt Heine
a7bc16874d log wakeup 2018-02-25 20:44:31 +01:00
Benedikt Heine
c12873184c Debug processed XEvents 2018-02-25 20:44:23 +01:00
Benedikt Heine
aa5cc977cc Add pushback mode 2018-02-25 20:18:40 +01:00
Benedikt Heine
0f46564e97 Print fullscreen value of notification 2018-02-25 20:18:40 +01:00
Benedikt Heine
dd28e62c11 Add Error Handler to fullscreen check 2018-02-25 20:18:40 +01:00
Benedikt Heine
aa7a851fdd Catch screen without window 2018-02-25 20:18:40 +01:00
Benedikt Heine
bbe262853a Add documentation for fullscreen rules 2018-02-25 20:18:40 +01:00
Benedikt Heine
f89ce8e16f Delay incoming notifications when fullscreens set 2018-02-25 20:18:40 +01:00
Benedikt Heine
bda8c1dbb2 Add rule to show notification on fullscreen 2018-02-25 20:18:40 +01:00
Benedikt Heine
9e824a79ee Add functions to check fullscreen windows 2018-02-25 20:18:36 +01:00
Benedikt Heine
28db0416b4
Merge pull request #491 from bebehei/docs
Parsable markup documentation with doxygen
2018-02-22 21:34:42 +01:00
Benedikt Heine
422f353243 Add initial doxygen documentation 2018-02-22 20:08:00 +01:00
Benedikt Heine
6bf886d437 Add Doxygen support 2018-02-22 20:08:00 +01:00
Benedikt Heine
c4eb26e3f5 Remove unnecessary return value 2018-02-20 17:05:55 +01:00
Benedikt Heine
3b6c5299be Use void as argument for parameterless functions 2018-02-20 16:24:00 +01:00
Nikos Tsipinakis
8735c9d3d0
Remove binary file in source directory
This file was added in the logging PR probably by accident or as a
result of `git add --all` (which is why its usage is discouraged).
    
This should have really been caught during code review but accidents
happen!
2018-02-15 12:37:38 +02:00
Benedikt Heine
c3e8bedfab
Merge pull request #474 from bebehei/logging
Logging with GLib
2018-02-12 13:13:37 +01:00
Benedikt Heine
6402218205 Remove negative NULL-check warning
According to the docs in the GSourceFuncs, the timeout_ parameter can be
NULL. But when it's NULL, it would be equivalent to an invocation to
return -1 as timeout_ and FALSE as return value. This is exactly the
same, what we're doing if timeout_ is not NULL.
2018-02-02 17:29:05 +01:00
Benedikt Heine
1e6a15de00 Fix memleak 2018-02-02 17:29:05 +01:00