After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 305508 - Only one text selection per application allowed at a time.
Only one text selection per application allowed at a time.
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.6.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-05-26 04:01 UTC by Daniel Atallah
Modified: 2014-04-15 01:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Atallah 2005-05-26 04:01:30 UTC
It appears that under win32, GTK+ only allows one text buffer per program
instance to have selection at a time.

For example, if I open the "Hypertext" and "Multiple Views" Text Widget examples
of gtk-demo, I can select text in either window, but as soon as I select text in
the other window, the original selection is lost.

If I open another instance of gtk-demo, I can make a selection and the selection
in the first instance won't be lost.

I realize that the whole "single text selection" is how things have
traditionally worked under X (with the whole middle button paste and etc.), and
I'm guessing that this behavior is a throwback from that, but it seems to me
like there isn't a good reason for not allowing multiple selections on win32.

I haven't looked at the code for this at all and I don't know if it'd be
possible to change how this works without huge changes, but I've had several
reports of this from gaim users and I at least want to mark it as a GTK+ bug.
Comment 1 Tor Lillqvist 2005-07-15 02:26:04 UTC
Hmm, being able to have selections active in multiple windows from separate
applications at the same time is not possible on X11. But I guess we definitely
don't want to introduce that restriction into GTK+ on Win32?

Comparing to Firefox on Windows, in it it is possible to have several selections
active at the same time, in different tabs or different top-level windows of the
same application instance. So I definitely think that would be the user
expectation, yes.
Comment 2 Billy Biggs 2005-07-15 02:34:07 UTC
Note that it isn't really an X11 thing, it's more of a GTK+ thing under Linux. 
In Firefox on Linux, you can have several selections in different tabs or
different top-level windows of the same application.  However, since it makes it
a little less obvious which one will be used when you hit middle button to
paste, GTK+ (and some other X apps) only show a single selection.

At least, I think that's the reasoning.  Personally, I think GTK+ applications
should allow multiple selections under Linux as Firefox does.  Selections are
useful for more than just middle-button paste.
Comment 3 Tor Lillqvist 2005-07-15 02:52:43 UTC
One point is also that to the end-user it might not be that obvious that some
top-level windows belong to the same application instance (and thus GTK+ allows
only one of them to have a selection at a time). Another time the user might
have two instances of the application running, and then suddenly she can have a
selection in each top-level window. Should this bug's component be changed to
"general", then?
Comment 4 Billy Biggs 2005-07-15 02:57:55 UTC
Given that there is some native Windows behaviour, I should probably file a new
bug about my more general concern, so that if it is rejected this bug still gets
investigated for win32 :)
Comment 5 Owen Taylor 2005-07-15 13:59:33 UTC
My memory is that with native window apps (Firefox is not native, in
the end) it's rare or impossible to get two apps to show text selection at the 
same time. The exact behavior is not quite the same as the X 
grab-the-primary-selection model, however.
Comment 6 Tor Lillqvist 2005-07-16 07:14:44 UTC
Well, Firefox was a bad (too complex, no entirely "native") example. With
Notepad and Wordpad running, I certainly can have selections showing in both at
the same time.
Comment 7 Daniel Atallah 2005-07-18 13:31:49 UTC
As an example of why this is problematic, think about selecting some text and
then using the Color selector to assign a color to it:

a)
Using the RGB or HSV spin buttons causes the text selection to be lost (this may
be a separate issue, it doesn't seem to happen with all spinners, just the ones
in the GtkColorSelection).

Or

b)
Select the text in the "Color Name" text box and overwrite it (a seemingly
standard operation, but causes the text that you're trying to manipulate to be
unslected).
Comment 8 Matthias Clasen 2014-04-15 01:33:52 UTC
closing out ancient bugs