1
0
Fork 0
Commit graph

376 commits

Author SHA1 Message Date
Rui Matos
e0906a77aa ui/frames: Don't focus if the button press is on the client area
This is a really old behavior introduced in commit
585e362526 which is inconsistent since
it only applies to SSD windows.

If we really want this, we should focus the window elsewhere so that
it applies consistently to all windows.

https://bugzilla.gnome.org/show_bug.cgi?id=756789
2016-01-05 20:42:02 +01:00
Florian Müllner
9b9083180f theme: Shut up some GTK+ warnings
GTK+ started to complain when the state parameter passed to any
gtk_style_context_get*() method mismatches the context's current
state a while ago.
2015-11-24 23:46:14 +01:00
Florian Müllner
4a770907c1 theme: Update style hierarchy (again)
GTK+ has updated some more widgets to use element names, so do some
catching up again ...
2015-11-12 01:04:24 +01:00
Florian Müllner
2750db2a89 theme: Set object-name on style contexts
The default theme started to use them in GTK+ commit 371f50, so
we need to update the style contexts to keep matching the style
of client-side decorations.

https://bugzilla.gnome.org/show_bug.cgi?id=757101
2015-10-27 09:42:49 +01:00
Florian Müllner
ffd95c2ad5 theme: Complete removal of "fringe" titlebar button support
We have been ignoring those buttons since 3.16 after they had been
broken in the default theme for a couple of versions. As nobody
appears to miss them, it's time to remove them for good.
2015-10-16 04:13:14 +02:00
Florian Müllner
72be89dfb9 theme: Reset button style state when done drawing
We use a single style context to draw titlebar buttons, updating
its state according to each button's prelight state as necessary.
This assumes that the original state is neither ACTIVE nor PRELIGHT,
which means we need to reset the state after drawing to avoid
propagating the state of the last-drawn button.
2015-10-16 04:04:34 +02:00
Florian Müllner
86d8c3954f theme: Stop hiding titlebar buttons in dialogs
As design patterns have evolved, dialogs that use CSD do use titlebar
buttons, so it's time to re-enable them for SSD as well.

