~didrocks/notify-osd/bootstrap

« back to all changes in this revision

Viewing changes to src/defaults.h

  • Committer: Tarmac
  • Author(s): Michael Terry
  • Date: 2012-11-26 19:37:13 UTC
  • mfrom: (456.1.1 no-border)
  • Revision ID: tarmac-20121126193713-qcfs6arzuhuepwmf
When running without a compositor, there is an ugly black border.

This branch fixes that by:
1) Adding an 'is_composited' argument to defaults_get_bubble_shadow_size and defaults_get_bubble_corner_radius.  If we're not composited, they return 0.0f.
2) Adding a 'GdkScreen **screen' argument to defaults_get_top_corner
3) Using these throughout to check composited state wherever these are used.

Additionally, I had to add some oddness in bubble.c for _refresh_background.  There is a bit of code that draws a (seemingly unnecessary) image in shadow-size-units even in the uncomposited case.  But it can't use 0 because that causes a crash to create a 0-sized image.  So I used 1 for that special case.  Seems like it would be cleaner to avoid that path in uncomposited mode, but I didn't feel confident enough to make that change.

Approved by Didier Roche, jenkins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
#include <glib-object.h>
33
33
#include <gio/gio.h>
 
34
#include <gdk/gdk.h>
34
35
 
35
36
G_BEGIN_DECLS
36
37
 
177
178
defaults_get_bubble_horz_gap (Defaults* self);
178
179
 
179
180
gdouble
180
 
defaults_get_bubble_shadow_size (Defaults* self);
 
181
defaults_get_bubble_shadow_size (Defaults* self, gboolean is_composited);
181
182
 
182
183
gchar*
183
184
defaults_get_bubble_shadow_color (Defaults* self);
192
193
defaults_get_bubble_hover_opacity (Defaults* self);
193
194
 
194
195
gdouble
195
 
defaults_get_bubble_corner_radius (Defaults* self);
 
196
defaults_get_bubble_corner_radius (Defaults* self, gboolean is_composited);
196
197
 
197
198
gdouble
198
199
defaults_get_content_shadow_size (Defaults* self);
258
259
defaults_refresh_screen_dimension_properties (Defaults *self);
259
260
 
260
261
void
261
 
defaults_get_top_corner (Defaults *self, gint *x, gint *y);
 
262
defaults_get_top_corner (Defaults *self, GdkScreen **screen, gint *x, gint *y);
262
263
 
263
264
Gravity
264
265
defaults_get_gravity (Defaults *self);