New upstream version 1.1.8

parent aa308652
trayer changelog
1.1.8
* Replace depricated gdk functions
* Fix position update on screen configuration change
1.1.7
* Library cleanup
* Icon Spacing
......
......@@ -26,10 +26,10 @@ CFLAGS ?= -g -Wall
endif
%.o: %.c
$(CC) $(CFLAGS) $(INCS) -c $<
$(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -c $<
%.dep: %.c
$(CC) $(CFLAGS) $(INCS) -MM $< -o $@
$(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -MM $< -o $@
.PHONY: all clean distclean install uninstall
......
......@@ -552,13 +552,13 @@ calculate_position(panel *np, int distance,int distancefrom)
ENTER;
display = gdk_display_get_default ();
screen = gdk_display_get_screen(display,0);
screen = gdk_display_get_default_screen(display);
monitorGeometry = (GdkRectangle*) malloc(sizeof(GdkRectangle));
if (np->monitor >= gdk_screen_get_n_monitors(screen)) {
np->monitor = 0;
ERR("trayer: monitor parameter isn't valid, reseting value to 0\n");
ERR("trayer: monitor parameter isn't valid, resetting value to 0\n");
}
gdk_screen_get_monitor_geometry(screen,np->monitor,monitorGeometry);
......
......@@ -16,7 +16,7 @@
#include "main.h"
#include "gdk-helper.h"
#define VERSION "1.1.6"
#define VERSION "1.1.8"
static gchar version[] = VERSION;
int distance=0, distancefrom=DISTANCEFROM_TOP;
......@@ -247,7 +247,9 @@ static gboolean
panel_monitors_changed(GdkScreen* s, panel* p)
{
ENTER;
p->monitor = gdk_screen_get_primary_monitor(s);
if ( p->on_primary ) {
p->monitor = gdk_screen_get_primary_monitor(s);
}
calculate_position(p, distance,distancefrom);
gdk_window_move_resize(p->topgwin->window, p->ax, p->ay, p->aw, p->ah);
if (p->setstrut)
......@@ -277,13 +279,15 @@ panel_start_gui(panel *p)
g_signal_connect (G_OBJECT (p->topgwin), "style-set", G_CALLBACK( panel_style_set), p);
}
GdkDisplay *display = gdk_display_get_default ();
GdkScreen *screen = gdk_display_get_default_screen(display);
g_signal_connect ( screen, "monitors-changed", G_CALLBACK(panel_monitors_changed), (gpointer)p );
if (p->on_primary) {
GdkDisplay *display = gdk_display_get_default ();
GdkScreen *screen = gdk_display_get_screen(display, 0);
g_signal_connect ( screen, "monitors-changed", G_CALLBACK(panel_monitors_changed), (gpointer)p );
p->monitor = gdk_screen_get_primary_monitor(screen);
}
gtk_widget_realize(p->topgwin);
gdk_window_set_decorations(p->topgwin->window, 0);
gtk_widget_set_app_paintable(p->topgwin, TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment