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 321683 - gnopernicus magnifier bounds sometimes set incorrectly.
gnopernicus magnifier bounds sometimes set incorrectly.
Status: RESOLVED FIXED
Product: gnopernicus
Classification: Deprecated
Component: magnifier
0.11.x
Other All
: Normal major
: ---
Assigned To: remus draica
Adi Dascal
AP1
Depends on:
Blocks:
 
 
Reported: 2005-11-17 03:47 UTC by Tim Miao
Modified: 2006-02-08 09:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
Screen Shot (285.06 KB, image/png)
2005-11-17 03:49 UTC, Tim Miao
  Details
proposed patch (4.92 KB, patch)
2006-02-01 10:27 UTC, remus draica
committed Details | Review
proposed patch (13.03 KB, patch)
2006-02-07 15:11 UTC, Oana Serb
none Details | Review

Description Tim Miao 2005-11-17 03:47:33 UTC
Version details: 0.11.1
Distribution/Version: snv_28

1.Launch one application, say, mozilla, evolution, gedit and so on.
2.Launch gnopernicus-magnifier. Do not change any settings of magnifier preferences.

Expected result:
Gnopernicus-magnifier should work correctly.

Actual result:
Gnopernicus-magnifier sometimes works incorrectly, it will only magnify part of
the screen or push the source screen to a very narrow screen. I'd like to attach
the screenshot below.
Comment 1 Tim Miao 2005-11-17 03:49:49 UTC
Created attachment 54852 [details]
Screen Shot
Comment 2 Tim Miao 2005-11-17 03:51:45 UTC
It may happen 2-4 times among 10.
Comment 3 Dragan Sarbut 2005-11-17 06:52:12 UTC
Since you don't change any of the magnifier settings in gnopernicus, I'll assume
that you are not using 2 frame buffers and you are magnifiing the same screen on
which the magnifier window is shown.

In this case, I don't think this is a gnopernicus bug.
Most gtk windows are resizing themselves so they won't get underneath the
magnifier. This is what I think happens with evolution and gedit. 
This resizing of the windows is done by something called STRUTS and it's not
controlled by gnopernicus.

For example. If you have a gedit window maximized, when you start gnopernicus +
magnifier, if the magnifier window is on the same screen as the gedit window,
the gedit window should resize itself so it won't overlapp with the magnifier
window.

The strange thing is that this should happen every time, not just 2 - 4 out of
10 times.
Comment 4 Tim Miao 2005-11-17 07:39:43 UTC
You can see the screen shot, the magnifiered screen turned to one pixel line.
This is the right bug I mentioned here.
Comment 5 bill.haneman 2005-11-17 10:15:50 UTC
Tim, please use a more specific bug summary next time.  And please do not use
the bracketed terms like [magnifier], this is unnecessary.  Thanks.
Dragan, the problem here seems to be in the race conditions involved when the
magnifier tries to move its left/right/top/bottom bounds independently.

gnopernicus really should be setting these all in one go, as the API for
gnome-mag requires all four bounds at once.  Setting them one at a time can
cause the problem Tim reports, and it's not really a gnome-mag bug in my opinion
(because it's getting invalid/silly bounds requests soemtimes, due to the race
condition).
Comment 6 Dragan Sarbut 2005-11-17 11:23:08 UTC
Sorry, didn't see the magnifier window in the screen-shot before. I needed to
zoom -in.

Bill, this is not easy to fix in the current implementation of gnopernicus.
Maybe it would be easyer to fix this in gnome-mag.

Tim, please try the pacth from bug 320640. That patch could filter some
non-neccessary "set" commands for the magnifier when it starts.
Comment 7 bill.haneman 2005-11-17 11:37:15 UTC
I don't think this is feasible to fix in gnome-mag; I have looked at the issue
many times before.
Comment 8 Vincent Quigley 2005-11-17 11:50:31 UTC
Another point for this bug is that the bounds are changed in gnopernicus
magnifier  when bug does appear. The user then needs to go into gnopernicus
magnifier preferences and change the values of the zoomer placement.

I believe this bug relates to:
http://bugzilla.gnome.org/show_bug.cgi?id=320640
but I may be mistaken.
Comment 9 Dragan Sarbut 2005-11-22 10:40:44 UTC
Tim please try the new gnopernicus from CVS HEAD. It contains the patch for bug
#320640. It might fix the problem.
Comment 10 remus draica 2006-02-01 10:27:00 UTC
Created attachment 58505 [details] [review]
proposed patch

this patch prevents gnopernicus to send a set of coordinates for zoomer placement for every coordinate changed (a set for top, a set for left etc).
Comment 11 bill.haneman 2006-02-01 13:01:56 UTC
Patch looks like the right approach.  I haven't had change to test it yet however.
Comment 12 korn 2006-02-07 05:56:07 UTC
I agree with Bill, this patch looks good (though it took a while to be certain; it would be helpful if the diffs contained more context!).  Remus - what tests have you guys run?
Comment 13 Oana Serb 2006-02-07 15:11:39 UTC
Created attachment 58868 [details] [review]
proposed patch

Added more context to diff so that the functions name in which modifications are made to be obvious.
Comment 14 korn 2006-02-07 16:34:54 UTC
Thanks, the patch *looks* even better now - much easier to quickly review.  If testing shows the problem fixed, please apply.
Comment 15 remus draica 2006-02-08 09:49:54 UTC
Comment on attachment 58505 [details] [review]
proposed patch

patch applied to cvs head.