There was some confusion about junctions...
switch (edge)
{
case GDK_WINDOW_EDGE_NORTH_WEST:
- sides = GTK_JUNCTION_TOP | GTK_JUNCTION_LEFT;
+ sides = GTK_JUNCTION_CORNER_TOPLEFT;
break;
case GDK_WINDOW_EDGE_NORTH:
sides = GTK_JUNCTION_TOP;
break;
case GDK_WINDOW_EDGE_NORTH_EAST:
- sides = GTK_JUNCTION_TOP | GTK_JUNCTION_RIGHT;
+ sides = GTK_JUNCTION_CORNER_TOPRIGHT;
break;
case GDK_WINDOW_EDGE_WEST:
sides = GTK_JUNCTION_LEFT;
sides = GTK_JUNCTION_RIGHT;
break;
case GDK_WINDOW_EDGE_SOUTH_WEST:
- sides = GTK_JUNCTION_BOTTOM | GTK_JUNCTION_LEFT;
+ sides = GTK_JUNCTION_CORNER_BOTTOMLEFT;
break;
case GDK_WINDOW_EDGE_SOUTH:
sides = GTK_JUNCTION_BOTTOM;
break;
case GDK_WINDOW_EDGE_SOUTH_EAST:
- sides = GTK_JUNCTION_BOTTOM | GTK_JUNCTION_RIGHT;
+ sides = GTK_JUNCTION_CORNER_BOTTOMRIGHT;
break;
}
sides = gtk_theming_engine_get_junction_sides (engine);
/* reduce confusing values to a meaningful state */
- if ((sides & (GTK_JUNCTION_LEFT | GTK_JUNCTION_RIGHT)) == (GTK_JUNCTION_LEFT | GTK_JUNCTION_RIGHT))
- sides &= ~GTK_JUNCTION_LEFT;
+ if ((sides & (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_BOTTOMRIGHT)) == (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_BOTTOMRIGHT))
+ sides &= ~GTK_JUNCTION_CORNER_TOPLEFT;
- if ((sides & (GTK_JUNCTION_TOP | GTK_JUNCTION_BOTTOM)) == (GTK_JUNCTION_TOP | GTK_JUNCTION_BOTTOM))
- sides &= ~GTK_JUNCTION_TOP;
+ if ((sides & (GTK_JUNCTION_CORNER_TOPRIGHT | GTK_JUNCTION_CORNER_BOTTOMLEFT)) == (GTK_JUNCTION_CORNER_TOPRIGHT | GTK_JUNCTION_CORNER_BOTTOMLEFT))
+ sides &= ~GTK_JUNCTION_CORNER_TOPRIGHT;
if (sides == 0)
- sides = (GTK_JUNCTION_BOTTOM | GTK_JUNCTION_RIGHT);
+ sides = GTK_JUNCTION_CORNER_BOTTOMRIGHT;
/* align drawing area to the connected side */
if (sides == GTK_JUNCTION_LEFT)
if (height < width)
width = height;
}
- else if (sides == (GTK_JUNCTION_LEFT | GTK_JUNCTION_TOP))
+ else if (sides == GTK_JUNCTION_CORNER_TOPLEFT)
{
if (width < height)
height = width;
skip = 2;
}
- else if (sides == (GTK_JUNCTION_LEFT | GTK_JUNCTION_BOTTOM))
+ else if (sides == GTK_JUNCTION_CORNER_BOTTOMLEFT)
{
/* make it square, aligning to bottom left */
if (width < height)
width = height;
}
}
- else if (sides == (GTK_JUNCTION_RIGHT | GTK_JUNCTION_TOP))
+ else if (sides == GTK_JUNCTION_CORNER_TOPRIGHT)
{
if (width < height)
height = width;
skip = 3;
}
- else if (sides == (GTK_JUNCTION_RIGHT | GTK_JUNCTION_BOTTOM))
+ else if (sides == GTK_JUNCTION_CORNER_BOTTOMRIGHT)
{
/* make it square, aligning to bottom right */
if (width < height)
yi+= 2;
}
}
- else if (sides == (GTK_JUNCTION_TOP | GTK_JUNCTION_LEFT))
+ else if (sides == GTK_JUNCTION_CORNER_TOPLEFT)
{
gint xi, yi;
yi -= 3;
}
}
- else if (sides == (GTK_JUNCTION_TOP | GTK_JUNCTION_RIGHT))
+ else if (sides == GTK_JUNCTION_CORNER_TOPRIGHT)
{
gint xi, yi;
yi -= 3;
}
}
- else if (sides == (GTK_JUNCTION_BOTTOM | GTK_JUNCTION_LEFT))
+ else if (sides == GTK_JUNCTION_CORNER_BOTTOMLEFT)
{
gint xi, yi;
yi += 3;
}
}
- else if (sides == (GTK_JUNCTION_BOTTOM | GTK_JUNCTION_RIGHT))
+ else if (sides == GTK_JUNCTION_CORNER_BOTTOMRIGHT)
{
gint xi, yi;
get_grip_junction (GtkWidget *widget)
{
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
- return GTK_JUNCTION_BOTTOM | GTK_JUNCTION_RIGHT;
+ return GTK_JUNCTION_CORNER_BOTTOMRIGHT;
else
- return GTK_JUNCTION_BOTTOM | GTK_JUNCTION_LEFT;
+ return GTK_JUNCTION_CORNER_BOTTOMLEFT;
}
static gboolean
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
cairo_paint (cr);
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0);
- if (get_grip_junction (GTK_WIDGET (window)) & GTK_JUNCTION_RIGHT)
+ if (get_grip_junction (GTK_WIDGET (window)) & GTK_JUNCTION_CORNER_BOTTOMRIGHT)
{
cairo_move_to (cr, width, 0.0);
cairo_line_to (cr, width, height);