1552 Commits

Author SHA1 Message Date
Benedikt Heine
3b3ed0328e Free layouts inline 2018-10-01 15:05:42 +02:00
Benedikt Heine
0231fabbd3 Make parse_follow_mode a real parser function 2018-10-01 14:58:36 +02:00
Benedikt Heine
4b5cc2c9bc Remove superfluous fflush call
The blame reveals commit 820cfe73, which introduced printing of
notifications similar to notification_print(). The fflush call is still
left over since porting the printfs into their dedicated method.

As notification_print() is called after this fflush() call, it's not
necessary anymore.
2018-10-01 14:58:36 +02:00
Benedikt Heine
c5c4b2cafb Use native notification functions in test
Since we'll allocate also some recursive elements with
notification_create, we have to free the notification properly.
2018-10-01 13:11:21 +02:00
Nikos Tsipinakis
740ebdd5a3
Merge pull request #545 from tsipinakis/bugfix/x11-opt
Draw event optimizations
2018-09-24 20:25:17 +03:00
Nikos Tsipinakis
09ef1b2b32
Merge pull request #531 from bebehei/typenames
Refactor typenames
2018-09-24 15:55:28 +03:00
Nikos Tsipinakis
7ac054b3cc Simplify window showing and hiding
As suggested by @bebehei make x_win_{show,hide} callable at any time and
avoid double checking the queue length.
2018-09-20 10:49:40 +03:00
Nikos Tsipinakis
69100790a1 Do not wake up on focus events
Focus events do not mark any change in state of the notifications so
calling wake_up as a response is a wake of CPU cycles. Instead treat
them like PropertyNotify and only redraw if we need to change monitors.
2018-09-20 10:40:05 +03:00
Benedikt Heine
476ddc81ff Remove last "color color" 2018-09-16 02:58:40 +02:00
Benedikt Heine
41af2e0a0e Rename variable name color to actual foreground 2018-09-16 02:58:38 +02:00
Benedikt Heine
c712f57ace Reformat ellipsize enum 2018-09-16 02:58:37 +02:00
Benedikt Heine
c5d552856f Reformat icon_position enum 2018-09-16 02:58:35 +02:00
Benedikt Heine
2a5fe938f6 Reformat alignment enum 2018-09-16 02:58:33 +02:00
Benedikt Heine
bbbddad3a7 Use structs for notifications 2018-09-16 02:58:31 +02:00
Benedikt Heine
1fa1532d7f Pack type rule_t into struct rule 2018-09-16 02:58:27 +02:00
Benedikt Heine
de0f0bf3d9 Pack type RawImage into raw_image struct 2018-09-16 02:58:26 +02:00
Benedikt Heine
8010f83286 Pack Actions type into struct actions 2018-09-16 02:58:23 +02:00
Benedikt Heine
a4ebf4f4e6 Pack option_parser.c types into structs 2018-09-16 02:58:21 +02:00
Benedikt Heine
a661b2bb85 Pack settings related types into structs 2018-09-16 02:58:19 +02:00
Benedikt Heine
c944949e36 Pack types from x.c into structs 2018-09-16 02:58:13 +02:00
Nikos Tsipinakis
fab2543f06
Merge pull request #541 from bebehei/concatenated-queues
Concatenated queues
2018-09-14 16:47:22 +03:00
Benedikt Heine
e1ee87b5d3 When traversing both queues, traverse in one loop
On actions, where waiting and displayed has to get traversed, traverse
them both in a single loop. Code duplication isn't necessary anymore.
2018-09-14 15:37:22 +02:00
Benedikt Heine
34e97b3e94 Optimize freshly introduced queues_update code 2018-09-14 15:37:12 +02:00
Nikos Tsipinakis
f76af36743
Merge pull request #547 from knopwob/random_stuff
Random fixes
2018-09-14 15:55:44 +03:00
Sascha kruse
bf286f73cd remove unnecessary initialization of variable
The inizialization value is never used and is overriden
directly after.
2018-09-14 14:37:27 +02:00
Sascha kruse
199aaf1181 fix comments in log.h 2018-09-14 13:36:05 +02:00
Sascha kruse
183f29b59d remove dead comment 2018-09-14 13:30:27 +02:00
Sascha kruse
562cb93767 remove unneeded declaration extract_urls 2018-09-14 13:29:13 +02:00
Nikos Tsipinakis
81fae350c9 Fix draw being called twice when mapping the window 2018-09-13 18:20:06 +03:00
Benedikt Heine
76fecedfd8
Merge pull request #544 from knopwob/master
draw the window before showing it
2018-09-13 16:55:33 +02:00
Sascha kruse
e09e29968a draw the window before showing it
Before this commit when using Dunst with multiple displays and
follow mode mouse/keyboard on a new notification (when no other
notifications are shown) a black window flickers up at the screen where
the last notification was shown.

