aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/metadata-widget.c5
-rw-r--r--src/pulseaudio-mgr.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/metadata-widget.c b/src/metadata-widget.c
index 8ab7d1d..96d55ab 100644
--- a/src/metadata-widget.c
+++ b/src/metadata-widget.c
@@ -331,7 +331,7 @@ metadata_widget_icon_triangle_draw_cb_gtk_3 (GtkWidget *widget,
x = allocation.x;
y = 0;
- gint offset = (allocation.height - gdk_pixbuf_get_height (priv->icon_buf)) / 2;
+ gint offset = gdk_pixbuf_get_height (priv->icon_buf) / 3;
// Draw player icon
if (priv->icon_buf != NULL){
@@ -345,7 +345,8 @@ metadata_widget_icon_triangle_draw_cb_gtk_3 (GtkWidget *widget,
// Draw triangle but only if the player is running.
if (dbusmenu_menuitem_property_get_bool (priv->twin_item,
DBUSMENU_METADATA_MENUITEM_PLAYER_RUNNING)){
- y += allocation.height/2.0 - (double)arrow_height/2.0;
+ y += gdk_pixbuf_get_height (priv->icon_buf) / 3 + 3;
+ //allocation.height/2.0 - (double)arrow_height/2.0;
cairo_set_line_width (cr, 1.0);
//g_debug ("triangle drawing");
diff --git a/src/pulseaudio-mgr.c b/src/pulseaudio-mgr.c
index 1da8ce1..ad6d34f 100644
--- a/src/pulseaudio-mgr.c
+++ b/src/pulseaudio-mgr.c
@@ -175,7 +175,7 @@ void
pm_update_volume (gint sink_index, pa_cvolume new_volume)
{
// LP: #850662
- if (sink_index < 0){
+ if (sink_index < 0 || pulse_context == NULL){
return;
}
pa_operation_unref (pa_context_set_sink_volume_by_index (pulse_context,
@@ -197,7 +197,7 @@ void
pm_update_mic_gain (gint source_index, pa_cvolume new_gain)
{
// LP: #850662
- if (source_index < 0){
+ if (source_index < 0 || pulse_context == NULL){
return;
}
pa_operation_unref (pa_context_set_source_volume_by_index (pulse_context,