mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
updates
2002-12-08 Havoc Pennington <hp@pobox.com> * README: updates * src/window.c (MAX_RESIZES_PER_SECOND): change to 20 instead of 30, just as an experiment. (MOVE_THRESHOLD): change 15 to 20 (RESIZE_THRESHOLD): change 15 to 20 * src/util.c (ensure_logfile): kill this function when verbose mode is disabled.
This commit is contained in:
parent
e0c8b245ef
commit
9c337d0a8f
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
2002-12-08 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* README: updates
|
||||||
|
|
||||||
|
* src/window.c (MAX_RESIZES_PER_SECOND): change to 20 instead of
|
||||||
|
30, just as an experiment.
|
||||||
|
(MOVE_THRESHOLD): change 15 to 20
|
||||||
|
(RESIZE_THRESHOLD): change 15 to 20
|
||||||
|
|
||||||
|
* src/util.c (ensure_logfile): kill this function when verbose
|
||||||
|
mode is disabled.
|
||||||
|
|
||||||
2002-12-08 Havoc Pennington <hp@pobox.com>
|
2002-12-08 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* src/window.c (meta_window_fill_vertical)
|
* src/window.c (meta_window_fill_vertical)
|
||||||
|
278
README
278
README
@ -13,13 +13,19 @@ You need GTK+ 2.0, ideally the latest in the 2.0.x series. For
|
|||||||
multihead/Xinerama support to work, you need GTK+ 2.1.x or 2.2. For
|
multihead/Xinerama support to work, you need GTK+ 2.1.x or 2.2. For
|
||||||
startup notification to work you need libstartup-notification at
|
startup notification to work you need libstartup-notification at
|
||||||
http://www.freedesktop.org/software/startup-notification/ or on the
|
http://www.freedesktop.org/software/startup-notification/ or on the
|
||||||
GNOME ftp site. You also need GConf 1.2 (though it would be easy to
|
GNOME ftp site. You also need GConf 1.2 (unless building a funky
|
||||||
remove that dependency in a custom hacked metacity, if you wanted).
|
extra-small embedded metacity with --disable-gconf).
|
||||||
|
|
||||||
REPORTING BUGS AND SUBMITTING PATCHES
|
REPORTING BUGS AND SUBMITTING PATCHES
|
||||||
===
|
===
|
||||||
|
|
||||||
Report new bugs on http://bugzilla.gnome.org.
|
Report new bugs on http://bugzilla.gnome.org. Please check for
|
||||||
|
duplicates, *especially* if you are reporting a feature request.
|
||||||
|
|
||||||
|
Please do *not* add "me too!" or "yes I really want this!" comments to
|
||||||
|
feature requests in bugzilla. Please read
|
||||||
|
http://pobox.com/~hp/features.html prior to adding any kind of flame
|
||||||
|
about missing features or misfeatures.
|
||||||
|
|
||||||
Feel free to send patches too; Metacity is relatively small and
|
Feel free to send patches too; Metacity is relatively small and
|
||||||
simple, so if you find a bug or want to add a feature it should be
|
simple, so if you find a bug or want to add a feature it should be
|
||||||
@ -27,6 +33,39 @@ pretty easy. Send me mail, or put the patch in bugzilla.
|
|||||||
|
|
||||||
See the HACKING file for some notes on hacking Metacity.
|
See the HACKING file for some notes on hacking Metacity.
|
||||||
|
|
||||||
|
SHRINKING METACITY
|
||||||
|
===
|
||||||
|
|
||||||
|
Not that metacity is huge (<400K binary last I checked), but about
|
||||||
|
half of that is in the preferences handling, in static strings that
|
||||||
|
aren't essential, and in the theme engine.
|
||||||
|
|
||||||
|
You can strip about 70K from the metacity binary by compiling with
|
||||||
|
options such as:
|
||||||
|
|
||||||
|
--disable-gconf
|
||||||
|
--disable-sm
|
||||||
|
--disable-verbose
|
||||||
|
--disable-startup-notification
|
||||||
|
|
||||||
|
However the result is no good for desktop use, all prefs have to be
|
||||||
|
hardcoded in the binary, for example. If you wanted to make a really
|
||||||
|
small metacity, here's some additional stuff you might consider
|
||||||
|
implementing:
|
||||||
|
|
||||||
|
- add --disable-themes, which would replace theme.c and theme-parser.c
|
||||||
|
with a hardcoded implementation of the interface in theme.h,
|
||||||
|
should save about 80K. This should be fairly easy.
|
||||||
|
|
||||||
|
- add --disable-gtk, which would implement the interface in ui.h
|
||||||
|
without using GTK. This one is easier than you think because the
|
||||||
|
main part of the window manager doesn't use GTK directly, but is
|
||||||
|
still fairly hard to do. You would probably have to give up some
|
||||||
|
of the features, such as window menus, as menus are pretty complex
|
||||||
|
to implement well. So time may be better spent adding a GTK
|
||||||
|
configure script feature to build GTK with only a small core set of
|
||||||
|
functionality.
|
||||||
|
|
||||||
METACITY FEATURES
|
METACITY FEATURES
|
||||||
===
|
===
|
||||||
|
|
||||||
@ -36,8 +75,22 @@ METACITY FEATURES
|
|||||||
- Uses GTK+ 2.0 for drawing window frames. This means colors, fonts,
|
- Uses GTK+ 2.0 for drawing window frames. This means colors, fonts,
|
||||||
etc. come from GTK+ theme.
|
etc. come from GTK+ theme.
|
||||||
|
|
||||||
|
- Does not expose the concept of "window manager" to the user. Some
|
||||||
|
of the features in the GNOME control panel and other parts of the
|
||||||
|
desktop happen to be implemented in metacity, such as changing your
|
||||||
|
window border theme, or changing your window navigation shorcuts,
|
||||||
|
but the user doesn't need to know this.
|
||||||
|
|
||||||
|
- Includes only the window manager; does not try to be a desktop
|
||||||
|
environment. The pager, configuration, etc. are all separate and
|
||||||
|
modular. The "libwnck" library (which I also wrote) is available
|
||||||
|
for writing metacity extensions, pagers, and so on. (But libwnck
|
||||||
|
isn't metacity specific, or GNOME-dependent; it requires only GTK,
|
||||||
|
and should work with KWin, fvwm2, and other EWMH-compliant WMs.)
|
||||||
|
|
||||||
- Has a simple theme system and a couple of extra themes come with it.
|
- Has a simple theme system and a couple of extra themes come with it.
|
||||||
Change themes via gconf-editor or gconftool:
|
Change themes via gconf-editor or gconftool or GNOME themes control
|
||||||
|
panel:
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/theme Crux
|
gconftool-2 --type=string --set /apps/metacity/general/theme Crux
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/theme Gorilla
|
gconftool-2 --type=string --set /apps/metacity/general/theme Gorilla
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/theme Atlanta
|
gconftool-2 --type=string --set /apps/metacity/general/theme Atlanta
|
||||||
@ -56,7 +109,7 @@ METACITY FEATURES
|
|||||||
gconftool-2 --type=string --set /apps/metacity/general/focus_mode sloppy
|
gconftool-2 --type=string --set /apps/metacity/general/focus_mode sloppy
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/focus_mode click
|
gconftool-2 --type=string --set /apps/metacity/general/focus_mode click
|
||||||
|
|
||||||
- Global keybinding defaults:
|
- Global keybinding defaults include:
|
||||||
|
|
||||||
Alt-Tab forward cycle window focus
|
Alt-Tab forward cycle window focus
|
||||||
Alt-Shift-Tab backward cycle focus
|
Alt-Shift-Tab backward cycle focus
|
||||||
@ -71,7 +124,10 @@ METACITY FEATURES
|
|||||||
|
|
||||||
unst gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_1 '<Alt>F1'
|
unst gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_1 '<Alt>F1'
|
||||||
|
|
||||||
See metacity.schemas for available bindings.
|
Also try the GNOME keyboard shortcuts control panel, or
|
||||||
|
gconf-editor.
|
||||||
|
|
||||||
|
See metacity.schemas for all available bindings.
|
||||||
|
|
||||||
- Window keybindings:
|
- Window keybindings:
|
||||||
|
|
||||||
@ -88,8 +144,9 @@ METACITY FEATURES
|
|||||||
Choose Resize from menu, and nothing happens yet, but
|
Choose Resize from menu, and nothing happens yet, but
|
||||||
eventually I might implement something.
|
eventually I might implement something.
|
||||||
|
|
||||||
Keybindings for things like maximize window, etc. can be bound,
|
Keybindings for things like maximize window, vertical maximize,
|
||||||
but don't exist by default. See metacity.schemas.
|
etc. can be bound, but may not all exist by default. See
|
||||||
|
metacity.schemas.
|
||||||
|
|
||||||
- Window mouse bindings:
|
- Window mouse bindings:
|
||||||
|
|
||||||
@ -104,6 +161,9 @@ METACITY FEATURES
|
|||||||
If you click and drag the titlebar with button 1 it moves the
|
If you click and drag the titlebar with button 1 it moves the
|
||||||
window.
|
window.
|
||||||
|
|
||||||
|
If you click anywhere on the frame with button 2 it lowers the
|
||||||
|
window.
|
||||||
|
|
||||||
If you click anywhere on the frame with button 3 it shows the
|
If you click anywhere on the frame with button 3 it shows the
|
||||||
window menu.
|
window menu.
|
||||||
|
|
||||||
@ -125,9 +185,10 @@ METACITY FEATURES
|
|||||||
for session-aware applications.
|
for session-aware applications.
|
||||||
|
|
||||||
- Metacity implements much of the new window manager spec from
|
- Metacity implements much of the new window manager spec from
|
||||||
freedesktop.org, and much of the ICCCM. But then there are
|
freedesktop.org
|
||||||
parts of each that it doesn't implement, just because I haven't
|
(http://www.freedesktop.org/standards/wm-spec.html), and much of
|
||||||
yet.
|
the ICCCM. But then there are parts of each that it doesn't
|
||||||
|
implement, just because I haven't yet.
|
||||||
|
|
||||||
- Uses Pango to render text, so has cool i18n capabilities.
|
- Uses Pango to render text, so has cool i18n capabilities.
|
||||||
Supports UTF-8 window titles and such.
|
Supports UTF-8 window titles and such.
|
||||||
@ -150,80 +211,69 @@ METACITY FEATURES
|
|||||||
|
|
||||||
- does basic colormap handling
|
- does basic colormap handling
|
||||||
|
|
||||||
|
- and much more! well, maybe not a lot more.
|
||||||
|
|
||||||
METACITY BUGS, NON-FEATURES, AND CAVEATS
|
METACITY BUGS, NON-FEATURES, AND CAVEATS
|
||||||
===
|
===
|
||||||
|
|
||||||
- You need an EWMH-spec compliant pager/tasklist to be able
|
See bugzilla: http://bugzilla.gnome.org/query.cgi
|
||||||
to navigate graphically; this does NOT include GNOME 1.x,
|
|
||||||
but should include GNOME 2 and KDE 3.
|
|
||||||
|
|
||||||
- doesn't do WM_COLORMAPS from the ICCCM, may matter on some really
|
|
||||||
old obscure hardware with some really obscure apps.
|
|
||||||
|
|
||||||
- There are probably other ICCCM-compliance issues.
|
|
||||||
|
|
||||||
- The first-fit algorithm for placement isn't very clever.
|
|
||||||
|
|
||||||
- Should Metacity support flipping in right-to-left locales?
|
|
||||||
I don't know what window managers look like in a right-to-left
|
|
||||||
locale. I assume the window titles should be right-justified;
|
|
||||||
should the window controls also be flipped?
|
|
||||||
|
|
||||||
FAQ
|
FAQ
|
||||||
===
|
===
|
||||||
|
|
||||||
Q: Will you add my feature?
|
Q: Will you add my feature?
|
||||||
|
|
||||||
A: If it makes sense to turn on unconditionally,
|
A: If it makes sense to turn on unconditionally, or is genuinely a
|
||||||
or is genuinely a harmless preference that I would not
|
harmless preference that I would not be embarrassed to put in a
|
||||||
be embarrassed to put in a simple, uncluttered, user-friendly
|
simple, uncluttered, user-friendly configuration dialog.
|
||||||
configuration dialog.
|
|
||||||
|
|
||||||
If the only rationale for your feature is that other window
|
If the only rationale for your feature is that other window
|
||||||
managers have it, or that you are personally used to it, or something
|
managers have it, or that you are personally used to it, or
|
||||||
like that, then I will not be impressed. Metacity is firmly in the
|
something like that, then I will not be impressed. Metacity is
|
||||||
"choose good defaults" camp rather than the "offer 6 equally broken
|
firmly in the "choose good defaults" camp rather than the "offer 6
|
||||||
ways to do it, and let the user pick one" camp.
|
equally broken ways to do it, and let the user pick one" camp.
|
||||||
|
|
||||||
This is part of a "no crackrock" policy, despite some exceptions
|
This is part of a "no crackrock" policy, despite some exceptions
|
||||||
I'm mildly embarrassed about. For example, multiple workspaces
|
I'm mildly embarrassed about. For example, multiple workspaces
|
||||||
probably constitute crackrock, they confuse most users
|
probably constitute crackrock, they confuse most users and really
|
||||||
and really are not that useful if you have a decent tasklist and
|
are not that useful if you have a decent tasklist and so on. But I
|
||||||
so on. But I am too used to them to turn them off.
|
am too used to them to turn them off. Or alternatively
|
||||||
Or alternatively iconification/tasklist is crack, and workspaces/pager
|
iconification/tasklist is crack, and workspaces/pager are good. But
|
||||||
are good. But having both is certainly a bit wrong.
|
having both is certainly a bit wrong. Sloppy focus is probably
|
||||||
Sloppy focus is probably crackrock too.
|
crackrock too.
|
||||||
|
|
||||||
But don't think unlimited crack is OK just because I slipped up a
|
But don't think unlimited crack is OK just because I slipped up a
|
||||||
little. No slippery slope here.
|
little. No slippery slope here.
|
||||||
|
|
||||||
Don't let this discourage patches and fixes - I love those. ;-)
|
Don't let this discourage patches and fixes - I love those. ;-)
|
||||||
Just be prepared to hear the above objections if your patch
|
Just be prepared to hear the above objections if your patch adds
|
||||||
adds some crack-ridden configuration option.
|
some crack-ridden configuration option.
|
||||||
|
|
||||||
http://pobox.com/~hp/free-software-ui.html
|
http://pobox.com/~hp/free-software-ui.html
|
||||||
|
http://pobox.com/~hp/features.html
|
||||||
|
|
||||||
Q: Will Metacity be part of GNOME?
|
Q: Will Metacity be part of GNOME?
|
||||||
|
|
||||||
A: Many people are now asking for this, though it was not the original
|
A: It is officially part of GNOME as of GNOME 2.2. Prior to that,
|
||||||
plan - Metacity started out as sort of an experiment.
|
it was unofficially shipped as the default GNOME WM by several
|
||||||
|
OS vendors.
|
||||||
A decision hasn't really been made but the issue will probably
|
|
||||||
be raised shortly after the GNOME 2 release.
|
|
||||||
|
|
||||||
Q: Is Metacity a Red Hat project?
|
Q: Is Metacity a Red Hat project?
|
||||||
|
|
||||||
A: Metacity is in no way funded, endorsed, or encouraged by Red Hat,
|
A: Metacity's original creation was in no way funded, endorsed, or
|
||||||
Inc. - I'm guessing Red Hat would not consider "insufficient number
|
encouraged by Red Hat, Inc. - I'm guessing Red Hat would not
|
||||||
of window managers for Linux" an urgent problem. Just a wild guess
|
consider "insufficient number of window managers for Linux" an
|
||||||
though.
|
urgent problem. Just a wild guess though.
|
||||||
|
|
||||||
|
Now that metacity is the default WM however, Red Hat supports some
|
||||||
|
bugfixing and other work.
|
||||||
|
|
||||||
Q: Why does Metacity remember the workspace/position of some apps
|
Q: Why does Metacity remember the workspace/position of some apps
|
||||||
but not others?
|
but not others across logout/login?
|
||||||
|
|
||||||
A: Metacity only stores sizes/positions for apps that are session
|
A: Metacity only stores sizes/positions for apps that are session
|
||||||
managed. As far as I can determine, there is no way to attempt
|
managed. As far as I can determine, there is no way to attempt to
|
||||||
to remember workspace/position for non-session-aware apps without
|
remember workspace/position for non-session-aware apps without
|
||||||
causing a lot of weird effects.
|
causing a lot of weird effects.
|
||||||
|
|
||||||
The reason is that you don't know which non-SM-aware apps were
|
The reason is that you don't know which non-SM-aware apps were
|
||||||
@ -276,6 +326,120 @@ A: I could conceivably be convinced to use viewports _instead_ of
|
|||||||
features traditionally associated with either kind if those
|
features traditionally associated with either kind if those
|
||||||
features make sense.
|
features make sense.
|
||||||
|
|
||||||
|
Q: Why is the panel always on top?
|
||||||
|
|
||||||
|
A: Because it's a better user interface, and until we made this not
|
||||||
|
configurable a bunch of apps were not getting fixed (the app
|
||||||
|
authors were just saying "put your panel on the bottom" instead of
|
||||||
|
properly supporting fullscreen mode, and such).
|
||||||
|
|
||||||
|
rationales.txt has the bugzilla URL for some flamefesting on this,
|
||||||
|
if you want to go back and relive the glory.
|
||||||
|
Read these and the bugzilla stuff before asking/commenting:
|
||||||
|
http://pobox.com/~hp/free-software-ui.html
|
||||||
|
http://pobox.com/~hp/features.html
|
||||||
|
|
||||||
|
Q: Why is there no edge flipping?
|
||||||
|
|
||||||
|
A: This one is also in rationales.txt. Because "ouija board" UI, where
|
||||||
|
you just move the mouse around and the computer guesses what you
|
||||||
|
mean, has a lot of issues. This includes mouse focus, shade-hover
|
||||||
|
mode, edge flipping, autoraise, etc. Metacity has mouse focus and
|
||||||
|
autoraise as a compromise, but these features are all confusing for
|
||||||
|
many users, and cause problems with accessibility, fitt's law, and
|
||||||
|
so on.
|
||||||
|
|
||||||
|
Read these and the bugzilla stuff before asking/commenting:
|
||||||
|
http://pobox.com/~hp/free-software-ui.html
|
||||||
|
http://pobox.com/~hp/features.html
|
||||||
|
|
||||||
|
Q: Why no wireframe move/resize?
|
||||||
|
|
||||||
|
A: Also in rationales.txt. Because it has low usability, and is a pain
|
||||||
|
to implement, and there's no reason opaque move/resize should be a
|
||||||
|
problem on any setup that can run a modern desktop worth a darn to
|
||||||
|
begin with.
|
||||||
|
|
||||||
|
Read these and the bugzilla stuff before asking/commenting:
|
||||||
|
http://pobox.com/~hp/free-software-ui.html
|
||||||
|
http://pobox.com/~hp/features.html
|
||||||
|
|
||||||
|
Q: Why no XYZ?
|
||||||
|
|
||||||
|
A: You are probably getting the idea by now - check rationales.txt,
|
||||||
|
query/search bugzilla, and read http://pobox.com/~hp/features.html
|
||||||
|
and http://pobox.com/~hp/free-software-ui.html
|
||||||
|
|
||||||
|
Then sit down and answer the question for yourself. Is the feature
|
||||||
|
good? What's the rationale for it? Answer "why" not just "why not."
|
||||||
|
Justify in terms of users as a whole, not just users like
|
||||||
|
yourself. How else can you solve the same problem? etc. If that
|
||||||
|
leads you to a strong opinion, then please, post the rationale for
|
||||||
|
discussion to an appropriate bugzilla bug, or to
|
||||||
|
usability@gnome.org.
|
||||||
|
|
||||||
|
Please don't just "me too!" on bugzilla bugs, please don't think
|
||||||
|
flames will get you anywhere, and please don't repeat rationale
|
||||||
|
that's already been offered.
|
||||||
|
|
||||||
|
Q: Your dumb web pages you made me read talk about solving problems in
|
||||||
|
fundamental ways instead of adding preferences or workarounds.
|
||||||
|
What are some examples where metacity has done this?
|
||||||
|
|
||||||
|
A: There are quite a few, though many opportunities remain. Sometimes
|
||||||
|
the real fix involves application changes. The metacity approach is
|
||||||
|
that it's OK to require apps to change, though there are also
|
||||||
|
plenty of workarounds in metacity for battles considered too hard
|
||||||
|
to fight.
|
||||||
|
|
||||||
|
Here are some examples:
|
||||||
|
|
||||||
|
- fullscreen mode was introduced to allow position constraints,
|
||||||
|
panel-on-top, and other such things to apply to normal windows
|
||||||
|
while still allowing video players etc. to "just work"
|
||||||
|
|
||||||
|
- "whether to include minimized windows in Alt+Tab" was solved
|
||||||
|
by putting minimized windows at the *end* of the tab order.
|
||||||
|
|
||||||
|
- Whether to pop up a feedback display during Alt+Tab was solved by
|
||||||
|
having both Alt+Tab and Alt+Esc
|
||||||
|
|
||||||
|
- Whether to have a "kill" feature was solved by automatically
|
||||||
|
detecting and offering to kill stuck apps. Better, metacity
|
||||||
|
actually does "kill -9" on the process, it doesn't just
|
||||||
|
disconnect the process from the X server. You'll appreciate this
|
||||||
|
if you ever did a "kill" on Netscape 4, and watched it keep
|
||||||
|
eating 100% CPU even though the X server had booted it.
|
||||||
|
|
||||||
|
- The workspaces vs. viewports mess was avoided by adding
|
||||||
|
directional navigation and such to workspaces, see discussion
|
||||||
|
earlier in this file.
|
||||||
|
|
||||||
|
- Instead of configurable placement algorithms, there's just one
|
||||||
|
that works fairly well most of the time.
|
||||||
|
|
||||||
|
- To avoid excess CPU use during opaque move/resize, we rate limit
|
||||||
|
the updates to the application window's size.
|
||||||
|
|
||||||
|
- Instead of configurable "show size of window while resizing,"
|
||||||
|
it's only shown for windows where it matters, such as terminals.
|
||||||
|
(Only use-case given for all windows is for web designers
|
||||||
|
choosing their web browser size, but there are web sites and
|
||||||
|
desktop backgrounds that do this for you.)
|
||||||
|
|
||||||
|
- Using startup notification, applications open on the workspace
|
||||||
|
where you launched them, not the active workspace when their
|
||||||
|
window is opened.
|
||||||
|
|
||||||
|
- and much more.
|
||||||
|
|
||||||
|
Q: I think metacity sucks.
|
||||||
|
|
||||||
|
A: Feel free to use any WM you like. The reason metacity follows the
|
||||||
|
ICCCM and EWMH specifications is that it makes metacity a modular,
|
||||||
|
interchangeable part in the desktop. libwnck-based apps such as the
|
||||||
|
GNOME window list will work just fine with any EWMH-compliant WM.
|
||||||
|
|
||||||
Q: Did you spend a lot of time on this?
|
Q: Did you spend a lot of time on this?
|
||||||
|
|
||||||
A: Originally the answer was no. Sadly the answer is now yes.
|
A: Originally the answer was no. Sadly the answer is now yes.
|
||||||
@ -284,5 +448,3 @@ Q: How can you claim that you are anti-crack, while still
|
|||||||
writing a window manager?
|
writing a window manager?
|
||||||
|
|
||||||
A: I have no comment on that.
|
A: I have no comment on that.
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ bin_PROGRAMS=metacity metacity-theme-viewer
|
|||||||
libexec_PROGRAMS=metacity-dialog
|
libexec_PROGRAMS=metacity-dialog
|
||||||
|
|
||||||
EFENCE=
|
EFENCE=
|
||||||
metacity_LDADD= $(EFENCE) @METACITY_LIBS@ $(EFENCE)
|
metacity_LDADD=@METACITY_LIBS@ $(EFENCE)
|
||||||
metacity_theme_viewer_LDADD= @METACITY_LIBS@ libmetacity-private.la
|
metacity_theme_viewer_LDADD= @METACITY_LIBS@ libmetacity-private.la
|
||||||
metacity_dialog_LDADD=@METACITY_LIBS@
|
metacity_dialog_LDADD=@METACITY_LIBS@
|
||||||
|
|
||||||
|
@ -64,6 +64,8 @@ static gboolean is_verbose = FALSE;
|
|||||||
static gboolean is_debugging = FALSE;
|
static gboolean is_debugging = FALSE;
|
||||||
static gboolean replace_current = FALSE;
|
static gboolean replace_current = FALSE;
|
||||||
static int no_prefix = 0;
|
static int no_prefix = 0;
|
||||||
|
|
||||||
|
#ifdef WITH_VERBOSE_MODE
|
||||||
static FILE* logfile = NULL;
|
static FILE* logfile = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -110,6 +112,7 @@ ensure_logfile (void)
|
|||||||
g_free (filename);
|
g_free (filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_is_verbose (void)
|
meta_is_verbose (void)
|
||||||
|
15
src/window.c
15
src/window.c
@ -6117,15 +6117,22 @@ check_moveresize_frequency (MetaWindow *window)
|
|||||||
(current_time.tv_usec - window->display->grab_last_moveresize_time.tv_usec))) / 1000.0;
|
(current_time.tv_usec - window->display->grab_last_moveresize_time.tv_usec))) / 1000.0;
|
||||||
|
|
||||||
#define EPSILON (1e-6)
|
#define EPSILON (1e-6)
|
||||||
#define MAX_RESIZES_PER_SECOND 30.0
|
#define MAX_RESIZES_PER_SECOND 20.0
|
||||||
if (elapsed >= 0.0 && elapsed < (1000.0 / MAX_RESIZES_PER_SECOND))
|
if (elapsed >= 0.0 && elapsed < (1000.0 / MAX_RESIZES_PER_SECOND))
|
||||||
return FALSE;
|
{
|
||||||
|
meta_verbose ("Delaying move/resize as only %g of %g seconds elapsed\n",
|
||||||
|
elapsed / 1000.0, 1.0 / MAX_RESIZES_PER_SECOND);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
else if (elapsed < (0.0 - EPSILON)) /* handle clock getting set backward */
|
else if (elapsed < (0.0 - EPSILON)) /* handle clock getting set backward */
|
||||||
clear_moveresize_time (window);
|
clear_moveresize_time (window);
|
||||||
|
|
||||||
/* store latest time */
|
/* store latest time */
|
||||||
window->display->grab_last_moveresize_time = current_time;
|
window->display->grab_last_moveresize_time = current_time;
|
||||||
|
|
||||||
|
meta_verbose ("Doing move/resize as %g of %g seconds elapsed\n",
|
||||||
|
elapsed / 1000.0, 1.0 / MAX_RESIZES_PER_SECOND);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6154,7 +6161,7 @@ update_move (MetaWindow *window,
|
|||||||
/* Force a move regardless of time if a certain delta is exceeded,
|
/* Force a move regardless of time if a certain delta is exceeded,
|
||||||
* so we don't get too out of sync with reality when dropping frames
|
* so we don't get too out of sync with reality when dropping frames
|
||||||
*/
|
*/
|
||||||
#define MOVE_THRESHOLD 15
|
#define MOVE_THRESHOLD 20
|
||||||
if (!check_moveresize_frequency (window) &&
|
if (!check_moveresize_frequency (window) &&
|
||||||
ABS (dx) < MOVE_THRESHOLD && ABS (dy) < MOVE_THRESHOLD)
|
ABS (dx) < MOVE_THRESHOLD && ABS (dy) < MOVE_THRESHOLD)
|
||||||
return;
|
return;
|
||||||
@ -6226,7 +6233,7 @@ update_resize (MetaWindow *window,
|
|||||||
/* Force a move regardless of time if a certain delta
|
/* Force a move regardless of time if a certain delta
|
||||||
* is exceeded
|
* is exceeded
|
||||||
*/
|
*/
|
||||||
#define RESIZE_THRESHOLD 15
|
#define RESIZE_THRESHOLD 20
|
||||||
if (!check_moveresize_frequency (window) &&
|
if (!check_moveresize_frequency (window) &&
|
||||||
ABS (dx) < RESIZE_THRESHOLD && ABS (dy) < RESIZE_THRESHOLD)
|
ABS (dx) < RESIZE_THRESHOLD && ABS (dy) < RESIZE_THRESHOLD)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user