By calling draw() before x_window_show the new window position will be
calculated and the window will be moved there before the window is shown
and thus remove the flickering.
2018-09-13 16:03:26 +02:00
Benedikt Heine
4c26ab442a Use the first waiting notification to generate xmore
Using the last notification from displayed creates confusion about
nonexisting notifications.
2018-09-13 12:08:41 +02:00
Benedikt Heine
f14b0b2b4a Show xmore layout only when needed
For the case, that there is a single notification waiting in queue, the
xmore layout is an annoying setting.
2018-09-13 12:08:41 +02:00
Benedikt Heine
ec26403a06 Let important notifications seep into full display queue
When the display queue had is full and a new notification would come
in, new notification wouldn't get shown until a currently displayed
notification would timeout.

Even if the notification would have been shown on top of the displayed
queue. So e.g. if the displayed queue would have been filled with
"normal" urgency notifications, an incoming "urgent" notification would
have been delayed.

To let those more important notifications through, the tail of displayed
and head of waiting are swapped on every update if necessary.
2018-09-13 11:14:33 +02:00
Benedikt Heine
c692d222d7 Save the notification's scriptrun in script_run field 2018-09-13 11:14:33 +02:00
Nikos Tsipinakis
e5dd80b9db
Merge pull request #542 from bebehei/hotfix1
Wakeup also for infinite notifs when set show_age_threshold
2018-09-08 19:51:42 +03:00
Benedikt Heine
faec6bdbca Wakeup also for infinite notifs when set show_age_threshold
For notifications without any timeout, ttl can't be positive.
So when, show_age_threshold is active, dunst won't wake up, if there
are only notifications displayed without any timeout.
2018-09-06 11:13:46 +02:00
Nikos Tsipinakis
896c008def
Merge pull request #537 from bebehei/icon-nullcheck
Avoid NULL values in fnmatch's parameters
2018-08-17 14:03:23 +03:00
Benedikt Heine
076b6936ec Avoid NULL values in fnmatch's parameters
While the rule's field will get checked for a NULL value, the
notification's field won't get, as it's assumed to be non-NULL.

This is problematic, as there can be some corner cases, where the
notification's field is actually NULL.

Fixes #536
2018-08-16 10:25:19 +02:00
Nikos Tsipinakis
a749847040
Merge pull request #535 from Saeissl/master
Add a toggle command
2018-08-11 18:43:09 +03:00
David Sauerwein
bb60ea7a48 Add a toggle command 2018-08-11 11:08:03 +02:00
Nikos Tsipinakis
0e1b5a176a
Merge pull request #525 from lulivi/master
Added dunst xresources theme wrapper
2018-07-15 12:03:15 +03:00
Nikos Tsipinakis
c0eef2da2f
Merge pull request #530 from zijung/feature-mouse_event
Add options to specify mouse event
2018-07-15 11:59:10 +03:00
lulivi
cbfe8c0d61 Add xresources config wrapper
Created a wrapper script to customize theme variables (colors,
fonts, etc) according with your X resources file (~/.Xresources).

As dunst is not a X exclusive notification daemon, this script
could be a workarround to solve this.

Related with: #357
2018-07-15 00:14:04 +00:00
Zijung Chueh
88175b259a Put the default value in the defaults 2018-07-13 21:31:51 +08:00
Zijung Chueh
7a22fa0e5f Fix code style
* Move mouse_left/middle/right_click to global section
  * Match the enum value style
  * Ignore unknow mouse event
  * Split copy-paste code into a function
  * Fix typo
2018-07-13 14:45:38 +08:00
Zijung Chueh
fbcc26b5e1 Add options to specify mouse event 2018-07-13 01:40:20 +08:00
Nikos Tsipinakis
6d0e20e40b
Merge pull request #528 from bebehei/various
Various Improvements
2018-07-11 13:09:08 +03:00
Benedikt Heine
368182f4d7 Log XEvents by their written names
All XEvents only got logged with their IDs. It makes more sense to write
out the XEvent's name. Also, writing that we received an XEvent and then
logging again, that we ignored it, makes no sense.
2018-07-10 13:35:51 +02:00
Benedikt Heine
3c69e1f263 Remove doubly variables while converting dbus message 2018-07-10 13:35:51 +02:00