Long tooltips should wrap instead of being cropped in gtkmozembed

NEW
Assigned to

Status

Core Graveyard
Embedding: GTK Widget
14 years ago
2 years ago

People

(Reporter: piers, Assigned: Alexander Sack)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

14 years ago
GtkMozEmbed version of bug 45375.

Forwarded upstream from Epiphany from:

http://bugzilla.gnome.org/show_bug.cgi?id=129456

Comment 1

12 years ago
Should this bug depend on 45375?  At the very least, it might attract a little more attention to this bug, but I've know idea whether the actual FIX is dependant on bug 45375.

Comment 4

11 years ago
Could someone be persuaded to review the patch?
(Assignee)

Comment 5

11 years ago
Christian, you have to request review to get this in. Does the patch still apply cleanly?
The title wording is incorrect - "wrapping" is not the solution.
There are cases where the tooltip wraps but is still cropped over the edge of the screen.
(Assignee)

Comment 7

10 years ago
Created attachment 296135 [details] [diff] [review]
updated for trunk
Attachment #219862 - Attachment is obsolete: true
Attachment #296135 - Flags: superreview?
Attachment #296135 - Flags: review?
(Assignee)

Updated

10 years ago
Attachment #296135 - Flags: superreview?(timeless)
Attachment #296135 - Flags: superreview?
Attachment #296135 - Flags: review?(chpe)
Attachment #296135 - Flags: review?
(Assignee)

Comment 8

10 years ago
seems to fix the problem for me.
Comment on attachment 296135 [details] [diff] [review]
updated for trunk

I can't review my own patch.
Attachment #296135 - Flags: review?(chpe)
(Assignee)

Comment 10

10 years ago
the idea was to get feedback on whether i missed something while adapting this for trunk.
(Assignee)

Updated

10 years ago
Attachment #296135 - Flags: superreview?(timeless) → review?(timeless)

Comment 11

10 years ago
Alexander, your patch diverged since bug 408823 landed
(Assignee)

Comment 12

10 years ago
Created attachment 297343 [details] [diff] [review]
after bug 408823 landing

make the previous patch apply cleanly.
Attachment #296135 - Attachment is obsolete: true
Attachment #297343 - Flags: review?(benjamin)
Attachment #296135 - Flags: review?(timeless)
Assignee: blizzard → asac
QA Contact: pavlov → gtk-widget

Comment 13

10 years ago
Comment on attachment 297343 [details] [diff] [review]
after bug 408823 landing

I don't know enough GTK to review this effectively. Please try... marco, or maybe caillon would be willing.
Attachment #297343 - Flags: review?(benjamin)

Comment 14

10 years ago
This patch looks reasonable to me.  I wonder if GTK+ 2.12's new tooltip API would be more amenable to being driven at a low level as gtkmozembed needs.

Comment 15

10 years ago
Comment on attachment 297343 [details] [diff] [review]
after bug 408823 landing

+  // Ideally we'd query the cursor size and hotspot,
+  // but there appears to be no way to do that */


odd comment syntax // */

is there an upstream bug for this?
(Assignee)

Updated

10 years ago
Attachment #297343 - Flags: review?(caillon)
Comment on attachment 297343 [details] [diff] [review]
after bug 408823 landing

>Index: embedding/browser/gtk/src/EmbedWindow.cpp

>+  gint x, y;
>+  gdk_window_get_origin(widget->window, &x, &y);
>+
>+  x += aXCoords;
>+  y += aYCoords;
>+
>+  // Ideally we'd query the cursor size and hotspot,
>+  // but there appears to be no way to do that */
>+  int xoffset = 8, yoffset = 8;

You're using gints above so use them here, too.  And fix the comment.


>+  if (gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL) {
>+    x -= req.width + xoffset;
>+  } else {
>+    x += xoffset;
>+  }
> 
>-  // and show it.
>-  gtk_widget_show_all(sTipWindow);
>+  if (x + req.width > monitor.x + monitor.width)
>+    x = monitor.x + monitor.width - req.width;
>+  else if (x < monitor.x)
>+    x = monitor.x;
>+
>+  if (y + req.height + yoffset <= monitor.y + monitor.height)
>+    y += yoffset;
>+  else
>+    y -= req.height + yoffset;

Please use consistent bracing.

r=caillon with those nits addressed.
Attachment #297343 - Flags: review?(caillon) → review+

Comment 17

10 years ago
Another dupe was reported in gnome bugzilla. Alexander?

Updated

7 years ago
Component: Embedding: GTK Widget → Embedding: GTK Widget
Product: Core → Core Graveyard

Updated

2 years ago
Blocks: 1197603

Updated

2 years ago
No longer blocks: 1197603
You need to log in before you can comment on or make changes to this bug.