MozillaZine


selection (cut & paste)

Discussion of general topics about Seamonkey
igor
 
Posts: 3
Joined: December 4th, 2002, 12:53 am

Post Posted December 4th, 2002, 1:40 am

Hi all,

I am using mozilla for a looooooooooong time (starting with M7 builds).
And even prior to M7... but the beast was unusable. And even
after all these years and versions (currently 1.3a) I am not able to figure
out "how does mouse selection work". Yes, I am embarrassed.

So, I hope that somebody will bring some light to this topic. I will
try to explain as good as I can my "problem".

Lets suppose that I open few instances of mozilla in
separate windows or one instance of mozilla with few TAB-ed browsers.
After that I do select with mouse in every instance (or every TAB-ed window)
text. The text gets highlighted blue. So far so good.
When I move the mouse from one browser to another (or when I select
another TAB) previously selected text changes color from gray to blue
and vice versa.

In other words, previously highlighted text become active.
At least I understand it in this way.

Now, I start an editor, "gvim" in my case, and paste
the selection with "middle" button. Yes, paste works.
I can paste the text I've selected last. It does not matter
which browser (or TAB) is active, I can paste ONLY the
text I've selected last.

So, the question for you, mozilla gurus, is:

What is the purpose of deactivating and activating the previously
selected (highlighted) text if the text is not automagically
copied into X11 clipboard ?

This "feature" is, at the end, very annoying. I never know
what I have in the X11 clipboard, mostly in the case when
I am distracted with "something" else for a while. When
I come back to the desktop I have few browsers running
and all of them have "highlighted" text. So, which
one is in the X11 clipboard ?

Can somebody help me to understand the logic behind
mozilla's selection mechanism

Thanks

Igor

Atropos

User avatar
 
Posts: 1116
Joined: December 4th, 2002, 6:18 pm
Location: Texas

Post Posted December 4th, 2002, 6:51 pm

You seem to be confused. Mozilla changes the background color to indicate the selection has lost focus. Focus is the point in the event loop of an application to which input events are directed first. Think about - if every text input control had a flashing cursor in it all the time, wouldn't you get confused? So the programmers make the flashing text cursor only appear in the text input control that you are "focused" on. It's the same with selections.

Perhaps you are used to applications in the past that simply un-selected the selection when it lost focus. Of course now many applications are taking advantage of drag and drop and losing the selection when you switch over to make sure you have the destination ready is annoying. So selections have become more persistent.

This is not a feature or bug of Mozilla, just an evolutionary step in GUI implementation.

igor
 
Posts: 3
Joined: December 4th, 2002, 12:53 am

Post Posted December 4th, 2002, 7:23 pm

Atropos wrote:You seem to be confused.

yes... you are right... that is the main reason I posted the question

Mozilla changes the background color to indicate the selection has lost focus.

yes... I do agree with you.. This is not the problem. "BLUE" selection
turns into "GRAY" selection... I do understand this

Focus is the point in the event loop of an application to which input events are directed first.

Yes... it is clear to me .. but application should just start paying attention to
to the TAB-ed browser (or another browser instance) as a whole and NOT to
the selected text. Selected text should remain "GREY" if I've selected with a mouse
in another TAB-ed browser (or another browser instance) another text

X11 is still behind the scene. Right ??

Let me clarify my comment with another open source application. I will talk here
about "gvim" (graphical VI editor). "gvim" uses the same X11 tool kit as "mozilla".
This toolkit is called "GTK". When I start multiple "gvim" sessions I can select (highlight)
in one of the windows a text. That text remains selected ( a.k.a. BLUE) until I
select another text in any of X11 applications currently running on my desktop,
including mozilla. So, when I select another text in another X11 application,
previously selected text become GRAY and stays GREY R_E_G_A_R_D_L_E_S_S
where is the focus (a.k.a. where is the mouse pointing to).

This is a logical and natural way how the selection should work like. In such a case
I do know right away that the contents of the X11 clipboard has changed and
that only the last "BLUE" selection it is in the clipboard.


Think about - if every text input control had a flashing cursor in it all the time, wouldn't you get confused?

yes... I would get confused... but I am not talking here about flashing selection.
Please see "gvim" story.

So the programmers make the flashing text cursor only appear in the text input control that you are "focused" on. It's the same with selections.

They should follow the way "gvim" is done. "Mozilla" and "gvim" share the same X11
server underneath (spelling ??).

Perhaps you are used to applications in the past that simply un-selected the selection when it lost focus.

yes... that is true... but "gvim" folks did the better job. Their solution is optimal.

Of course now many applications are taking advantage of drag and drop and losing the selection when you switch over to make sure you have the destination ready is annoying. So selections have become more persistent.

This is not very clear to me.

This is not a feature or bug of Mozilla, just an evolutionary step in GUI implementation.


Yes... it could be... but it could be done better as well. (see "gvim" story)

But, in any case, thanks for ther reply. I hope that some of the main "mozilla" developers
reads this forum too. Just to remind you: "mozilla" and "gvim" use the same X11 toolkit,
called GTK... so, it is obvious that it can be done.

Regards

Igor

scratch

User avatar
 
Posts: 4942
Joined: November 6th, 2002, 1:27 am
Location: Massachusetts

Post Posted December 5th, 2002, 12:53 am

The purpose of the blue/gray coloring isn't to indicate whether or not the selected text is on the clipboard, it's to indicate whether or not the window/tab has focus. The text is still on the clipboard even after the background color turns gray until you actually select text in another window.

igor
 
Posts: 3
Joined: December 4th, 2002, 12:53 am

Post Posted December 5th, 2002, 1:09 am

hhmmm... OK... but it does not make a lot of sense. You can see which TAB is selected just by looking at them.
Active TAB is on top or, in case of mozilla 1.3a, active TAB is on TOP and lighther than non active TAB.

In case of multiple separate instances of mozilla, you can see very very very easily by looking at window frame.
Active window (a.k.a. window with focus) has different frame than window without focus.

It does not make a sense to have same information presented TWICE.

Please, read my description of "gvim" editor HOW the selection should work

Thanks

Igor

Return to SeaMonkey General


Who is online

Users browsing this forum: No registered users and 1 guest