https://bugzilla.gnome.org/show_bug.cgi?id=641630
2015-10-07 16:09:17 +02:00
Marek Chalupa
b97ebc4124 frames: handle META_FRAME_CONTROL_NONE on left click
We can get this operation in some cases, for example when
we're trying to resize window that cannot be resized.
This can occur with maximized windows that have a border
(without border we couldn't resize them by mouse in maximized state).
In this case we reached abort() beacuse we did not handle this op.

https://bugzilla.gnome.org/show_bug.cgi?id=751884
2015-07-15 07:45:02 -05:00
Jasper St. Pierre
aa1c819941 theme: Fix C++-ism 2015-07-01 16:26:51 -07:00
Jasper Lievisse Adriaanse
dd060d78ce prevent duplicate declaration of MetaUIFrame
fixes bug 747326
2015-06-26 21:40:44 -07:00
Jasper St. Pierre
12771a555a theme: Make sure to clear the entirety of buttons properly
In commit cc5def1, buttons were changed from GdkRectangles to
MetaButtonSpace units, but the corresponding memset hack was not.

This means that the clickable portion of the unshade rectangle
was always set to uninitalized memory. The effects of this were
random, but in cases where the moon is aligned just right, the
rectangle would graze over the borders, and so it would take priority
over other borders and show a pointer cursor instead of a resize
cursor.
2015-06-23 15:27:52 -07:00
Florian Müllner
57c1078ee7 theme: Scale window decorations on HiDPI displays
As we opt out of GTK+/Clutter's HiDPI handling, we need to apply the
window scaling factor manually to decorations, both the geometry and
when drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=744354
2015-03-17 17:09:48 +01:00
Jasper St. Pierre
6d72b7c017 ui: Remove device events from X11 mask
These interfere with our touch handling.
2015-03-13 13:28:33 -07:00
Jasper St. Pierre
656fe49dbe ui: Fix undefined variable warning
gcc is super smart and notices that we don't have a default case here.
2015-03-13 13:28:33 -07:00
Florian Müllner
6bacbac656 theme: Stop clipping titlebar buttons
There is no good reason to do so, besides a nice way to check whether
a particular button is enabled. However there are legitimate reasons
for overdrawing like box-shadows or outlines, so remove the clip.
2015-03-11 15:26:06 +01:00
Jasper St. Pierre
cca68b31b1 frames: Refactor out another inner switch 2015-03-08 20:38:30 -07:00
Jasper St. Pierre
85452aff4f frames: Refactor control handling with a switch statement 2015-03-08 20:38:30 -07:00
Jasper St. Pierre
d9d83abae2 frames: Refactor frame button click handling code a title bit 2015-03-08 20:38:30 -07:00
Horst3180
e5d97666af Add style classes to the titlebuttons
https://bugzilla.gnome.org/show_bug.cgi?id=745108
2015-03-04 20:58:27 +01:00
Jasper St. Pierre
de71fd0941 theme: Remove old metacity theme-format version macros 2015-02-11 17:56:02 -08:00
Jasper St. Pierre
87c973c260 theme: Make certain MetaFrameLayout functions static 2015-02-11 17:50:29 -08:00
Jasper St. Pierre
644ab0e270 theme: Remove unused memory management functions 2015-02-11 17:49:38 -08:00
Jasper St. Pierre
3142220443 theme: Remove old comment about metacity themes
These are obviously no longer supported.
2015-02-08 13:06:23 -08:00
Jasper St. Pierre
05353c1f7e frame: Don't redraw immediately when we resize
We're locked to frame sync anyway, so it doesn't make sense to try to
redraw early. In casual testing, this seems to actually make things
faster, as well.
2015-01-30 13:13:49 -05:00
Jasper St. Pierre
d561b3b18f frames: Clutterify frame event handling
This lets us remove our horrible X11-based, GDK-based hacky frame event
handling in favor of a more sane one in Clutter.
2015-01-19 21:56:08 -08:00
Jasper St. Pierre
ce14bde08d frames: Remove the destroy_event handler
It does nothing.
2015-01-19 21:52:41 -08:00
Florian Müllner
f71315eb1e frames: Fix window-type/frame-type mix-up
Commit 7e66d2a484 killed off META_CORE_GET_FRAME_TYPE, but got
the replacement wrong - MetaWindowType is an enum like MetaFrameType,
but the two are not interchangeable.

https://bugzilla.gnome.org/show_bug.cgi?id=742841
2015-01-13 18:14:26 +01:00
Jasper St. Pierre
87eb5f8632 frames: Simplify our frame title management
This fixes a number of crashers when they try to change their dialog
layout at runtime because we're too tricksy with the frame title.
2015-01-09 16:35:30 -08:00
Adel Gadllah
fea7ac84ee ui: Disable gdk's gl support
This fixes a deadlock on wayland.
2015-01-08 11:15:51 +01:00
Jasper St. Pierre
274ea76eea frames: Force on dark theme for all apps if the user requested it
If the user requested a dark theme for all apps through GNOME Tweak
Tool, go ahead and force it for all apps, not only GTK+3 apps.

Thanks to MaTachi on reddit who suggested the idea:

http://www.reddit.com/r/linux/comments/2r1zwj/linus_i_dont_know_who_thought_it_was_a_good_idea/cnc10ui
2015-01-02 09:21:14 -08:00
Jasper St. Pierre
34fbca0181 frames: Remove the easy one-liner meta_core_* wrappers 2015-01-01 12:02:53 -08:00
Jasper St. Pierre
4496fb4447 frames: Remove all other uses of meta_core_get
RIP.
2015-01-01 11:56:14 -08:00
Jasper St. Pierre
7e66d2a484 frames: Punch down META_CORE_GET_FRAME_FLAGS / TYPE
These can be fetched directly off of the MetaWindow.
2015-01-01 11:48:55 -08:00
Jasper St. Pierre
12135afa5e frames: Give Havoc and Owen a heart attack
Break down the beautiful core/ui abstraction barrier by inserting
a pointer to MetaWindow into a MetaUIFrame. I'm a scoundrel, I know.
We'll use this very soon to destroy meta_core_get.
2015-01-01 11:42:25 -08:00
Jasper St. Pierre
cac660a5bc frames: Remove shape_applied
It's also unused.
2015-01-01 11:42:20 -08:00
Jasper St. Pierre
dcce4e64bc frames: We don't need to pass in the frame rect to get_bounds either
The MetaFrameGeometry already has this information.
2015-01-01 11:42:13 -08:00
Jasper St. Pierre
4d3511649b frames: Don't pass the frame rect into get_mask
We can query it directly.
2015-01-01 11:19:35 -08:00
Jasper St. Pierre
d4ea2bbd9c frames: Don't pass the width/height as separate args to get_client_rect
We already have them in the fgeom.
2015-01-01 11:04:11 -08:00
Jasper St. Pierre
2ca4ed6b04 frames: Rename meta_frames_* to meta_ui_frame_* where appropriate 2014-12-31 22:52:50 -08:00
Jasper St. Pierre
a5ad89dd65 frames: Remove last_motion_frame
Nothing cares about it.
2014-12-31 22:46:48 -08:00
Jasper St. Pierre
4a4d724e59 frames: Remove dead declaration 2014-12-31 22:46:06 -08:00
Jasper St. Pierre
8fdbae192a frame: Start converting over to direct usage of MetaUIFrame 2014-12-31 22:44:20 -08:00
Jasper St. Pierre
2413e672c8 frame: Put a MetaUIFrame* in our MetaFrame
This is a small start, but it lets us start to clean up this
UI split mess.
2014-12-31 22:43:00 -08:00
Jasper St. Pierre
c8432cc430 frames: Use an early return
To be more consistent with the rest of the code.
2014-12-31 22:43:00 -08:00
Jasper St. Pierre
015864da09 frames: Embed a pointer to MetaFrames inside MetaUIFrame
This removes the MetaFrames argument from our internal APIs.
2014-12-31 22:35:35 -08:00
Jasper St. Pierre
669c9da2a4 frames: Fix astonishing accidental pointer trickery
Whenever we added a frame to the GHashTable, we added the frame itself
as the value, and a pointer to its storage of the frame window XID,
as the key.

When we iterated over the hash table, we actually looked up the
MetaUIFrame in the key, which might seem extraordinarily wrong, but
eagle-eyed viewers might notice that the XID is the first field in
MetaUIFrame, so the key and value are actually the same pointer.

Changing the layout of MetaUIFrame at all causes this to go haywire,
so let's not do this and simply put the MetaUIFrame in the value,
as expected.
2014-12-31 22:35:35 -08:00
Jasper St. Pierre
4d1d8e831e frames: Revert the logic here when the frame type updates
When the frame type updates, we were doing something funky that
caused us to reset the title used for the text layout here. I can't
really think of any place that it would trigger, and in testing I
haven't hit this either, so let's just remove the fancy logic and
assert this.
2014-12-31 22:35:30 -08:00
Jasper St. Pierre
9e199e6350 frames: Pass MetaFrameType into ensure_layout
All the callers already have it, so don't make us fetch it again.
2014-12-31 22:35:29 -08:00
Jasper St. Pierre
4673d8f245 theme: Remove flags argument from get_frame_layout
It's unused.
2014-12-31 22:35:29 -08:00
Jasper St. Pierre
b47afe89d3 ui: We now always have a theme 2014-12-31 22:35:29 -08:00